From 0f23092fe8301c65e5765458fa36a53e7f9c5d92 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 5 Nov 2025 15:01:12 +0100 Subject: [PATCH] autopoint: Diagnose multiple invocations of AM_GNU_GETTEXT_VERSION. Reported by Santiago Vila in . * gettext-tools/autotools/autopoint.in: Report an error if "$xreq" or "$xver" consists of more than one line. --- gettext-tools/autotools/autopoint.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gettext-tools/autotools/autopoint.in b/gettext-tools/autotools/autopoint.in index 7bf6ed03d..8c3733bf4 100644 --- a/gettext-tools/autotools/autopoint.in +++ b/gettext-tools/autotools/autopoint.in @@ -341,10 +341,18 @@ func_version_prereq () # If AM_GNU_GETTEXT_REQUIRE_VERSION is used and archive_version is newer than # that, use archive_version. xreq=`func_trace_sed AM_GNU_GETTEXT_REQUIRE_VERSION "$configure_in"` +case "$xreq" in + *' +'*) func_fatal_error "found more than one invocation of AM_GNU_GETTEXT_REQUIRE_VERSION" ;; +esac # Need to use func_trace_sed instead of $func_trace, since # AM_GNU_GETTEXT_VERSION is not a standard Autoconf trace. xver=`func_trace_sed AM_GNU_GETTEXT_VERSION "$configure_in"` +case "$xver" in + *' +'*) func_fatal_error "found more than one invocation of AM_GNU_GETTEXT_VERSION" ;; +esac # Prefer AM_GNU_GETTEXT_REQUIRE_VERSION over AM_GNU_GETTEXT_VERSION if both are # specified. -- 2.47.3