Forcing fallback for libintl does not work
This is very similar to #3025 (closed).
I'm also building Glib to be packaged in a macOS application, I want to force usage of proxy-libintl
but meson is picking up a libintl
that I have installed in /usr/local
. --force-fallback-for intl
does not have any effect.
As suggested in #3025, removing allow_fallback
from dependency('intl')
solves the problem, and there's another change needed to the if
as well. With this change I can use --force-fallback-for intl
, I'll create an MR.
diff --git a/meson.build b/meson.build
index c7b534626..88e1b38a3 100644
--- a/meson.build
+++ b/meson.build
@@ -2106,8 +2106,8 @@ libz_dep = dependency('zlib')
# implementations. This could be extended if issues are found in some platforms.
libintl_deps = []
libintl_prefix = '#include <libintl.h>'
-libintl = dependency('intl', required: false, allow_fallback: false)
-if libintl.found()
+libintl = dependency('intl', required: false)
+if libintl.found() and libintl.type_name() != 'internal'
# libintl supports different threading APIs, which may not
# require additional flags, but it defaults to using pthreads if
# found. Meson's "threads" dependency does not allow you to
@@ -2134,7 +2134,7 @@ if libintl.found()
endif
endif
-if libintl.found()
+if libintl.found() and libintl.type_name() != 'internal'
have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps, prefix: libintl_prefix)
else
libintl = dependency('intl', allow_fallback: true)
Edited by Brendan Shanks