From dda91288154a18e7bfa746f55fa50c93198e63b0 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Tue, 1 Jul 2025 15:00:27 +0200 Subject: [PATCH] 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. --- gettext-tools/misc/autopoint.in | 30 ++++++++++++++++++++---------- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in index 451b31396..61348bed6 100644 --- a/gettext-tools/misc/autopoint.in +++ b/gettext-tools/misc/autopoint.in @@ -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 -- 2.47.3