summaryrefslogtreecommitdiff
path: root/t/gettext-basics.sh
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-01-12 20:31:31 -0500
committerMike Frysinger <vapier@gentoo.org>2023-01-14 00:07:09 -0500
commitc9479c29f3ed33b25af573fad98b30acd5652a5a (patch)
tree016cf82fe08b0a2dc64a809270eefc73f585090a /t/gettext-basics.sh
parent9067b181acaf3ba111b821709ef4a97413e62cd2 (diff)
downloadautomake-c9479c29f3ed33b25af573fad98b30acd5652a5a.tar.gz
tests: rework gettext to only check 'external' behavior
The gettext project deprecated non-external use back in 2010 with the 0.18 release, and made it fatal with the 0.20 release in 2019. With that version, calling AM_GNU_GETTEXT() fails, which means all Automake tests are now skipped. The t/gettext-macros.sh helper probes gettext as such: >+ autopoint --force > autopoint: *** AM_GNU_GETTEXT without 'external' argument is no longer supported in version 0.21.1 > autopoint: *** Stop. > ... >+ aclocal-1.16 -Werror -Wno-syntax -I m4 --install > aclocal-1.16: warnings are treated as errors > configure.ac:4: warning: macro 'AM_GNU_GETTEXT' not found in library > configure.ac:5: warning: macro 'AM_GNU_GETTEXT_VERSION' not found in library >+ echo skip_all_ "couldn't find or get gettext macros" Since t/gettext-macros.sh generates a helper that all other gettext tests use to see if gettext is available, all they get skipped. Rework our existing tests to only check the 'external' gettext mode. This should work with older versions, and we don't really need to keep track of old non-external mode since it's been deprecated for so long. * t/gettext-basics.sh: Use external gettext mode, and adjust tests. * t/gettext-config-rpath.sh: Likewise. * t/gettext-macros.sh: Likewise. * t/gettext-pr381.sh: Likewise. * t/subdir-cond-gettext.sh: Likewise.
Diffstat (limited to 't/gettext-basics.sh')
-rw-r--r--t/gettext-basics.sh21
1 files changed, 8 insertions, 13 deletions
diff --git a/t/gettext-basics.sh b/t/gettext-basics.sh
index 93fe782f4..cb2101086 100644
--- a/t/gettext-basics.sh
+++ b/t/gettext-basics.sh
@@ -20,7 +20,7 @@ required='gettext'
. test-init.sh
cat >> configure.ac << 'END'
-AM_GNU_GETTEXT
+AM_GNU_GETTEXT([external])
AC_OUTPUT
END
@@ -31,28 +31,23 @@ mkdir po intl
$ACLOCAL
$AUTOCONF
-# po/ and intl/ are required.
+# po/ is required. intl/ may not be used with external gettext.
+# Internal (bundled) was deprecated upstream in gettext 0.18 (2010)
+# and made fatal in gettext 0.20 (2019).
AUTOMAKE_fails --add-missing
grep 'AM_GNU_GETTEXT.*SUBDIRS' stderr
echo 'SUBDIRS = po' >Makefile.am
-AUTOMAKE_fails --add-missing
-grep 'AM_GNU_GETTEXT.*intl' stderr
+# Should not fail.
+$AUTOMAKE --add-missing
echo 'SUBDIRS = intl' >Makefile.am
AUTOMAKE_fails --add-missing
grep 'AM_GNU_GETTEXT.*po' stderr
-# Ok.
-
echo 'SUBDIRS = po intl' >Makefile.am
-$AUTOMAKE --add-missing
-
-# Make sure distcheck runs './configure --with-included-gettext'.
-./configure
-echo distdir: > po/Makefile
-echo distdir: > intl/Makefile
-$MAKE -n distcheck | grep '.*--with-included-gettext'
+AUTOMAKE_fails --add-missing
+grep 'intl.*SUBDIRS.*AM_GNU_GETTEXT' stderr
: