31 lines
1.4 KiB
Diff
31 lines
1.4 KiB
Diff
--- a/meson.build
|
|
+++ b/meson.build
|
|
@@ -2047,9 +2047,10 @@ endif
|
|
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
|
|
# implementations. This could be extended if issues are found in some platforms.
|
|
libintl_deps = []
|
|
-if cc.has_function('ngettext', args : osx_ldflags)
|
|
+gettext_opt = get_option('gettext')
|
|
+if ['auto', 'libc'].contains(gettext_opt) and cc.has_function('ngettext', args : osx_ldflags)
|
|
have_bind_textdomain_codeset = cc.has_function('bind_textdomain_codeset')
|
|
-else
|
|
+elif ['auto', 'external'].contains(gettext_opt)
|
|
# First just find the bare library.
|
|
libintl = cc.find_library('intl', required : false)
|
|
# The bare library probably won't link without help if it's static.
|
|
--- a/meson_options.txt
|
|
+++ b/meson_options.txt
|
|
@@ -9,6 +9,12 @@ option('iconv',
|
|
value : 'auto',
|
|
description : 'iconv implementation to use (\'libc\' = \'Part of the C library\'; \'external\' = \'External libiconv\'; \'auto\' = \'Auto-detect which iconv is available\')')
|
|
|
|
+option('gettext',
|
|
+ type : 'combo',
|
|
+ choices : ['auto', 'libc', 'external'],
|
|
+ value : 'auto',
|
|
+ description : 'gettext implementation to use (\'libc\' = \'Part of the C library\'; \'external\' = \'External libintl\'; \'auto\' = \'Auto-detect which gettext is available\')')
|
|
+
|
|
option('charsetalias_dir',
|
|
type : 'string',
|
|
value : '',
|