mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-01 21:33:09 +02:00
meson: try iconv in libintl lookup
This was originally removed in !2734 but still appears to be required for some MinGW setups, such as the `x86_64-w64-mingw32.static` target in [mxe](https://github.com/mxe/mxe). Currently, this configuration fails the libintl internal assert on line 2128, as on this platform `ngettext()` is only found inside libiconv. This commit will look up iconv potentially twice, once as `libiconv` and potentially once as `libintl_iconv`. This is what the code did before !2734 landed, so it’s known to work reliably on a number of platforms.
This commit is contained in:
parent
ecbe360a38
commit
a497d5be12
13
meson.build
13
meson.build
@ -2112,11 +2112,16 @@ if libintl.found()
|
|||||||
if cc.has_function('ngettext', dependencies : libintl, prefix: libintl_prefix)
|
if cc.has_function('ngettext', dependencies : libintl, prefix: libintl_prefix)
|
||||||
libintl_deps += [libintl]
|
libintl_deps += [libintl]
|
||||||
else
|
else
|
||||||
libintl_pthread = cc.find_library('pthread', required : false)
|
libintl_iconv = cc.find_library('iconv', required : false)
|
||||||
if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread], prefix: libintl_prefix)
|
if libintl_iconv.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_iconv])
|
||||||
libintl_deps += [libintl, libintl_pthread]
|
libintl_deps += [libintl, libintl_iconv]
|
||||||
else
|
else
|
||||||
libintl = disabler()
|
libintl_pthread = cc.find_library('pthread', required : false)
|
||||||
|
if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread], prefix: libintl_prefix)
|
||||||
|
libintl_deps += [libintl, libintl_pthread]
|
||||||
|
else
|
||||||
|
libintl = disabler()
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user