diff --git a/glib/gconvert.c b/glib/gconvert.c index 707867951..c5857df1c 100644 --- a/glib/gconvert.c +++ b/glib/gconvert.c @@ -52,14 +52,6 @@ #include "glibintl.h" -#if defined(USE_LIBICONV_GNU) && !defined (_LIBICONV_H) -#error GNU libiconv in use but included iconv.h not from libiconv -#endif -#if !defined(USE_LIBICONV_GNU) && defined (_LIBICONV_H) \ - && !defined (__APPLE_CC__) && !defined (__LP_64__) -#error GNU libiconv not in use but included iconv.h is from libiconv -#endif - /** * SECTION:conversions diff --git a/meson.build b/meson.build index 0ec80c177..85433fb3b 100644 --- a/meson.build +++ b/meson.build @@ -1690,9 +1690,6 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack) # Tests for iconv # -# USE_LIBICONV_GNU: Using GNU libiconv -# USE_LIBICONV_NATIVE: Using a native impl of iconv in a separate library -# # We should never use the MinGW C library's iconv because it may not be # available in the actual runtime environment. On Windows, we always use # the built-in implementation @@ -1701,7 +1698,6 @@ if host_system == 'windows' libiconv = [] # We have a #include "win_iconv.c" in gconvert.c on Windows, so we don't need # any external library for it - glib_conf.set('USE_LIBICONV_NATIVE', true) if iconv_opt != 'auto' warning('-Diconv was set to @0@, which was ignored') endif @@ -1711,13 +1707,7 @@ else libiconv = [] found_iconv = true endif - if not found_iconv and ['auto', 'native'].contains(iconv_opt) and cc.has_header_symbol('iconv.h', 'iconv_open') - glib_conf.set('USE_LIBICONV_NATIVE', true) - libiconv = [cc.find_library('iconv')] - found_iconv = true - endif - if not found_iconv and ['auto', 'gnu'].contains(iconv_opt) and cc.has_header_symbol('iconv.h', 'libiconv_open') - glib_conf.set('USE_LIBICONV_GNU', true) + if not found_iconv and ['auto', 'external'].contains(iconv_opt) and cc.has_header_symbol('iconv.h', 'iconv_open') libiconv = [cc.find_library('iconv')] found_iconv = true endif diff --git a/meson_options.txt b/meson_options.txt index 0841f6bfe..2c831e37e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -5,9 +5,9 @@ option('runtime_libdir', option('iconv', type : 'combo', - choices : ['auto', 'libc', 'native', 'gnu'], + choices : ['auto', 'libc', 'external'], value : 'auto', - description : 'iconv implementation to use (\'libc\' = \'Part of the C stdlib\'; \'gnu\' = \'GNU\'s iconv\'; \'native\' = \'A separate iconv\'; \'auto\' = \'Auto-detect which iconv is available\')') + description : 'iconv implementation to use (\'libc\' = \'Part of the C library\'; \'external\' = \'External libiconv\'; \'auto\' = \'Auto-detect which iconv is available\')') option('charsetalias_dir', type : 'string',