Properly find bind_textdomain_codeset.

This commit is contained in:
ajacoutot 2022-11-09 11:01:15 +00:00
parent aa7be76e29
commit f9478ea6bd
2 changed files with 18 additions and 0 deletions

View File

@ -7,6 +7,7 @@ COMMENT= next generation GNOME shell
GNOME_PROJECT= gnome-shell
# sync with meta/gnome "V" variable
GNOME_VERSION= 43.1
REVISION= 0
# GPLv2+
PERMIT_PACKAGE= Yes

View File

@ -0,0 +1,17 @@
XXX push upstream; this is what gdk-pixbuf is doing
Index: subprojects/extensions-tool/src/meson.build
--- subprojects/extensions-tool/src/meson.build.orig
+++ subprojects/extensions-tool/src/meson.build
@@ -2,7 +2,10 @@ config_h = configuration_data()
config_h.set_quoted('GETTEXT_PACKAGE', package_name)
config_h.set_quoted('VERSION', meson.project_version())
config_h.set_quoted('LOCALEDIR', localedir)
-config_h.set('HAVE_BIND_TEXTDOMAIN_CODESET', cc.has_function('bind_textdomain_codeset'))
+intl_dep = cc.find_library('intl', required: false)
+if cc.has_function('bind_textdomain_codeset', prefix: '#include <libintl.h>', dependencies: intl_dep)
+ config_h.set('HAVE_BIND_TEXTDOMAIN_CODESET', 1)
+endif
configure_file(
output: 'config.h',
configuration: config_h,