autopoint: Don't fail if no gettext version is specified.

Rationale: https://lists.gnu.org/archive/html/bug-gettext/2025-06/msg00009.html

* gettext-tools/misc/autopoint.in: Instead of failing with "Missing version",
use version 0.23.1. Set omitintl=yes if there is no AM_GNU_GETTEXT invocation.
This commit is contained in:
Bruno Haible 2025-07-01 15:00:27 +02:00
parent 8d373b0656
commit dda9128815

View File

@ -374,7 +374,12 @@ else
fi
if test -z "$ver"; then
func_fatal_error "Missing version: please specify in $configure_in through a line 'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using"
# The $configure_in does not specify an AM_GNU_GETTEXT_VERSION.
# This is OK in two cases:
# - The package uses an old gettext infrastructure (from 2024 or earlier).
# - The package merely uses AM_ICONV, not AM_GNU_GETTEXT.
# Use the last version whose po.m4 is nearly identical to the older ones.
ver=0.23.1
fi
# Check whether the version number is supported.
@ -446,15 +451,20 @@ fi
omitintl=
# Need to use func_trace_sed instead of $func_trace, since
# AM_GNU_GETTEXT is not a standard Autoconf trace.
xargs=`func_trace_sed AM_GNU_GETTEXT "$configure_in"`
save_IFS="$IFS"; IFS=:
for arg in $xargs; do
if test 'external' = "$arg"; then
omitintl=yes
break
fi
done
IFS="$save_IFS"
if test `func_trace_sed AM_GNU_GETTEXT "$configure_in" | wc -l` = 0; then
# No AM_GNU_GETTEXT invocation.
omitintl=yes
else
xargs=`func_trace_sed AM_GNU_GETTEXT "$configure_in"`
save_IFS="$IFS"; IFS=:
for arg in $xargs; do
if test 'external' = "$arg"; then
omitintl=yes
break
fi
done
IFS="$save_IFS"
fi
if test -z "$omitintl"; then
case "$ver" in