]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
AC_AUTOCONF_VERSION might contain arbitrary macro names.
authorEric Blake <ebb9@byu.net>
Thu, 10 Apr 2008 19:57:36 +0000 (13:57 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 10 Apr 2008 20:09:18 +0000 (14:09 -0600)
* doc/autoconf.texi (Versioning): Mention problem with expansion.
* tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Adjust test.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
doc/autoconf.texi
tests/tools.at

index 70528e516917bf97fc0cab89291cfac0249ad394..776565c0703879a9d4d2b5c59970ae07861da8ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-04-10  Eric Blake  <ebb9@byu.net>
+
+       AC_AUTOCONF_VERSION might contain arbitrary macro names.
+       * doc/autoconf.texi (Versioning): Mention problem with expansion.
+       * tests/tools.at (autoconf: AC_AUTOCONF_VERSION): Adjust test.
+
 2008-04-09  Slava Sysoltsev <Viatcheslav.Sysoltsev@h-d-gmbh.de>  (tiny change)
 
        Flush buffered output before exit.
index 49ade0f0bddd9310bfe58c54ac4057297b8a1422..8b10387c400fee39723cf5cc1de20bfc5e76806a 100644 (file)
@@ -1839,6 +1839,15 @@ conditional fallbacks based on when a feature was added to Autoconf,
 rather than using @code{AC_PREREQ} to require the newer version of
 Autoconf.  However, remember that the Autoconf philosophy favors feature
 checks over version checks.
+
+You should never expand this macro directly, but instead use
+@samp{m4_defn([AC_AUTOCONF_VERSION])}.  This is because some users might
+have a beta version of Autoconf installed, with arbitrary letters
+included in its version string.  This means it is possible for the
+version string to contain the name of a defined macro, such that
+expanding @code{AC_AUTOCONF_VERSION} would trigger the expansion of that
+macro during rescanning, and change the version string to be different
+than what you intended to check.
 @end defmac
 
 @node Notices
index 7d5de535bcb492f0bd2259a458df2293b7dc5b00..9e136893e37141a572ffab611de06e33d052b4b8 100644 (file)
@@ -483,7 +483,7 @@ AT_SETUP([autoconf: AC_AUTOCONF_VERSION])
 
 AT_DATA([configure.ac],
 [[AC_INIT
-version AC_AUTOCONF_VERSION version
+version m4@&t@_defn([AC_AUTOCONF_VERSION]) version
 AC_OUTPUT
 ]])