mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-02 13:53:06 +02:00
Meson: Always fallback to proxy-libintl subproject
An implementation of gettext is required, but it's not always needed e.g. for CI builds. https://bugzilla.gnome.org/show_bug.cgi?id=796264
This commit is contained in:
parent
ed4ff31567
commit
5d0a99105d
20
meson.build
20
meson.build
@ -1687,17 +1687,23 @@ else
|
|||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Only used on non-glibc targets
|
# First check in libc, fallback to libintl, and as last chance build
|
||||||
libintl = cc.find_library('intl', required : false)
|
# proxy-libintl subproject.
|
||||||
if host_system == 'windows' and not libintl.found()
|
# FIXME: glib-gettext.m4 has much more checks to detect broken/uncompatible
|
||||||
# Used only when the gettext library is not available (MSVC, not MinGW)
|
# implementations. This could be extended if issues are found in some platforms.
|
||||||
libintl = subproject('proxy-libintl').get_variable('intl_dep')
|
if cc.has_function('ngettext')
|
||||||
glib_conf.set('HAVE_DCGETTEXT', 1)
|
libintl = []
|
||||||
else
|
else
|
||||||
glib_conf.set('HAVE_DCGETTEXT', cc.has_header_symbol('libintl.h', 'dcgettext'))
|
libintl = cc.find_library('intl', required : false)
|
||||||
|
if not libintl.found()
|
||||||
|
libintl = subproject('proxy-libintl').get_variable('intl_dep')
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# We require gettext to always be present
|
# We require gettext to always be present
|
||||||
|
glib_conf.set('HAVE_DCGETTEXT', 1)
|
||||||
glib_conf.set('HAVE_GETTEXT', 1)
|
glib_conf.set('HAVE_GETTEXT', 1)
|
||||||
|
|
||||||
glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale'))
|
glib_conf.set_quoted('GLIB_LOCALE_DIR', join_paths(glib_datadir, 'locale'))
|
||||||
# xgettext is optional (on Windows for instance)
|
# xgettext is optional (on Windows for instance)
|
||||||
xgettext = find_program('xgettext', required : false)
|
xgettext = find_program('xgettext', required : false)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user