raven-rhel8/base/rx-glib2/glib-change-version.patch

2134 lines
76 KiB
Diff
Raw Normal View History

2024-09-02 17:09:04 +06:00
diff -Naur a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build
--- a/gio/gdbus-2.0/codegen/meson.build 2021-08-19 21:27:25.686339000 +0600
+++ b/gio/gdbus-2.0/codegen/meson.build 2024-06-20 09:59:13.236516507 +0600
@@ -24,7 +24,7 @@
# Provide tools for others when we're a subproject and they use the Meson GNOME module
meson.override_find_program('gdbus-codegen', gdbus_codegen)
-codegen_dir = join_paths(glib_datadir, 'glib-2.0', 'codegen')
+codegen_dir = join_paths(glib_datadir, 'glib-2.00', 'codegen')
gdbus_codegen_built_files = []
gdbus_codegen_built_files += configure_file(input : 'config.py.in',
diff -Naur a/gio/gschema-2.00.its b/gio/gschema-2.00.its
--- a/gio/gschema-2.00.its 1970-01-01 06:00:00.000000000 +0600
+++ b/gio/gschema-2.00.its 2021-08-19 21:27:25.713339800 +0600
@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<!--
+See the gettext documentation for the file format:
+http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html
+-->
+<its:rules xmlns:its="http://www.w3.org/2005/11/its"
+ xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0"
+ version="2.0">
+ <its:translateRule selector="/schemalist" translate="no"/>
+
+ <its:translateRule selector="//summary | //description" translate="yes"/>
+
+ <its:translateRule selector="//default[@l10n]" translate="yes"/>
+
+ <!-- The 'context' attribute should be extracted as msgctxt. -->
+ <gt:contextRule selector="//default[@context]" contextPointer="@context"/>
+ <gt:escapeRule selector="//default/@context" escape="no"/>
+
+ <!-- Remove whitespaces around the default value. -->
+ <gt:preserveSpaceRule selector="//default" space="trim"/>
+
+ <!-- Extracted strings are consumed by the library and are never
+ merged back; we don't want to escape special characters. -->
+ <gt:escapeRule selector="/schemalist" escape="no"/>
+</its:rules>
diff -Naur a/gio/gschema-2.00.loc b/gio/gschema-2.00.loc
--- a/gio/gschema-2.00.loc 1970-01-01 06:00:00.000000000 +0600
+++ b/gio/gschema-2.00.loc 2021-08-19 21:27:25.713339800 +0600
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<!--
+See the gettext documentation for the file format:
+http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html
+-->
+<locatingRules>
+ <locatingRule name="GSettings" pattern="*.gschema.xml">
+ <documentRule localName="schemalist" target="gschema.its"/>
+ </locatingRule>
+</locatingRules>
diff -Naur a/gio/gschema.its b/gio/gschema.its
--- a/gio/gschema.its 2021-08-19 21:27:25.713339000 +0600
+++ b/gio/gschema.its 1970-01-01 06:00:00.000000000 +0600
@@ -1,25 +0,0 @@
-<?xml version="1.0"?>
-<!--
-See the gettext documentation for the file format:
-http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html
--->
-<its:rules xmlns:its="http://www.w3.org/2005/11/its"
- xmlns:gt="https://www.gnu.org/s/gettext/ns/its/extensions/1.0"
- version="2.0">
- <its:translateRule selector="/schemalist" translate="no"/>
-
- <its:translateRule selector="//summary | //description" translate="yes"/>
-
- <its:translateRule selector="//default[@l10n]" translate="yes"/>
-
- <!-- The 'context' attribute should be extracted as msgctxt. -->
- <gt:contextRule selector="//default[@context]" contextPointer="@context"/>
- <gt:escapeRule selector="//default/@context" escape="no"/>
-
- <!-- Remove whitespaces around the default value. -->
- <gt:preserveSpaceRule selector="//default" space="trim"/>
-
- <!-- Extracted strings are consumed by the library and are never
- merged back; we don't want to escape special characters. -->
- <gt:escapeRule selector="/schemalist" escape="no"/>
-</its:rules>
diff -Naur a/gio/gschema.loc b/gio/gschema.loc
--- a/gio/gschema.loc 2021-08-19 21:27:25.713339000 +0600
+++ b/gio/gschema.loc 1970-01-01 06:00:00.000000000 +0600
@@ -1,10 +0,0 @@
-<?xml version="1.0"?>
-<!--
-See the gettext documentation for the file format:
-http://www.gnu.org/software/gettext/manual/html_node/Preparing-ITS-Rules.html
--->
-<locatingRules>
- <locatingRule name="GSettings" pattern="*.gschema.xml">
- <documentRule localName="schemalist" target="gschema.its"/>
- </locatingRule>
-</locatingRules>
diff -Naur a/gio/meson.build b/gio/meson.build
--- a/gio/meson.build 2021-08-19 21:27:25.727340000 +0600
+++ b/gio/meson.build 2024-06-20 10:39:38.014030594 +0600
@@ -170,7 +170,7 @@
gnetworking_h = configure_file(input : 'gnetworking.h.in',
output : 'gnetworking.h',
- install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
+ install_dir : join_paths(get_option('includedir'), 'glib-2.00/gio'),
configuration : gnetworking_h_conf)
gdbus_headers = files(
@@ -420,7 +420,7 @@
internal_deps += [xdgmime_lib]
internal_objects += [xdgmime_lib.extract_all_objects()]
- install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.0/gio')
+ install_headers(gio_unix_include_headers, subdir : 'gio-unix-2.00/gio')
if glib_conf.has('HAVE_NETLINK')
unix_sources += files(
@@ -725,7 +725,7 @@
gio_headers += application_headers
gio_headers += settings_headers
gio_headers += gdbus_headers
-install_headers(gio_headers, subdir : 'glib-2.0/gio/')
+install_headers(gio_headers, subdir : 'glib-2.00/gio/')
# We can't use gnome.mkenums() because the GNOME module looks for glib-mkenums
# in PATH, which means you can't bootstrap glib with its own glib-mkenums.
@@ -734,7 +734,7 @@
capture : true,
input : gio_headers,
install : true,
- install_dir : join_paths(get_option('includedir'), 'glib-2.0/gio'),
+ install_dir : join_paths(get_option('includedir'), 'glib-2.00/gio'),
command : [python, glib_mkenums,
'--template', files('gioenumtypes.h.template'),
'@INPUT@', gnetworking_h])
@@ -800,7 +800,7 @@
gio_dtrace_hdr = []
endif
-libgio = library('gio-2.0',
+libgio = library('gio-2.00',
gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources,
gio_dtrace_hdr, gio_dtrace_obj,
objects : internal_objects,
@@ -825,7 +825,7 @@
pkgconfig_giomodulesdir = join_paths('${libdir}', 'gio', 'modules')
endif
-schemas_subdir = join_paths('glib-2.0', 'schemas')
+schemas_subdir = join_paths('glib-2.00', 'schemas')
libgio_dep = declare_dependency(link_with : libgio,
dependencies : [libgmodule_dep, libgobject_dep, gioenumtypes_dep],
@@ -833,7 +833,7 @@
pkg.generate(libgio,
libraries_private : [osx_ldflags],
- requires : ['glib-2.0', 'gobject-2.0'],
+ requires : ['glib-2.00', 'gobject-2.00'],
variables : ['datadir=' + join_paths('${prefix}', get_option('datadir')),
'schemasdir=' + join_paths('${datadir}', schemas_subdir),
'bindir=' + join_paths('${prefix}', get_option('bindir')),
@@ -848,13 +848,13 @@
'gsettings=' + join_paths('${bindir}', 'gsettings')],
version : glib_version,
install_dir : glib_pkgconfigreldir,
- filebase : 'gio-2.0',
+ filebase : 'gio-2.00',
name : 'GIO',
description : 'glib I/O library',
)
if meson.version().version_compare('>=0.54.0')
- meson.override_dependency('gio-2.0', libgio_dep)
+ meson.override_dependency('gio-2.00', libgio_dep)
endif
@@ -871,16 +871,16 @@
meson.override_dependency('gio-win32-2.0', libgio_dep)
endif
else
- pkg.generate(requires : ['gobject-2.0', 'gio-2.0'],
- subdirs : ['gio-unix-2.0'],
+ pkg.generate(requires : ['gobject-2.00', 'gio-2.00'],
+ subdirs : ['gio-unix-2.00'],
version : glib_version,
install_dir : glib_pkgconfigreldir,
- filebase : 'gio-unix-2.0',
+ filebase : 'gio-unix-2.00',
name : 'GIO unix specific APIs',
description : 'unix specific headers for glib I/O library',
)
if meson.version().version_compare('>=0.54.0')
- meson.override_dependency('gio-unix-2.0', libgio_dep)
+ meson.override_dependency('gio-unix-2.00', libgio_dep)
endif
endif
@@ -997,7 +997,7 @@
install_data('gschema.dtd',
install_dir : join_paths(get_option('datadir'), schemas_subdir))
-install_data(['gschema.loc', 'gschema.its'],
+install_data(['gschema-2.00.loc', 'gschema-2.00.its'],
install_dir : join_paths(get_option('datadir'), 'gettext/its'))
executable('gdbus', 'gdbus-tool.c',
diff -Naur a/glib/meson.build b/glib/meson.build
--- a/glib/meson.build 2021-08-19 21:27:25.779340000 +0600
+++ b/glib/meson.build 2024-06-20 09:41:17.032294858 +0600
@@ -1,5 +1,5 @@
configure_file(input : 'glibconfig.h.in', output : 'glibconfig.h',
- install_dir : join_paths(get_option('libdir'), 'glib-2.0/include'),
+ install_dir : join_paths(get_option('libdir'), 'glib-2.00/include'),
configuration : glibconfig_conf)
subdir('libcharset')
@@ -128,7 +128,7 @@
'glib-unix.h',
'glib-object.h',
)
-install_headers(glib_headers, subdir : 'glib-2.0')
+install_headers(glib_headers, subdir : 'glib-2.00')
glib_deprecated_headers = files(
'deprecated/gallocator.h',
@@ -138,7 +138,7 @@
'deprecated/grel.h',
'deprecated/gthread.h',
)
-install_headers(glib_deprecated_headers, subdir : 'glib-2.0/glib/deprecated')
+install_headers(glib_deprecated_headers, subdir : 'glib-2.00/glib/deprecated')
glib_sub_headers = files(
'glib-autocleanups.h',
@@ -220,7 +220,7 @@
'gwin32.h',
'gprintf.h',
)
-install_headers(glib_sub_headers, subdir : 'glib-2.0/glib')
+install_headers(glib_sub_headers, subdir : 'glib-2.00/glib')
deprecated_sources = files(
'deprecated/gallocator.c',
@@ -366,7 +366,7 @@
endif
glib_c_args = ['-DG_LOG_DOMAIN="GLib"', '-DGLIB_COMPILATION'] + pcre_static_args + glib_hidden_visibility_args
-libglib = library('glib-2.0',
+libglib = library('glib-2.00',
glib_dtrace_obj, glib_dtrace_hdr,
sources : [deprecated_sources, glib_sources],
objects : [charset_lib.extract_all_objects()] + gnulib_objects + pcre_objects,
@@ -391,8 +391,8 @@
pkg.generate(libglib,
libraries : [libintl_deps],
libraries_private : [osx_ldflags, win32_ldflags],
- subdirs : ['glib-2.0'],
- extra_cflags : ['-I${libdir}/glib-2.0/include'] + win32_cflags,
+ subdirs : ['glib-2.00'],
+ extra_cflags : ['-I${libdir}/glib-2.00/include'] + win32_cflags,
variables : ['bindir=' + join_paths('${prefix}', get_option('bindir')),
'glib_genmarshal=' + join_paths('${bindir}', 'glib-genmarshal'),
'gobject_query=' + join_paths('${bindir}', 'gobject-query'),
@@ -405,7 +405,7 @@
)
if meson.version().version_compare('>=0.54.0')
- meson.override_dependency('glib-2.0', libglib_dep)
+ meson.override_dependency('glib-2.00', libglib_dep)
endif
# On Windows, glib needs a spawn helper for g_spawn* API
@@ -468,7 +468,7 @@
endif
configure_file(
input: 'libglib-gdb.py.in',
- output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version),
+ output: 'libglib-2.00.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
install_dir: gdb_install_dir,
)
diff -Naur a/glib-gettextize.in b/glib-gettextize.in
--- a/glib-gettextize.in 2021-08-19 21:27:25.746340000 +0600
+++ b/glib-gettextize.in 2024-06-20 10:31:50.068973445 +0600
@@ -51,7 +51,7 @@
datarootdir=@datarootdir@
datadir=@datadir@
-gettext_dir=$datadir/glib-2.0/gettext
+gettext_dir=$datadir/glib-2.00/gettext
while test $# -gt 0; do
case "$1" in
diff -Naur a/gmodule/meson.build b/gmodule/meson.build
--- a/gmodule/meson.build 2021-08-19 21:27:25.798340000 +0600
+++ b/gmodule/meson.build 2024-06-20 09:41:58.491030409 +0600
@@ -59,7 +59,7 @@
output : 'gmoduleconf.h',
configuration : gmoduleconf_conf)
-install_headers(['gmodule.h'], subdir : 'glib-2.0')
+install_headers(['gmodule.h'], subdir : 'glib-2.00')
gmodule_sources = ['gmodule.c']
if host_system == 'windows'
@@ -72,7 +72,7 @@
gmodule_sources += [gmodule_win_res]
endif
-libgmodule = library('gmodule-2.0',
+libgmodule = library('gmodule-2.00',
sources : gmodule_sources,
version : library_version,
soversion : soversion,
@@ -88,31 +88,31 @@
pkg.generate(libgmodule,
libraries : [thread_dep],
- requires : ['glib-2.0'],
+ requires : ['glib-2.00'],
version : glib_version,
variables : [supported_var],
install_dir : glib_pkgconfigreldir,
- filebase : 'gmodule-no-export-2.0',
+ filebase : 'gmodule-no-export-2.00',
name : 'GModule',
description : 'Dynamic module loader for GLib',
)
pkg.generate(libraries : [libgmodule, export_dynamic_ldflags],
- requires : ['glib-2.0'],
+ requires : ['glib-2.00'],
version : glib_version,
variables : [supported_var],
install_dir : glib_pkgconfigreldir,
- filebase : 'gmodule-export-2.0',
+ filebase : 'gmodule-export-2.00',
name : 'GModule',
description : 'Dynamic module loader for GLib',
)
pkg.generate(libraries : [libgmodule, export_dynamic_ldflags],
- requires : ['glib-2.0'],
+ requires : ['glib-2.00'],
version : glib_version,
variables : [supported_var],
install_dir : glib_pkgconfigreldir,
- filebase : 'gmodule-2.0',
+ filebase : 'gmodule-2.00',
name : 'GModule',
description : 'Dynamic module loader for GLib',
)
@@ -122,7 +122,7 @@
dependencies : [libglib_dep])
if meson.version().version_compare('>=0.54.0')
- meson.override_dependency('gmodule-no-export-2.0', libgmodule_dep)
- meson.override_dependency('gmodule-export-2.0', libgmodule_dep)
- meson.override_dependency('gmodule-2.0', libgmodule_dep)
+ meson.override_dependency('gmodule-no-export-2.00', libgmodule_dep)
+ meson.override_dependency('gmodule-export-2.00', libgmodule_dep)
+ meson.override_dependency('gmodule-2.00', libgmodule_dep)
endif
diff -Naur a/gobject/meson.build b/gobject/meson.build
--- a/gobject/meson.build 2021-08-19 21:27:25.803341000 +0600
+++ b/gobject/meson.build 2024-06-20 09:42:28.155841189 +0600
@@ -20,7 +20,7 @@
'gvaluetypes.h',
'gobjectnotifyqueue.c', # sic
)
-install_headers(gobject_install_headers, subdir : 'glib-2.0/gobject')
+install_headers(gobject_install_headers, subdir : 'glib-2.00/gobject')
gobject_sources = files(
'gatomicarray.c',
@@ -101,7 +101,7 @@
capture : true,
input : glib_enumtypes_input_headers,
install : true,
- install_dir : join_paths(get_option('includedir'), 'glib-2.0/gobject'),
+ install_dir : join_paths(get_option('includedir'), 'glib-2.00/gobject'),
command : [python, glib_mkenums,
'--template', files('glib-enumtypes.h.template'),
'@INPUT@'])
@@ -117,7 +117,7 @@
glib_enumtypes_dep = declare_dependency(sources : [glib_enumtypes_h])
-libgobject = library('gobject-2.0',
+libgobject = library('gobject-2.00',
gobject_dtrace_obj, gobject_dtrace_hdr, glib_enumtypes_h, glib_enumtypes_c,
sources : gobject_sources,
version : library_version,
@@ -131,10 +131,10 @@
)
pkg.generate(libgobject,
- requires : ['glib-2.0'],
+ requires : ['glib-2.00'],
version : glib_version,
install_dir : glib_pkgconfigreldir,
- filebase : 'gobject-2.0',
+ filebase : 'gobject-2.00',
name : 'GObject',
description : 'GLib Type, Object, Parameter and Signal Library',
)
@@ -144,7 +144,7 @@
dependencies : [libglib_dep, glib_enumtypes_dep])
if meson.version().version_compare('>=0.54.0')
- meson.override_dependency('gobject-2.0', libgobject_dep)
+ meson.override_dependency('gobject-2.00', libgobject_dep)
endif
executable('gobject-query', 'gobject-query.c',
@@ -156,7 +156,7 @@
gdb_conf.set('datadir', glib_datadir)
configure_file(
input: 'libgobject-gdb.py.in',
- output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version),
+ output: 'libgobject-2.00.so.@0@-gdb.py'.format(library_version),
configuration: gdb_conf,
install_dir: gdb_install_dir,
)
diff -Naur a/gthread/meson.build b/gthread/meson.build
--- a/gthread/meson.build 2021-08-19 21:27:25.805341000 +0600
+++ b/gthread/meson.build 2024-06-20 09:42:40.519762324 +0600
@@ -12,7 +12,7 @@
gthread_sources += [gthread_win_res]
endif
-libgthread = library('gthread-2.0',
+libgthread = library('gthread-2.00',
sources : gthread_sources,
version : library_version,
soversion : soversion,
@@ -25,10 +25,10 @@
pkg.generate(libgthread,
libraries : [thread_dep],
- requires : ['glib-2.0'],
+ requires : ['glib-2.00'],
version : glib_version,
install_dir : glib_pkgconfigreldir,
- filebase : 'gthread-2.0',
+ filebase : 'gthread-2.00',
name : 'GThread',
description : 'Thread support for GLib',
)
@@ -36,5 +36,5 @@
libgthread_dep = declare_dependency(link_with : libgthread)
if meson.version().version_compare('>=0.54.0')
- meson.override_dependency('gthread-2.0', libgthread_dep)
+ meson.override_dependency('gthread-2.00', libgthread_dep)
endif
diff -Naur a/m4macros/glib-2.00.m4 b/m4macros/glib-2.00.m4
--- a/m4macros/glib-2.00.m4 1970-01-01 06:00:00.000000000 +0600
+++ b/m4macros/glib-2.00.m4 2024-06-20 09:43:31.857434862 +0600
@@ -0,0 +1,215 @@
+# Configure paths for GLIB
+# Owen Taylor 1997-2001
+
+# Increment this whenever this file is changed.
+#serial 4
+
+dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
+dnl gthread, or gio is specified in MODULES, pass to pkg-config
+dnl
+AC_DEFUN([AM_PATH_GLIB_2_0],
+[dnl
+dnl Get the cflags and libraries from pkg-config
+dnl
+
+dnl We can't use PKG_PREREQ because that needs 0.29.
+m4_ifndef([PKG_PROG_PKG_CONFIG],
+ [pkg.m4 version 0.28 or later is required])
+
+AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
+ , enable_glibtest=yes)
+
+ min_glib_version=ifelse([$1], [], [2.0.0], [$1])
+ pkg_config_args="glib-2.00 >= $min_glib_version"
+ for module in . $4
+ do
+ case "$module" in
+ gmodule)
+ pkg_config_args="$pkg_config_args gmodule-2.00"
+ ;;
+ gmodule-no-export)
+ pkg_config_args="$pkg_config_args gmodule-no-export-2.00"
+ ;;
+ gobject)
+ pkg_config_args="$pkg_config_args gobject-2.00"
+ ;;
+ gthread)
+ pkg_config_args="$pkg_config_args gthread-2.00"
+ ;;
+ gio*)
+ pkg_config_args="$pkg_config_args $module-2.00"
+ ;;
+ esac
+ done
+
+ PKG_PROG_PKG_CONFIG([0.16])
+
+ no_glib=""
+
+ if test "x$PKG_CONFIG" = x ; then
+ no_glib=yes
+ PKG_CONFIG=no
+ fi
+
+ dnl For GLIB_CFLAGS and GLIB_LIBS
+ PKG_CHECK_MODULES([GLIB], [$pkg_config_args], [:], [:])
+
+ dnl For the tools
+ PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.00], [glib_genmarshal])
+ PKG_CHECK_VAR([GOBJECT_QUERY], [glib-2.00], [gobject_query])
+ PKG_CHECK_VAR([GLIB_MKENUMS], [glib-2.00], [glib_mkenums])
+ PKG_CHECK_VAR([GLIB_COMPILE_RESOURCES], [gio-2.00], [glib_compile_resources])
+
+ AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
+
+ if test x$PKG_CONFIG != xno ; then
+ ## don't try to run the test against uninstalled libtool libs
+ if $PKG_CONFIG --uninstalled $pkg_config_args; then
+ echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
+ enable_glibtest=no
+ fi
+
+ if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
+ :
+ else
+ no_glib=yes
+ fi
+ fi
+
+ if test x"$no_glib" = x ; then
+ glib_config_major_version=`$PKG_CONFIG --modversion glib-2.00 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+ glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.00 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+ glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.00 | \
+ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+ if test "x$enable_glibtest" = "xyes" ; then
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$GLIB_LIBS $LIBS"
+dnl
+dnl Now check if the installed GLib is sufficiently new. (Also sanity
+dnl checks the results of pkg-config to some extent)
+dnl
+ rm -f conf.glibtest
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <glib.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ unsigned int major, minor, micro;
+
+ fclose (fopen ("conf.glibtest", "w"));
+
+ if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
+ printf("%s, bad version string\n", "$min_glib_version");
+ exit(1);
+ }
+
+ if ((glib_major_version != $glib_config_major_version) ||
+ (glib_minor_version != $glib_config_minor_version) ||
+ (glib_micro_version != $glib_config_micro_version))
+ {
+ printf("\n*** 'pkg-config --modversion glib-2.00' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
+ $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf ("*** was found! If pkg-config was correct, then it is best\n");
+ printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
+ printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
+ printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+ printf("*** required on your system.\n");
+ printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+ printf("*** to point to the correct configuration files\n");
+ }
+ else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
+ (glib_minor_version != GLIB_MINOR_VERSION) ||
+ (glib_micro_version != GLIB_MICRO_VERSION))
+ {
+ printf("*** GLib header files (version %d.%d.%d) do not match\n",
+ GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
+ printf("*** library (version %d.%d.%d)\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ }
+ else
+ {
+ if ((glib_major_version > major) ||
+ ((glib_major_version == major) && (glib_minor_version > minor)) ||
+ ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
+ {
+ return 0;
+ }
+ else
+ {
+ printf("\n*** An old version of GLib (%u.%u.%u) was found.\n",
+ glib_major_version, glib_minor_version, glib_micro_version);
+ printf("*** You need a version of GLib newer than %u.%u.%u. The latest version of\n",
+ major, minor, micro);
+ printf("*** GLib is always available from ftp://ftp.gtk.org.\n");
+ printf("***\n");
+ printf("*** If you have already installed a sufficiently new version, this error\n");
+ printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+ printf("*** being found. The easiest way to fix this is to remove the old version\n");
+ printf("*** of GLib, but you can also set the PKG_CONFIG environment to point to the\n");
+ printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+ printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
+ printf("*** so that the correct libraries are found at run-time))\n");
+ }
+ }
+ return 1;
+}
+]])],[],[no_glib=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ if test "x$no_glib" = x ; then
+ AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
+ ifelse([$2], , :, [$2])
+ else
+ AC_MSG_RESULT(no)
+ if test "$PKG_CONFIG" = "no" ; then
+ echo "*** A new enough version of pkg-config was not found."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig/"
+ else
+ if test -f conf.glibtest ; then
+ :
+ else
+ echo "*** Could not run GLib test program, checking why..."
+ ac_save_CFLAGS="$CFLAGS"
+ ac_save_LIBS="$LIBS"
+ CFLAGS="$CFLAGS $GLIB_CFLAGS"
+ LIBS="$LIBS $GLIB_LIBS"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <glib.h>
+#include <stdio.h>
+]], [[ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ]])],
+ [ echo "*** The test program compiled, but did not run. This usually means"
+ echo "*** that the run-time linker is not finding GLib or finding the wrong"
+ echo "*** version of GLib. If it is not finding GLib, you'll need to set your"
+ echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+ echo "*** to the installed location Also, make sure you have run ldconfig if that"
+ echo "*** is required on your system"
+ echo "***"
+ echo "*** If you have an old version installed, it is best to remove it, although"
+ echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+ [ echo "*** The test program failed to compile or link. See the file config.log for the"
+ echo "*** exact error that occurred. This usually means GLib is incorrectly installed."])
+ CFLAGS="$ac_save_CFLAGS"
+ LIBS="$ac_save_LIBS"
+ fi
+ fi
+ GLIB_CFLAGS=""
+ GLIB_LIBS=""
+ GLIB_GENMARSHAL=""
+ GOBJECT_QUERY=""
+ GLIB_MKENUMS=""
+ GLIB_COMPILE_RESOURCES=""
+ ifelse([$3], , :, [$3])
+ fi
+ rm -f conf.glibtest
+])
diff -Naur a/m4macros/glib-2.0.m4 b/m4macros/glib-2.0.m4
--- a/m4macros/glib-2.0.m4 2021-08-19 21:27:25.805341000 +0600
+++ b/m4macros/glib-2.0.m4 1970-01-01 06:00:00.000000000 +0600
@@ -1,215 +0,0 @@
-# Configure paths for GLIB
-# Owen Taylor 1997-2001
-
-# Increment this whenever this file is changed.
-#serial 4
-
-dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
-dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject,
-dnl gthread, or gio is specified in MODULES, pass to pkg-config
-dnl
-AC_DEFUN([AM_PATH_GLIB_2_0],
-[dnl
-dnl Get the cflags and libraries from pkg-config
-dnl
-
-dnl We can't use PKG_PREREQ because that needs 0.29.
-m4_ifndef([PKG_PROG_PKG_CONFIG],
- [pkg.m4 version 0.28 or later is required])
-
-AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program],
- , enable_glibtest=yes)
-
- min_glib_version=ifelse([$1], [], [2.0.0], [$1])
- pkg_config_args="glib-2.0 >= $min_glib_version"
- for module in . $4
- do
- case "$module" in
- gmodule)
- pkg_config_args="$pkg_config_args gmodule-2.0"
- ;;
- gmodule-no-export)
- pkg_config_args="$pkg_config_args gmodule-no-export-2.0"
- ;;
- gobject)
- pkg_config_args="$pkg_config_args gobject-2.0"
- ;;
- gthread)
- pkg_config_args="$pkg_config_args gthread-2.0"
- ;;
- gio*)
- pkg_config_args="$pkg_config_args $module-2.0"
- ;;
- esac
- done
-
- PKG_PROG_PKG_CONFIG([0.16])
-
- no_glib=""
-
- if test "x$PKG_CONFIG" = x ; then
- no_glib=yes
- PKG_CONFIG=no
- fi
-
- dnl For GLIB_CFLAGS and GLIB_LIBS
- PKG_CHECK_MODULES([GLIB], [$pkg_config_args], [:], [:])
-
- dnl For the tools
- PKG_CHECK_VAR([GLIB_GENMARSHAL], [glib-2.0], [glib_genmarshal])
- PKG_CHECK_VAR([GOBJECT_QUERY], [glib-2.0], [gobject_query])
- PKG_CHECK_VAR([GLIB_MKENUMS], [glib-2.0], [glib_mkenums])
- PKG_CHECK_VAR([GLIB_COMPILE_RESOURCES], [gio-2.0], [glib_compile_resources])
-
- AC_MSG_CHECKING(for GLIB - version >= $min_glib_version)
-
- if test x$PKG_CONFIG != xno ; then
- ## don't try to run the test against uninstalled libtool libs
- if $PKG_CONFIG --uninstalled $pkg_config_args; then
- echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH"
- enable_glibtest=no
- fi
-
- if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then
- :
- else
- no_glib=yes
- fi
- fi
-
- if test x"$no_glib" = x ; then
- glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
- glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
- glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \
- sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
- if test "x$enable_glibtest" = "xyes" ; then
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
- LIBS="$GLIB_LIBS $LIBS"
-dnl
-dnl Now check if the installed GLib is sufficiently new. (Also sanity
-dnl checks the results of pkg-config to some extent)
-dnl
- rm -f conf.glibtest
- AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include <glib.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-int
-main (void)
-{
- unsigned int major, minor, micro;
-
- fclose (fopen ("conf.glibtest", "w"));
-
- if (sscanf("$min_glib_version", "%u.%u.%u", &major, &minor, &micro) != 3) {
- printf("%s, bad version string\n", "$min_glib_version");
- exit(1);
- }
-
- if ((glib_major_version != $glib_config_major_version) ||
- (glib_minor_version != $glib_config_minor_version) ||
- (glib_micro_version != $glib_config_micro_version))
- {
- printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n",
- $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version,
- glib_major_version, glib_minor_version, glib_micro_version);
- printf ("*** was found! If pkg-config was correct, then it is best\n");
- printf ("*** to remove the old version of GLib. You may also be able to fix the error\n");
- printf("*** by modifying your LD_LIBRARY_PATH environment variable, or by editing\n");
- printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
- printf("*** required on your system.\n");
- printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
- printf("*** to point to the correct configuration files\n");
- }
- else if ((glib_major_version != GLIB_MAJOR_VERSION) ||
- (glib_minor_version != GLIB_MINOR_VERSION) ||
- (glib_micro_version != GLIB_MICRO_VERSION))
- {
- printf("*** GLib header files (version %d.%d.%d) do not match\n",
- GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION);
- printf("*** library (version %d.%d.%d)\n",
- glib_major_version, glib_minor_version, glib_micro_version);
- }
- else
- {
- if ((glib_major_version > major) ||
- ((glib_major_version == major) && (glib_minor_version > minor)) ||
- ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro)))
- {
- return 0;
- }
- else
- {
- printf("\n*** An old version of GLib (%u.%u.%u) was found.\n",
- glib_major_version, glib_minor_version, glib_micro_version);
- printf("*** You need a version of GLib newer than %u.%u.%u. The latest version of\n",
- major, minor, micro);
- printf("*** GLib is always available from ftp://ftp.gtk.org.\n");
- printf("***\n");
- printf("*** If you have already installed a sufficiently new version, this error\n");
- printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
- printf("*** being found. The easiest way to fix this is to remove the old version\n");
- printf("*** of GLib, but you can also set the PKG_CONFIG environment to point to the\n");
- printf("*** correct copy of pkg-config. (In this case, you will have to\n");
- printf("*** modify your LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf\n");
- printf("*** so that the correct libraries are found at run-time))\n");
- }
- }
- return 1;
-}
-]])],[],[no_glib=yes],[echo $ac_n "cross compiling; assumed OK... $ac_c"])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- if test "x$no_glib" = x ; then
- AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version))
- ifelse([$2], , :, [$2])
- else
- AC_MSG_RESULT(no)
- if test "$PKG_CONFIG" = "no" ; then
- echo "*** A new enough version of pkg-config was not found."
- echo "*** See http://www.freedesktop.org/software/pkgconfig/"
- else
- if test -f conf.glibtest ; then
- :
- else
- echo "*** Could not run GLib test program, checking why..."
- ac_save_CFLAGS="$CFLAGS"
- ac_save_LIBS="$LIBS"
- CFLAGS="$CFLAGS $GLIB_CFLAGS"
- LIBS="$LIBS $GLIB_LIBS"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[
-#include <glib.h>
-#include <stdio.h>
-]], [[ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ]])],
- [ echo "*** The test program compiled, but did not run. This usually means"
- echo "*** that the run-time linker is not finding GLib or finding the wrong"
- echo "*** version of GLib. If it is not finding GLib, you'll need to set your"
- echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
- echo "*** to the installed location Also, make sure you have run ldconfig if that"
- echo "*** is required on your system"
- echo "***"
- echo "*** If you have an old version installed, it is best to remove it, although"
- echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
- [ echo "*** The test program failed to compile or link. See the file config.log for the"
- echo "*** exact error that occurred. This usually means GLib is incorrectly installed."])
- CFLAGS="$ac_save_CFLAGS"
- LIBS="$ac_save_LIBS"
- fi
- fi
- GLIB_CFLAGS=""
- GLIB_LIBS=""
- GLIB_GENMARSHAL=""
- GOBJECT_QUERY=""
- GLIB_MKENUMS=""
- GLIB_COMPILE_RESOURCES=""
- ifelse([$3], , :, [$3])
- fi
- rm -f conf.glibtest
-])
diff -Naur a/m4macros/glib-gettext-2.00.m4 b/m4macros/glib-gettext-2.00.m4
--- a/m4macros/glib-gettext-2.00.m4 1970-01-01 06:00:00.000000000 +0600
+++ b/m4macros/glib-gettext-2.00.m4 2021-08-19 21:27:25.805341000 +0600
@@ -0,0 +1,486 @@
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
+#
+# Modified to never use included libintl.
+# Owen Taylor <otaylor@redhat.com>, 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor <otaylor@redhat.com>, 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+#
+# Modified to require ngettext
+# Matthias Clasen <mclasen@redhat.com> 08/06/2004
+
+# Increment this whenever this file is changed.
+#serial 1
+
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
+
+dnl
+dnl We go to great lengths to make sure that aclocal won't
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
+
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+ [AC_CHECK_HEADERS([locale.h])
+ if test $ac_cv_header_locale_h = yes; then
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+ fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ /*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$ac_word; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word"
+ break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+dnl Checks for special options needed on Mac OS X.
+dnl Defines INTL_MACOSX_LIBS.
+dnl
+dnl Copied from intlmacosx.m4 in gettext, GPL.
+dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
+glib_DEFUN([glib_gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in Mac OS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ [gt_cv_func_CFPreferencesCopyAppValue],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFPreferences.h>]],
+ [[CFPreferencesCopyAppValue(NULL, NULL)]])],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in Mac OS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <CoreFoundation/CFLocale.h>]],
+ [[CFLocaleCopyCurrent();]])],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+ [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+ dnl NLS is obligatory
+ [USE_NLS=yes
+ AC_SUBST(USE_NLS)
+
+ gt_cv_have_gettext=no
+
+ CATOBJEXT=NONE
+ XGETTEXT=:
+ INTLLIBS=
+
+ glib_gt_INTL_MACOSX
+
+ AC_CHECK_HEADER(libintl.h,
+ [gt_cv_func_dgettext_libintl="no"
+ libintl_extra_libs=""
+
+ #
+ # First check in libc
+ #
+ AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+ [AC_TRY_LINK([
+#include <libintl.h>
+],
+ [return !ngettext ("","", 1)],
+ gt_cv_func_ngettext_libc=yes,
+ gt_cv_func_ngettext_libc=no)
+ ])
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+ [AC_TRY_LINK([
+#include <libintl.h>
+],
+ [return !dgettext ("","")],
+ gt_cv_func_dgettext_libc=yes,
+ gt_cv_func_dgettext_libc=no)
+ ])
+ fi
+
+ if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ fi
+
+ #
+ # If we don't have everything we want, check in libintl
+ #
+ if test "$gt_cv_func_dgettext_libc" != "yes" \
+ || test "$gt_cv_func_ngettext_libc" != "yes" \
+ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+ AC_CHECK_LIB(intl, bindtextdomain,
+ [AC_CHECK_LIB(intl, ngettext,
+ [AC_CHECK_LIB(intl, dgettext,
+ gt_cv_func_dgettext_libintl=yes)])])
+
+ if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+ AC_MSG_CHECKING([if -liconv is needed to use gettext])
+ AC_MSG_RESULT([])
+ AC_CHECK_LIB(intl, ngettext,
+ [AC_CHECK_LIB(intl, dcgettext,
+ [gt_cv_func_dgettext_libintl=yes
+ libintl_extra_libs=-liconv],
+ :,-liconv)],
+ :,-liconv)
+ fi
+
+ #
+ # If we found libintl, then check in it for bind_textdomain_codeset();
+ # we'll prefer libc if neither have bind_textdomain_codeset(),
+ # and both have dgettext and ngettext
+ #
+ if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS -lintl $libintl_extra_libs"
+ unset ac_cv_func_bind_textdomain_codeset
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ LIBS="$glib_save_LIBS"
+
+ if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+ gt_cv_func_dgettext_libc=no
+ else
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ && test "$gt_cv_func_ngettext_libc" = "yes"; then
+ gt_cv_func_dgettext_libintl=no
+ fi
+ fi
+ fi
+ fi
+
+ if test "$gt_cv_func_dgettext_libc" = "yes" \
+ || test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ gt_cv_have_gettext=yes
+ fi
+
+ if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+ INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
+ fi
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ AC_DEFINE(HAVE_GETTEXT,1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+ if test "$MSGFMT" != "no"; then
+ glib_save_LIBS="$LIBS"
+ LIBS="$LIBS $INTLLIBS"
+ AC_CHECK_FUNCS(dcgettext)
+ MSGFMT_OPTS=
+ AC_MSG_CHECKING([if msgfmt accepts -c])
+ GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo@bar.xx>\n"
+"Language-Team: C <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+ AC_SUBST(MSGFMT_OPTS)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+ GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+ AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+ return _nl_msg_cat_cntr],
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [case $host in
+ *-*-solaris*)
+ dnl On Solaris, if bind_textdomain_codeset is in libc,
+ dnl GNU format message catalog is always supported,
+ dnl since both are added to the libc all together.
+ dnl Hence, we'd like to go with DATADIRNAME=share and
+ dnl and CATOBJEXT=.gmo in this case.
+ AC_CHECK_FUNC(bind_textdomain_codeset,
+ [CATOBJEXT=.gmo
+ DATADIRNAME=share],
+ [CATOBJEXT=.mo
+ DATADIRNAME=lib])
+ ;;
+ *-*-openbsd*)
+ CATOBJEXT=.mo
+ DATADIRNAME=share
+ ;;
+ *)
+ CATOBJEXT=.mo
+ DATADIRNAME=lib
+ ;;
+ esac])
+ LIBS="$glib_save_LIBS"
+ INSTOBJEXT=.mo
+ else
+ gt_cv_have_gettext=no
+ fi
+ fi
+ ])
+
+ if test "$gt_cv_have_gettext" = "yes" ; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [always defined to indicate that i18n is enabled])
+ fi
+
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is not GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ fi
+
+ # We need to process the po/ directory.
+ POSUB=po
+
+ AC_OUTPUT_COMMANDS(
+ [case "$CONFIG_FILES" in *po/Makefile.in*)
+ sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+ esac])
+
+ dnl These rules are solely for the distribution goal. While doing this
+ dnl we only have to keep exactly one list of the available catalogs
+ dnl in configure.ac.
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(CATALOGS)
+ AC_SUBST(CATOBJEXT)
+ AC_SUBST(DATADIRNAME)
+ AC_SUBST(GMOFILES)
+ AC_SUBST(INSTOBJEXT)
+ AC_SUBST(INTLLIBS)
+ AC_SUBST(PO_IN_DATADIR_TRUE)
+ AC_SUBST(PO_IN_DATADIR_FALSE)
+ AC_SUBST(POFILES)
+ AC_SUBST(POSUB)
+ ])
+
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by
+# glib-gettextize.
+dnl
+AU_DEFUN([GLIB_GNU_GETTEXT],
+ [AC_REQUIRE([AC_PROG_CC])dnl
+
+ GLIB_LC_MESSAGES
+ GLIB_WITH_NLS
+
+ if test "$gt_cv_have_gettext" = "yes"; then
+ if test "x$ALL_LINGUAS" = "x"; then
+ LINGUAS=
+ else
+ AC_MSG_CHECKING(for catalogs to be installed)
+ NEW_LINGUAS=
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+ fi
+ done
+ LINGUAS=$NEW_LINGUAS
+ AC_MSG_RESULT($LINGUAS)
+ fi
+
+ dnl Construct list of names of catalog files to be constructed.
+ if test -n "$LINGUAS"; then
+ for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+ fi
+ fi
+
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+ dnl Try to locate is.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+
+ dnl Generate list of files to be processed by xgettext which will
+ dnl be included in po/Makefile.
+ test -d po || mkdir po
+ if test "x$srcdir" != "x."; then
+ if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+ posrcprefix="$srcdir/"
+ else
+ posrcprefix="../$srcdir/"
+ fi
+ else
+ posrcprefix="../"
+ fi
+ rm -f po/POTFILES
+ sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+ < $srcdir/po/POTFILES.in > po/POTFILES
+ ],
+ [[$0: This macro is deprecated. You should use upstream gettext instead.]])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+glib_save_datarootdir="$datarootdir"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+datarootdir=`eval echo "${datarootdir}"`
+if test "x$CATOBJEXT" = "x.mo" ; then
+ localedir=`eval echo "${libdir}/locale"`
+else
+ localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+datarootdir="$glib_save_datarootdir"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+ [Define the location where the catalogs will be installed])
+])
+
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_ac,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
+# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
+#
+# Create a temporary file with TEST-FILE as its contents and pass the
+# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
+# 0 and perform ACTION-IF-FAIL for any other exit status.
+AC_DEFUN([GLIB_RUN_PROG],
+[cat >conftest.foo <<_ACEOF
+$2
+_ACEOF
+if AC_RUN_LOG([$1 conftest.foo]); then
+ m4_ifval([$3], [$3], [:])
+m4_ifvaln([$4], [else $4])dnl
+echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
+sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
+fi])
+
diff -Naur a/m4macros/glib-gettext.m4 b/m4macros/glib-gettext.m4
--- a/m4macros/glib-gettext.m4 2021-08-19 21:27:25.805341000 +0600
+++ b/m4macros/glib-gettext.m4 1970-01-01 06:00:00.000000000 +0600
@@ -1,486 +0,0 @@
-# Copyright (C) 1995-2002 Free Software Foundation, Inc.
-# Copyright (C) 2001-2003,2004 Red Hat, Inc.
-#
-# This file is free software, distributed under the terms of the GNU
-# General Public License. As a special exception to the GNU General
-# Public License, this file may be distributed as part of a program
-# that contains a configuration script generated by Autoconf, under
-# the same distribution terms as the rest of that program.
-#
-# This file can be copied and used freely without restrictions. It can
-# be used in projects which are not available under the GNU Public License
-# but which still want to provide support for the GNU gettext functionality.
-#
-# Macro to add for using GNU gettext.
-# Ulrich Drepper <drepper@cygnus.com>, 1995, 1996
-#
-# Modified to never use included libintl.
-# Owen Taylor <otaylor@redhat.com>, 12/15/1998
-#
-# Major rework to remove unused code
-# Owen Taylor <otaylor@redhat.com>, 12/11/2002
-#
-# Added better handling of ALL_LINGUAS from GNU gettext version
-# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
-#
-# Modified to require ngettext
-# Matthias Clasen <mclasen@redhat.com> 08/06/2004
-
-# Increment this whenever this file is changed.
-#serial 1
-
-# We need this here as well, since someone might use autoconf-2.5x
-# to configure GLib then an older version to configure a package
-# using AM_GLIB_GNU_GETTEXT
-AC_PREREQ(2.53)
-
-dnl
-dnl We go to great lengths to make sure that aclocal won't
-dnl try to pull in the installed version of these macros
-dnl when running aclocal in the glib directory.
-dnl
-m4_copy([AC_DEFUN],[glib_DEFUN])
-m4_copy([AC_REQUIRE],[glib_REQUIRE])
-dnl
-dnl At the end, if we're not within glib, we'll define the public
-dnl definitions in terms of our private definitions.
-dnl
-
-# GLIB_LC_MESSAGES
-#--------------------
-glib_DEFUN([GLIB_LC_MESSAGES],
- [AC_CHECK_HEADERS([locale.h])
- if test $ac_cv_header_locale_h = yes; then
- AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
- [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
- am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
- if test $am_cv_val_LC_MESSAGES = yes; then
- AC_DEFINE(HAVE_LC_MESSAGES, 1,
- [Define if your <locale.h> file defines LC_MESSAGES.])
- fi
- fi])
-
-# GLIB_PATH_PROG_WITH_TEST
-#----------------------------
-dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
-dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
-glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
-[# Extract the first word of "$2", so it can be a program name with args.
-set dummy $2; ac_word=[$]2
-AC_MSG_CHECKING([for $ac_word])
-AC_CACHE_VAL(ac_cv_path_$1,
-[case "[$]$1" in
- /*)
- ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
- ;;
- *)
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
- for ac_dir in ifelse([$5], , $PATH, [$5]); do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if [$3]; then
- ac_cv_path_$1="$ac_dir/$ac_word"
- break
- fi
- fi
- done
- IFS="$ac_save_ifs"
-dnl If no 4th arg is given, leave the cache variable unset,
-dnl so AC_PATH_PROGS will keep looking.
-ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
-])dnl
- ;;
-esac])dnl
-$1="$ac_cv_path_$1"
-if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
- AC_MSG_RESULT([$]$1)
-else
- AC_MSG_RESULT(no)
-fi
-AC_SUBST($1)dnl
-])
-
-dnl Checks for special options needed on Mac OS X.
-dnl Defines INTL_MACOSX_LIBS.
-dnl
-dnl Copied from intlmacosx.m4 in gettext, GPL.
-dnl Copyright (C) 2004-2013 Free Software Foundation, Inc.
-glib_DEFUN([glib_gt_INTL_MACOSX],
-[
- dnl Check for API introduced in Mac OS X 10.2.
- AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
- [gt_cv_func_CFPreferencesCopyAppValue],
- [gt_save_LIBS="$LIBS"
- LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <CoreFoundation/CFPreferences.h>]],
- [[CFPreferencesCopyAppValue(NULL, NULL)]])],
- [gt_cv_func_CFPreferencesCopyAppValue=yes],
- [gt_cv_func_CFPreferencesCopyAppValue=no])
- LIBS="$gt_save_LIBS"])
- if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
- AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
- [Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
- fi
- dnl Check for API introduced in Mac OS X 10.3.
- AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
- [gt_save_LIBS="$LIBS"
- LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
- AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <CoreFoundation/CFLocale.h>]],
- [[CFLocaleCopyCurrent();]])],
- [gt_cv_func_CFLocaleCopyCurrent=yes],
- [gt_cv_func_CFLocaleCopyCurrent=no])
- LIBS="$gt_save_LIBS"])
- if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
- AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
- [Define to 1 if you have the Mac OS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
- fi
- INTL_MACOSX_LIBS=
- if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
- INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
- fi
- AC_SUBST([INTL_MACOSX_LIBS])
-])
-
-# GLIB_WITH_NLS
-#-----------------
-glib_DEFUN([GLIB_WITH_NLS],
- dnl NLS is obligatory
- [USE_NLS=yes
- AC_SUBST(USE_NLS)
-
- gt_cv_have_gettext=no
-
- CATOBJEXT=NONE
- XGETTEXT=:
- INTLLIBS=
-
- glib_gt_INTL_MACOSX
-
- AC_CHECK_HEADER(libintl.h,
- [gt_cv_func_dgettext_libintl="no"
- libintl_extra_libs=""
-
- #
- # First check in libc
- #
- AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
- [AC_TRY_LINK([
-#include <libintl.h>
-],
- [return !ngettext ("","", 1)],
- gt_cv_func_ngettext_libc=yes,
- gt_cv_func_ngettext_libc=no)
- ])
-
- if test "$gt_cv_func_ngettext_libc" = "yes" ; then
- AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
- [AC_TRY_LINK([
-#include <libintl.h>
-],
- [return !dgettext ("","")],
- gt_cv_func_dgettext_libc=yes,
- gt_cv_func_dgettext_libc=no)
- ])
- fi
-
- if test "$gt_cv_func_ngettext_libc" = "yes" ; then
- AC_CHECK_FUNCS(bind_textdomain_codeset)
- fi
-
- #
- # If we don't have everything we want, check in libintl
- #
- if test "$gt_cv_func_dgettext_libc" != "yes" \
- || test "$gt_cv_func_ngettext_libc" != "yes" \
- || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
-
- AC_CHECK_LIB(intl, bindtextdomain,
- [AC_CHECK_LIB(intl, ngettext,
- [AC_CHECK_LIB(intl, dgettext,
- gt_cv_func_dgettext_libintl=yes)])])
-
- if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
- AC_MSG_CHECKING([if -liconv is needed to use gettext])
- AC_MSG_RESULT([])
- AC_CHECK_LIB(intl, ngettext,
- [AC_CHECK_LIB(intl, dcgettext,
- [gt_cv_func_dgettext_libintl=yes
- libintl_extra_libs=-liconv],
- :,-liconv)],
- :,-liconv)
- fi
-
- #
- # If we found libintl, then check in it for bind_textdomain_codeset();
- # we'll prefer libc if neither have bind_textdomain_codeset(),
- # and both have dgettext and ngettext
- #
- if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
- glib_save_LIBS="$LIBS"
- LIBS="$LIBS -lintl $libintl_extra_libs"
- unset ac_cv_func_bind_textdomain_codeset
- AC_CHECK_FUNCS(bind_textdomain_codeset)
- LIBS="$glib_save_LIBS"
-
- if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
- gt_cv_func_dgettext_libc=no
- else
- if test "$gt_cv_func_dgettext_libc" = "yes" \
- && test "$gt_cv_func_ngettext_libc" = "yes"; then
- gt_cv_func_dgettext_libintl=no
- fi
- fi
- fi
- fi
-
- if test "$gt_cv_func_dgettext_libc" = "yes" \
- || test "$gt_cv_func_dgettext_libintl" = "yes"; then
- gt_cv_have_gettext=yes
- fi
-
- if test "$gt_cv_func_dgettext_libintl" = "yes"; then
- INTLLIBS="-lintl $libintl_extra_libs $INTL_MACOSX_LIBS"
- fi
-
- if test "$gt_cv_have_gettext" = "yes"; then
- AC_DEFINE(HAVE_GETTEXT,1,
- [Define if the GNU gettext() function is already present or preinstalled.])
- GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
- if test "$MSGFMT" != "no"; then
- glib_save_LIBS="$LIBS"
- LIBS="$LIBS $INTLLIBS"
- AC_CHECK_FUNCS(dcgettext)
- MSGFMT_OPTS=
- AC_MSG_CHECKING([if msgfmt accepts -c])
- GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
-msgid ""
-msgstr ""
-"Content-Type: text/plain; charset=UTF-8\n"
-"Project-Id-Version: test 1.0\n"
-"PO-Revision-Date: 2007-02-15 12:01+0100\n"
-"Last-Translator: test <foo@bar.xx>\n"
-"Language-Team: C <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Transfer-Encoding: 8bit\n"
-], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
- AC_SUBST(MSGFMT_OPTS)
- AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
- GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
- [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
- AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
- return _nl_msg_cat_cntr],
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [case $host in
- *-*-solaris*)
- dnl On Solaris, if bind_textdomain_codeset is in libc,
- dnl GNU format message catalog is always supported,
- dnl since both are added to the libc all together.
- dnl Hence, we'd like to go with DATADIRNAME=share and
- dnl and CATOBJEXT=.gmo in this case.
- AC_CHECK_FUNC(bind_textdomain_codeset,
- [CATOBJEXT=.gmo
- DATADIRNAME=share],
- [CATOBJEXT=.mo
- DATADIRNAME=lib])
- ;;
- *-*-openbsd*)
- CATOBJEXT=.mo
- DATADIRNAME=share
- ;;
- *)
- CATOBJEXT=.mo
- DATADIRNAME=lib
- ;;
- esac])
- LIBS="$glib_save_LIBS"
- INSTOBJEXT=.mo
- else
- gt_cv_have_gettext=no
- fi
- fi
- ])
-
- if test "$gt_cv_have_gettext" = "yes" ; then
- AC_DEFINE(ENABLE_NLS, 1,
- [always defined to indicate that i18n is enabled])
- fi
-
- dnl Test whether we really found GNU xgettext.
- if test "$XGETTEXT" != ":"; then
- dnl If it is not GNU xgettext we define it as : so that the
- dnl Makefiles still can work.
- if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
- : ;
- else
- AC_MSG_RESULT(
- [found xgettext program is not GNU xgettext; ignore it])
- XGETTEXT=":"
- fi
- fi
-
- # We need to process the po/ directory.
- POSUB=po
-
- AC_OUTPUT_COMMANDS(
- [case "$CONFIG_FILES" in *po/Makefile.in*)
- sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
- esac])
-
- dnl These rules are solely for the distribution goal. While doing this
- dnl we only have to keep exactly one list of the available catalogs
- dnl in configure.ac.
- for lang in $ALL_LINGUAS; do
- GMOFILES="$GMOFILES $lang.gmo"
- POFILES="$POFILES $lang.po"
- done
-
- dnl Make all variables we use known to autoconf.
- AC_SUBST(CATALOGS)
- AC_SUBST(CATOBJEXT)
- AC_SUBST(DATADIRNAME)
- AC_SUBST(GMOFILES)
- AC_SUBST(INSTOBJEXT)
- AC_SUBST(INTLLIBS)
- AC_SUBST(PO_IN_DATADIR_TRUE)
- AC_SUBST(PO_IN_DATADIR_FALSE)
- AC_SUBST(POFILES)
- AC_SUBST(POSUB)
- ])
-
-# AM_GLIB_GNU_GETTEXT
-# -------------------
-# Do checks necessary for use of gettext. If a suitable implementation
-# of gettext is found in either in libintl or in the C library,
-# it will set INTLLIBS to the libraries needed for use of gettext
-# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
-# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
-# on various variables needed by the Makefile.in.in installed by
-# glib-gettextize.
-dnl
-AU_DEFUN([GLIB_GNU_GETTEXT],
- [AC_REQUIRE([AC_PROG_CC])dnl
-
- GLIB_LC_MESSAGES
- GLIB_WITH_NLS
-
- if test "$gt_cv_have_gettext" = "yes"; then
- if test "x$ALL_LINGUAS" = "x"; then
- LINGUAS=
- else
- AC_MSG_CHECKING(for catalogs to be installed)
- NEW_LINGUAS=
- for presentlang in $ALL_LINGUAS; do
- useit=no
- if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
- desiredlanguages="$LINGUAS"
- else
- desiredlanguages="$ALL_LINGUAS"
- fi
- for desiredlang in $desiredlanguages; do
- # Use the presentlang catalog if desiredlang is
- # a. equal to presentlang, or
- # b. a variant of presentlang (because in this case,
- # presentlang can be used as a fallback for messages
- # which are not translated in the desiredlang catalog).
- case "$desiredlang" in
- "$presentlang"*) useit=yes;;
- esac
- done
- if test $useit = yes; then
- NEW_LINGUAS="$NEW_LINGUAS $presentlang"
- fi
- done
- LINGUAS=$NEW_LINGUAS
- AC_MSG_RESULT($LINGUAS)
- fi
-
- dnl Construct list of names of catalog files to be constructed.
- if test -n "$LINGUAS"; then
- for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
- fi
- fi
-
- dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
- dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
- dnl Try to locate is.
- MKINSTALLDIRS=
- if test -n "$ac_aux_dir"; then
- MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
- fi
- if test -z "$MKINSTALLDIRS"; then
- MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
- fi
- AC_SUBST(MKINSTALLDIRS)
-
- dnl Generate list of files to be processed by xgettext which will
- dnl be included in po/Makefile.
- test -d po || mkdir po
- if test "x$srcdir" != "x."; then
- if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
- posrcprefix="$srcdir/"
- else
- posrcprefix="../$srcdir/"
- fi
- else
- posrcprefix="../"
- fi
- rm -f po/POTFILES
- sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
- < $srcdir/po/POTFILES.in > po/POTFILES
- ],
- [[$0: This macro is deprecated. You should use upstream gettext instead.]])
-
-# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
-# -------------------------------
-# Define VARIABLE to the location where catalog files will
-# be installed by po/Makefile.
-glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
-[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
-glib_save_prefix="$prefix"
-glib_save_exec_prefix="$exec_prefix"
-glib_save_datarootdir="$datarootdir"
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-test "x$exec_prefix" = xNONE && exec_prefix=$prefix
-datarootdir=`eval echo "${datarootdir}"`
-if test "x$CATOBJEXT" = "x.mo" ; then
- localedir=`eval echo "${libdir}/locale"`
-else
- localedir=`eval echo "${datadir}/locale"`
-fi
-prefix="$glib_save_prefix"
-exec_prefix="$glib_save_exec_prefix"
-datarootdir="$glib_save_datarootdir"
-AC_DEFINE_UNQUOTED($1, "$localedir",
- [Define the location where the catalogs will be installed])
-])
-
-dnl
-dnl Now the definitions that aclocal will find
-dnl
-ifdef(glib_configure_ac,[],[
-AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
-AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
-])dnl
-
-# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
-#
-# Create a temporary file with TEST-FILE as its contents and pass the
-# file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with
-# 0 and perform ACTION-IF-FAIL for any other exit status.
-AC_DEFUN([GLIB_RUN_PROG],
-[cat >conftest.foo <<_ACEOF
-$2
-_ACEOF
-if AC_RUN_LOG([$1 conftest.foo]); then
- m4_ifval([$3], [$3], [:])
-m4_ifvaln([$4], [else $4])dnl
-echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
-sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
-fi])
-
diff -Naur a/m4macros/gsettings-2.00.m4 b/m4macros/gsettings-2.00.m4
--- a/m4macros/gsettings-2.00.m4 1970-01-01 06:00:00.000000000 +0600
+++ b/m4macros/gsettings-2.00.m4 2024-06-20 09:44:11.288183349 +0600
@@ -0,0 +1,88 @@
+# Increment this whenever this file is changed.
+#serial 2
+
+dnl GLIB_GSETTINGS
+dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
+dnl the schema should be compiled
+dnl
+
+AC_DEFUN([GLIB_GSETTINGS],
+[
+ dnl We can't use PKG_PREREQ because that needs 0.29.
+ m4_ifndef([PKG_PROG_PKG_CONFIG],
+ [pkg.m4 version 0.28 or later is required])
+
+ m4_pattern_allow([AM_V_GEN])
+ AC_ARG_ENABLE(schemas-compile,
+ AS_HELP_STRING([--disable-schemas-compile],
+ [Disable regeneration of gschemas.compiled on install]),
+ [case ${enableval} in
+ yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
+ no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
+ *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
+ esac])
+ AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
+ PKG_PROG_PKG_CONFIG([0.16])
+ AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.00/schemas])
+ AS_IF([test x$cross_compiling != xyes],
+ [PKG_CHECK_VAR([GLIB_COMPILE_SCHEMAS], [gio-2.00], [glib_compile_schemas])],
+ [AC_PATH_PROG([GLIB_COMPILE_SCHEMAS], [glib-compile-schemas])])
+ AC_SUBST(GLIB_COMPILE_SCHEMAS)
+ if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
+ ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
+ else
+ ifelse([$1],,[:],[$1])
+ fi
+
+ GSETTINGS_RULES='
+.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
+
+mostlyclean-am: clean-gsettings-schemas
+
+gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
+
+%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
+ $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
+
+all-am: $(gsettings_SCHEMAS:.xml=.valid)
+uninstall-am: uninstall-gsettings-schemas
+install-data-am: install-gsettings-schemas
+
+.SECONDARY: $(gsettings_SCHEMAS)
+
+install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
+ @$(NORMAL_INSTALL)
+ if test -n "$^"; then \
+ test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
+ $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
+ test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
+ fi
+
+uninstall-gsettings-schemas:
+ @$(NORMAL_UNINSTALL)
+ @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
+ test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
+
+clean-gsettings-schemas:
+ rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
+
+ifdef gsettings_ENUM_NAMESPACE
+$(gsettings__enum_file): $(gsettings_ENUM_FILES)
+ $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
+endif
+'
+ _GSETTINGS_SUBST(GSETTINGS_RULES)
+])
+
+dnl _GSETTINGS_SUBST(VARIABLE)
+dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
+AC_DEFUN([_GSETTINGS_SUBST],
+[
+AC_SUBST([$1])
+m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
+]
+)
diff -Naur a/m4macros/gsettings.m4 b/m4macros/gsettings.m4
--- a/m4macros/gsettings.m4 2021-08-19 21:27:25.805341000 +0600
+++ b/m4macros/gsettings.m4 1970-01-01 06:00:00.000000000 +0600
@@ -1,88 +0,0 @@
-# Increment this whenever this file is changed.
-#serial 2
-
-dnl GLIB_GSETTINGS
-dnl Defines GSETTINGS_SCHEMAS_INSTALL which controls whether
-dnl the schema should be compiled
-dnl
-
-AC_DEFUN([GLIB_GSETTINGS],
-[
- dnl We can't use PKG_PREREQ because that needs 0.29.
- m4_ifndef([PKG_PROG_PKG_CONFIG],
- [pkg.m4 version 0.28 or later is required])
-
- m4_pattern_allow([AM_V_GEN])
- AC_ARG_ENABLE(schemas-compile,
- AS_HELP_STRING([--disable-schemas-compile],
- [Disable regeneration of gschemas.compiled on install]),
- [case ${enableval} in
- yes) GSETTINGS_DISABLE_SCHEMAS_COMPILE="" ;;
- no) GSETTINGS_DISABLE_SCHEMAS_COMPILE="1" ;;
- *) AC_MSG_ERROR([bad value ${enableval} for --enable-schemas-compile]) ;;
- esac])
- AC_SUBST([GSETTINGS_DISABLE_SCHEMAS_COMPILE])
- PKG_PROG_PKG_CONFIG([0.16])
- AC_SUBST(gsettingsschemadir, [${datadir}/glib-2.0/schemas])
- AS_IF([test x$cross_compiling != xyes],
- [PKG_CHECK_VAR([GLIB_COMPILE_SCHEMAS], [gio-2.0], [glib_compile_schemas])],
- [AC_PATH_PROG([GLIB_COMPILE_SCHEMAS], [glib-compile-schemas])])
- AC_SUBST(GLIB_COMPILE_SCHEMAS)
- if test "x$GLIB_COMPILE_SCHEMAS" = "x"; then
- ifelse([$2],,[AC_MSG_ERROR([glib-compile-schemas not found.])],[$2])
- else
- ifelse([$1],,[:],[$1])
- fi
-
- GSETTINGS_RULES='
-.PHONY : uninstall-gsettings-schemas install-gsettings-schemas clean-gsettings-schemas
-
-mostlyclean-am: clean-gsettings-schemas
-
-gsettings__enum_file = $(addsuffix .enums.xml,$(gsettings_ENUM_NAMESPACE))
-
-%.gschema.valid: %.gschema.xml $(gsettings__enum_file)
- $(AM_V_GEN) $(GLIB_COMPILE_SCHEMAS) --strict --dry-run $(addprefix --schema-file=,$(gsettings__enum_file)) --schema-file=$< && mkdir -p [$](@D) && touch [$]@
-
-all-am: $(gsettings_SCHEMAS:.xml=.valid)
-uninstall-am: uninstall-gsettings-schemas
-install-data-am: install-gsettings-schemas
-
-.SECONDARY: $(gsettings_SCHEMAS)
-
-install-gsettings-schemas: $(gsettings_SCHEMAS) $(gsettings__enum_file)
- @$(NORMAL_INSTALL)
- if test -n "$^"; then \
- test -z "$(gsettingsschemadir)" || $(MKDIR_P) "$(DESTDIR)$(gsettingsschemadir)"; \
- $(INSTALL_DATA) $^ "$(DESTDIR)$(gsettingsschemadir)"; \
- test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir); \
- fi
-
-uninstall-gsettings-schemas:
- @$(NORMAL_UNINSTALL)
- @list='\''$(gsettings_SCHEMAS) $(gsettings__enum_file)'\''; test -n "$(gsettingsschemadir)" || list=; \
- files=`for p in $$list; do echo $$p; done | sed -e '\''s|^.*/||'\''`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '\''$(DESTDIR)$(gsettingsschemadir)'\'' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(gsettingsschemadir)" && rm -f $$files
- test -n "$(GSETTINGS_DISABLE_SCHEMAS_COMPILE)$(DESTDIR)" || $(GLIB_COMPILE_SCHEMAS) $(gsettingsschemadir)
-
-clean-gsettings-schemas:
- rm -f $(gsettings_SCHEMAS:.xml=.valid) $(gsettings__enum_file)
-
-ifdef gsettings_ENUM_NAMESPACE
-$(gsettings__enum_file): $(gsettings_ENUM_FILES)
- $(AM_V_GEN) glib-mkenums --comments '\''<!-- @comment@ -->'\'' --fhead "<schemalist>" --vhead " <@type@ id='\''$(gsettings_ENUM_NAMESPACE).@EnumName@'\''>" --vprod " <value nick='\''@valuenick@'\'' value='\''@valuenum@'\''/>" --vtail " </@type@>" --ftail "</schemalist>" [$]^ > [$]@.tmp && mv [$]@.tmp [$]@
-endif
-'
- _GSETTINGS_SUBST(GSETTINGS_RULES)
-])
-
-dnl _GSETTINGS_SUBST(VARIABLE)
-dnl Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
-AC_DEFUN([_GSETTINGS_SUBST],
-[
-AC_SUBST([$1])
-m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
-]
-)
diff -Naur a/meson.build b/meson.build
--- a/meson.build 2021-08-19 21:27:25.806341000 +0600
+++ b/meson.build 2024-06-20 10:30:45.898377006 +0600
@@ -71,7 +71,7 @@
glib_libdir = join_paths(glib_prefix, get_option('libdir'))
glib_libexecdir = join_paths(glib_prefix, get_option('libexecdir'))
glib_datadir = join_paths(glib_prefix, get_option('datadir'))
-glib_pkgdatadir = join_paths(glib_datadir, 'glib-2.0')
+glib_pkgdatadir = join_paths(glib_datadir, 'glib-2.00')
glib_includedir = join_paths(glib_prefix, get_option('includedir'))
if get_option('gio_module_dir') != ''
glib_giomodulesdir = join_paths(glib_prefix, get_option('gio_module_dir'))
@@ -129,10 +129,10 @@
glib_conf.set('GLIB_MICRO_VERSION', micro_version)
glib_conf.set('GLIB_INTERFACE_AGE', interface_age)
glib_conf.set('GLIB_BINARY_AGE', binary_age)
-glib_conf.set_quoted('GETTEXT_PACKAGE', 'glib20')
+glib_conf.set_quoted('GETTEXT_PACKAGE', 'glib200')
glib_conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/glib/issues/new')
glib_conf.set_quoted('PACKAGE_NAME', 'glib')
-glib_conf.set_quoted('PACKAGE_STRING', 'glib @0@'.format(meson.project_version()))
+glib_conf.set_quoted('PACKAGE_STRING', 'glib @00@'.format(meson.project_version()))
glib_conf.set_quoted('PACKAGE_TARNAME', 'glib')
glib_conf.set_quoted('PACKAGE_URL', '')
glib_conf.set_quoted('PACKAGE_VERSION', meson.project_version())
@@ -2356,20 +2356,20 @@
endif
# Install m4 macros that other projects use
-install_data('m4macros/glib-2.0.m4', 'm4macros/glib-gettext.m4', 'm4macros/gsettings.m4',
+install_data('m4macros/glib-2.00.m4', 'm4macros/glib-gettext-2.00.m4', 'm4macros/gsettings-2.00.m4',
install_dir : join_paths(get_option('datadir'), 'aclocal'))
if host_system != 'windows'
# Install Valgrind suppression file (except on Windows,
# as Valgrind is currently not supported on Windows)
install_data('glib.supp',
- install_dir : join_paths(get_option('datadir'), 'glib-2.0', 'valgrind'))
+ install_dir : join_paths(get_option('datadir'), 'glib-2.00', 'valgrind'))
endif
configure_file(output : 'config.h', configuration : glib_conf)
if host_system == 'windows'
- install_headers([ 'msvc_recommended_pragmas.h' ], subdir : 'glib-2.0')
+ install_headers([ 'msvc_recommended_pragmas.h' ], subdir : 'glib-2.00')
endif
if get_option('man')
diff -Naur a/po/Makefile.in.in b/po/Makefile.in.in
--- a/po/Makefile.in.in 2021-08-19 21:27:25.806341000 +0600
+++ b/po/Makefile.in.in 2024-06-20 09:44:43.530977685 +0600
@@ -30,7 +30,7 @@
libdir = @libdir@
localedir = $(libdir)/locale
gnulocaledir = $(datadir)/locale
-gettextsrcdir = $(datadir)/glib-2.0/gettext/po
+gettextsrcdir = $(datadir)/glib-2.00/gettext/po
subdir = po
INSTALL = @INSTALL@
diff -Naur a/po/meson.build b/po/meson.build
--- a/po/meson.build 2021-08-19 21:27:25.851341000 +0600
+++ b/po/meson.build 2024-06-20 09:44:23.055108292 +0600
@@ -1,5 +1,5 @@
i18n = import('i18n')
-i18n.gettext('glib20', preset: 'glib')
+i18n.gettext('glib200', preset: 'glib')
install_data('Makefile.in.in', install_dir : glib_pkgdatadir + '/gettext/po')