]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
autopoint: Diagnose multiple invocations of AM_GNU_GETTEXT_VERSION. master
authorBruno Haible <bruno@clisp.org>
Wed, 5 Nov 2025 14:01:12 +0000 (15:01 +0100)
committerBruno Haible <bruno@clisp.org>
Wed, 5 Nov 2025 14:01:12 +0000 (15:01 +0100)
Reported by Santiago Vila in
<https://lists.gnu.org/archive/html/bug-gettext/2025-11/msg00001.html>.

* gettext-tools/autotools/autopoint.in: Report an error if "$xreq" or "$xver"
consists of more than one line.

gettext-tools/autotools/autopoint.in

index 7bf6ed03dfc28108744d3c2861a1f377af77caa1..8c3733bf40ec59dd87dbf2824daddfefbd55ea44 100644 (file)
@@ -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.