]> git.ipfire.org Git - thirdparty/automake.git/commit
tests: rework gettext to only check 'external' behavior
authorMike Frysinger <vapier@gentoo.org>
Fri, 13 Jan 2023 01:31:31 +0000 (20:31 -0500)
committerMike Frysinger <vapier@gentoo.org>
Sat, 14 Jan 2023 05:07:09 +0000 (00:07 -0500)
commitc9479c29f3ed33b25af573fad98b30acd5652a5a
tree016cf82fe08b0a2dc64a809270eefc73f585090a
parent9067b181acaf3ba111b821709ef4a97413e62cd2
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.
t/gettext-basics.sh
t/gettext-config-rpath.sh
t/gettext-macros.sh
t/gettext-pr381.sh
t/subdir-cond-gettext.sh