2021-11-30 04:31:32 +08:00
|
|
|
diff --git a/meson.build b/meson.build
|
2022-10-14 02:20:24 +08:00
|
|
|
index f44fa2d4e..d465253af 100644
|
2021-11-30 04:31:32 +08:00
|
|
|
--- a/meson.build
|
|
|
|
+++ b/meson.build
|
2022-10-14 02:20:24 +08:00
|
|
|
@@ -2090,37 +2090,10 @@ libz_dep = dependency('zlib')
|
|
|
|
# proxy-libintl subproject.
|
2021-11-30 04:31:32 +08:00
|
|
|
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
|
|
|
|
# implementations. This could be extended if issues are found in some platforms.
|
2022-10-14 02:20:24 +08:00
|
|
|
-libintl_deps = []
|
|
|
|
-libintl = dependency('intl', required: false)
|
|
|
|
-if libintl.found()
|
|
|
|
- # 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
|
|
|
|
- # prefer pthreads. We may not be using pthreads for glib itself
|
|
|
|
- # either so just link the library to satisfy libintl rather than
|
|
|
|
- # also defining the macros with the -pthread flag.
|
|
|
|
- #
|
|
|
|
- # Meson's builtin dependency lookup as of 0.60.0 doesn't check for
|
|
|
|
- # pthread, so we do this manually here.
|
|
|
|
- if cc.has_function('ngettext', dependencies : libintl)
|
|
|
|
- libintl_deps += [libintl]
|
2021-11-30 04:31:32 +08:00
|
|
|
- else
|
2022-10-14 02:20:24 +08:00
|
|
|
- libintl_pthread = cc.find_library('pthread', required : false)
|
|
|
|
- if libintl_pthread.found() and cc.has_function('ngettext', dependencies : [libintl, libintl_pthread])
|
|
|
|
- libintl_deps += [libintl, libintl_pthread]
|
|
|
|
- else
|
|
|
|
- libintl = disabler()
|
|
|
|
- endif
|
2021-11-30 04:31:32 +08:00
|
|
|
- endif
|
|
|
|
-endif
|
|
|
|
-
|
2022-10-14 02:20:24 +08:00
|
|
|
-if libintl.found()
|
|
|
|
- have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset', dependencies: libintl_deps)
|
|
|
|
-else
|
|
|
|
- libintl = subproject('proxy-libintl').get_variable('intl_dep')
|
|
|
|
- libintl_deps = [libintl]
|
|
|
|
- have_bind_textdomain_codeset = true # proxy-libintl supports it
|
|
|
|
-endif
|
2022-07-23 01:54:34 +08:00
|
|
|
+libintl = dependency('Intl', method:'cmake', required : true)
|
2022-10-14 02:20:24 +08:00
|
|
|
+libintl_deps = [libintl]
|
2022-07-23 01:54:34 +08:00
|
|
|
+have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset',
|
2022-10-14 02:20:24 +08:00
|
|
|
+ dependencies : libintl_deps)
|
|
|
|
|
2021-11-30 04:31:32 +08:00
|
|
|
glib_conf.set('HAVE_BIND_TEXTDOMAIN_CODESET', have_bind_textdomain_codeset)
|
|
|
|
|
2022-10-14 02:20:24 +08:00
|
|
|
|