meson: Hotfix for iconv detection on macOS

macOS/iOS do not ship iconv inside the C library, so don't try to look
for that at all when targetting macOS or iOS.

The proper fix involved changing the options and will be merged in
master: https://gitlab.gnome.org/GNOME/glib/merge_requests/759
This commit is contained in:
Nirbheek Chauhan 2019-04-11 18:00:05 +05:30
parent 13ea376a54
commit fcf68f8f31

View File

@ -1680,13 +1680,20 @@ glibconfig_conf.set10('G_HAVE_GROWING_STACK', growing_stack)
# We should never use the MinGW C library's iconv. On Windows we use the
# GNU implementation that ships with MinGW.
iconv_opt = get_option('iconv')
# On Darwin, the libc doesn't provide iconv. Instead, the OS provides libiconv
# as a separate (non-GNU) library. Set the option to 'native'.
if host_system == 'darwin' and iconv_opt == 'libc'
iconv_opt = 'native'
endif
# On Windows, just always use the built-in implementation
if host_system == 'windows'
libiconv = []
glib_conf.set('USE_LIBICONV_NATIVE', true)
else
found_iconv = false
iconv_opt = get_option('iconv')
if iconv_opt == 'libc'
if cc.has_function('iconv_open')
libiconv = []