diff options
author | Michał Górny <mgorny@gentoo.org> | 2015-10-16 12:53:55 +0200 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-11-09 13:22:28 -0500 |
commit | 20a53df1adefa75f6175ffc8dc668f145cc06491 (patch) | |
tree | 1be477fa01848677797ebe9bff1fbc88103c3ce5 | |
parent | a8b69e68aa2c96ad8b93822e462719d59d69025a (diff) | |
download | autoconf-20a53df1adefa75f6175ffc8dc668f145cc06491.tar.gz |
autoreconf: Support AM_GNU_GETTEXT_REQUIRE_VERSION
As reported in https://github.com/gentoo/gentoo/pull/163, gettext 0.19.6
supports using AM_GNU_GETTEXT_REQUIRE_VERSION (specifying a *minimum*
required version of gettext) instead of AM_GNU_GETTEXT_VERSION
(which specifies a *fixed* required version of gettext).
Update autoreconf to support both.
* bin/autoreconf.in (autoreconf_current_directory): Check for
AM_GNU_GETTEXT_REQUIRE_VERSION as well as AM_GNU_GETTEXT_VERSION.
Update diagnostics about using AM_GNU_GETTEXT_VERSION but not
AM_GNU_GETTEXT, or vice versa, to match.
* doc/autoconf.texi (autoreconf Invocation): Update to match.
-rw-r--r-- | bin/autoreconf.in | 22 | ||||
-rw-r--r-- | doc/autoconf.texi | 9 |
2 files changed, 18 insertions, 13 deletions
diff --git a/bin/autoreconf.in b/bin/autoreconf.in index ccbd6c47..ec0a12e2 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -414,7 +414,7 @@ sub autoreconf_current_directory ($) s/dnl.*//; $uses_autoconf = 1 if /AC_INIT/; # See below for why we look for gettext here. - $uses_gettext = 1 if /^AM_GNU_GETTEXT_VERSION/; + $uses_gettext = 1 if /^AM_GNU_GETTEXT_(?:REQUIRE_)?VERSION/; } if (!$uses_autoconf) { @@ -442,12 +442,12 @@ sub autoreconf_current_directory ($) # not. I guess that once Gettext move to 2.5x we will be able to, # but in the meanwhile forget it. # - # We can only grep for AM_GNU_GETTEXT_VERSION in configure.ac. You - # might think this approach is naive, and indeed it is, as it - # prevents one to embed AM_GNU_GETTEXT_VERSION in another *.m4, but - # anyway we don't limit the generality, since... that's what - # autopoint does. Actually, it is even more restrictive, as it - # greps for '^AM_GNU_GETTEXT_VERSION('. We did this above, while + # We can only grep for AM_GNU_GETTEXT_(REQUIRE_)?VERSION in configure.ac. + # You might think this approach is naive, and indeed it is, as it prevents + # one to embed AM_GNU_GETTEXT_(REQUIRE_)?VERSION in another *.m4, but + # anyway we don't limit the generality, since... that's what autopoint does. + # Actually, it is even more restrictive, as it greps for + # '^AM_GNU_GETTEXT_(REQUIRE_)?VERSION('. We did this above, while # scanning configure.ac. if (!$uses_gettext) { @@ -611,9 +611,13 @@ sub autoreconf_current_directory ($) } # Gettext consistency checks... - error $configure_ac, "AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION" + error($configure_ac, + "AM_GNU_GETTEXT is used, but not AM_GNU_GETTEXT_VERSION" + . " or AM_GNU_GETTEXT_REQUIRE_VERSION") if $uses_gettext_via_traces && ! $uses_gettext; - error $configure_ac, "AM_GNU_GETTEXT_VERSION is used, but not AM_GNU_GETTEXT" + error($configure_ac, + "AM_GNU_GETTEXT_VERSION or AM_GNU_GETTEXT_REQUIRE_VERSION is used," + . " but not AM_GNU_GETTEXT") if $uses_gettext && ! $uses_gettext_via_traces; diff --git a/doc/autoconf.texi b/doc/autoconf.texi index 69c52e49..b875c25a 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -1706,10 +1706,11 @@ properly, but does not pass @option{--autoconf-dir=@var{dir}} or @cindex @command{autopoint} Gettext supplies the @command{autopoint} command to add translation infrastructure to a source package. If you use @command{autopoint}, -your @file{configure.ac} should invoke both @code{AM_GNU_GETTEXT} and -@code{AM_GNU_GETTEXT_VERSION(@var{gettext-version})}. @xref{autopoint -Invocation, , Invoking the @code{autopoint} Program, gettext, -GNU @code{gettext} utilities}, for further details. +your @file{configure.ac} should invoke @code{AM_GNU_GETTEXT} and +one of @code{AM_GNU_GETTEXT_VERSION(@var{gettext-version})} or +@code{AM_GNU_GETTEXT_REQUIRE_VERSION(@var{min-gettext-version})}. +@xref{autopoint Invocation, , Invoking the @code{autopoint} Program, +gettext, GNU @code{gettext} utilities}, for further details. @noindent @command{autoreconf} accepts the following options: |