autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: expose m4_PACKAGE_VERSION,m4_version_compare


From: Eric Blake
Subject: Re: expose m4_PACKAGE_VERSION,m4_version_compare
Date: Fri, 12 Oct 2007 18:19:17 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Ralf Wildenhues <Ralf.Wildenhues <at> gmx.de> writes:

> > No comments on this followup patch, so I'm applying it.  Now the only
> > documented way to grab the autoconf version is AC_VERSION (so at some
> > point in the future, automake should be changed to use this instead of the
> > undocumented m4_PACKAGE_VERSION, once it has other dependencies on
> > autoconf 2.62+).
> 
> That logic is a bit off.  It would be nice if older Automake versions
> also continued to work with newer (future) Autoconf versions; we do fix
> issues that we encounter to this extent.  Thus how about applying this
> to Automake HEAD and branch-1-10 so at least 1.10.1+ will continue to
> work even when you kill m4_PACKAGE_VERSION?  This Automake guard can be
> dropped once Automake requires Autoconf 2.62+ anyways, not the other way
> round.

Well, I'm not planning on killing m4_PACKAGE_VERSION any time soon; rather, it 
was pointed out that someday m4sugar might be useful enough on its own to 
migrate into its own package (or bundle with M4 instead of Autoconf), at which 
point using the m4sugar version number is no longer consistent with the 
autoconf version number.

> I would have suggested AC_AUTOCONF_VERSION, because AC_ is really just
> the namespace prefix, and without it, it's not clear what is just being
> versioned.

Here goes.  I'm committing this to autoconf (and again, thanks for the review, 
however belated it was); the adjustments to your automake patch are trivial.

From: Eric Blake <address@hidden>
Date: Fri, 12 Oct 2007 12:14:03 -0600
Subject: [PATCH] s/AC_VERSION/AC_AUTOCONF_VERSION/.

* doc/autoconf.texi (Versioning): Change the name.
* NEWS: Likewise.
* lib/autoconf/general.m4 (AC_AUTOCONF_VERSION): Likewise.
* tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Likewise.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog               |    7 +++++++
 NEWS                    |    5 +++--
 doc/autoconf.texi       |    4 ++--
 lib/autoconf/general.m4 |    6 +++---
 tests/tools.at          |    6 +++---
 5 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c1d5c0d..80567a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2007-10-12  Eric Blake  <address@hidden>
 
+       s/AC_VERSION/AC_AUTOCONF_VERSION/.
+       * doc/autoconf.texi (Versioning): Change the name.
+       * NEWS: Likewise.
+       * lib/autoconf/general.m4 (AC_AUTOCONF_VERSION): Likewise.
+       * tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Likewise.
+       Suggested by Ralf Wildenhues.
+
        Namespace cleanup.
        * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE)
        (_AC_OUTPUT_HEADERS_PREPARE): Convert here-doc delimiters into
diff --git a/NEWS b/NEWS
index 5c0e3c5..f24c585 100644
--- a/NEWS
+++ b/NEWS
@@ -19,7 +19,8 @@ GNU Autoconf NEWS - User visible changes.
    generated by autoconf under the license of your own program.
  FIXME - revisit this line once exception clause is finalized.
 
-** New Autoconf macros AC_OPENMP, AC_PATH_PROGS_FEATURE_CHECK, AC_VERSION.
+** New Autoconf macros:
+   AC_AUTOCONF_VERSION  AC_OPENMP  AC_PATH_PROGS_FEATURE_CHECK
 
 ** AC_C_BIGENDIAN now supports universal binaries a la Mac OS X.
 
@@ -75,7 +76,7 @@ GNU Autoconf NEWS - User visible changes.
 ** Document the m4sugar macros m4_ifndef and m4_version_compare
    (available without documentation since at least autoconf 2.53).
    Packages using the undocumented m4sugar macro m4_PACKAGE_VERSION
-   should consider using the new AC_VERSION instead.
+   should consider using the new AC_AUTOCONF_VERSION instead.
 
 ** Warnings are now generated by default when an installer invokes
    'configure' with an unknown --enable-* or --with-* option.
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 74295b6..f8550a4 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -1792,8 +1792,8 @@ This macro is the only macro that may be used before @code
{AC_INIT}, but
 for consistency, you are invited not to do so.
 @end defmac
 
address@hidden AC_VERSION
address@hidden
address@hidden AC_AUTOCONF_VERSION
address@hidden
 This macro was introduced in Autoconf 2.62.  It identifies the version
 of Autoconf that is currently parsing the input file, in a format
 suitable for @code{m4_version_compare} (@pxref{m4_version_compare}); in
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 1b7a355..b57d887 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -299,10 +299,10 @@ AU_DEFUN([AC_PREREQ],
 m4_copy([m4_version_prereq], [AC_PREREQ])
 
 
-# AC_VERSION
-# ----------
+# AC_AUTOCONF_VERSION
+# -------------------
 # The current version of Autoconf parsing this file.
-m4_copy([m4_PACKAGE_VERSION], [AC_VERSION])
+m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])
 
 
 
diff --git a/tests/tools.at b/tests/tools.at
index e13a737..aca2808 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -405,13 +405,13 @@ AT_CHECK([echo 'AC_INIT(X, 2.0, address@hidden)' | 
autoconf -t AC_INIT -],
 AT_CLEANUP
 
 
-# autoconf: AC_VERSION
+# autoconf: AC_AUTOCONF_VERSION
 # --------------------------------------
-AT_SETUP([autoconf: AC_VERSION])
+AT_SETUP([autoconf: AC_AUTOCONF_VERSION])
 
 AT_DATA([configure.ac],
 [[AC_INIT
-version AC_VERSION version
+version AC_AUTOCONF_VERSION version
 AC_OUTPUT
 ]])
 
-- 
1.5.3.2








reply via email to

[Prev in Thread] Current Thread [Next in Thread]