You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.3 KiB

  1. From 8ece1141e455d6643df0be885a5df200bdb3bc78 Mon Sep 17 00:00:00 2001
  2. From: Rosen Penev <rosenp@gmail.com>
  3. Date: Thu, 30 Jul 2020 14:34:07 -0700
  4. Subject: [PATCH] icu/meson: link against iconv when used externally
  5. This basically adds -liconv to LDFLAGS, fixing a linking issue when
  6. iconv is missing in the libc.
  7. The previous commit fixed finding iconv but did not fix linking.
  8. Switched to using c_compiler for iconv. It seems compiler does not work
  9. properly.
  10. Signed-off-by: Rosen Penev <rosenp@gmail.com>
  11. ---
  12. src/lib/icu/meson.build | 14 ++++++++++++--
  13. 1 file changed, 12 insertions(+), 2 deletions(-)
  14. --- a/src/lib/icu/meson.build
  15. +++ b/src/lib/icu/meson.build
  16. @@ -19,16 +19,8 @@ if icu_dep.found()
  17. 'Init.cxx',
  18. ]
  19. elif not get_option('iconv').disabled()
  20. - # an installed iconv library will make the builtin iconv() unavailable,
  21. - # so search for the library first and pass it as (possible) dependency
  22. - iconv_dep = compiler.find_library('libiconv', required: false)
  23. - have_iconv = compiler.has_function('iconv',
  24. - dependencies: iconv_dep,
  25. - prefix : '#include <iconv.h>')
  26. - if not have_iconv and get_option('iconv').enabled()
  27. - error('iconv() not available')
  28. - endif
  29. - conf.set('HAVE_ICONV', have_iconv)
  30. + iconv_dep = dependency('iconv')
  31. + conf.set('HAVE_ICONV', iconv_dep.found())
  32. endif
  33. icu = static_library(