+2007-09-15 Eric Blake <ebb9@byu.net>
+
+ Provide AC_VERSION, not m4_AUTOCONF_VERSION.
+ * doc/autoconf.texi (Text processing Macros): Remove mention of
+ m4_AUTOCONF_VERSION, and leave m4_PACKAGE_VERSION undocumented
+ once again.
+ (Notices): Move AC_PREREQ...
+ (Versioning): ...to this new section, alongside the new AC_VERSION
+ alias for the undocumented m4_PACKAGE_VERSION.
+ * lib/m4sugar/m4sugar.m4 (m4_AUTOCONF_VERSION): Revert change.
+ * lib/autoconf/general.m4 (AC_VERSION): New macro.
+ * NEWS: Update to match this rename.
+ * tests/m4sugar.at (m4@&t@_version_compare): Remove tests of
+ m4_PACKAGE_VERSION.
+ * tests/tools.at (autoconf: AC_VERSION): New test.
+ Suggested by Paolo Bonzini and Benoit Sigoure.
+
2007-09-14 Eric Blake <ebb9@byu.net>
Prepare for conversion to git.
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.
+** New Autoconf macros AC_OPENMP, AC_PATH_PROGS_FEATURE_CHECK, AC_VERSION.
** AC_C_BIGENDIAN now supports universal binaries a la Mac OS X.
Autoconf and Automake. GNU M4 1.4.8 or later is recommended. The
configure search for a working M4 is improved.
-** New m4sugar macro m4_AUTOCONF_VERSION. Also, document the m4sugar macros
- m4_ifndef, m4_version_compare, and m4_PACKAGE_VERSION (available
- without documentation since at least autoconf 2.53), in part so
- that packages can make decisions based on the current version of
- autoconf used to evaluate a given configure.ac. The name
- m4_PACKAGE_VERSION may be marked obsolescent in a future release.
+** 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.
** Warnings are now generated by default when an installer invokes
'configure' with an unknown --enable-* or --with-* option.
Initialization and Output Files
* Initializing configure:: Option processing etc.
+* Versioning:: Dealing with Autoconf versions
* Notices:: Copyright, version numbers in @command{configure}
* Input:: Where Autoconf should find files
* Output:: Outputting results from the configuration
@menu
* Initializing configure:: Option processing etc.
+* Versioning:: Dealing with Autoconf versions
* Notices:: Copyright, version numbers in @command{configure}
* Input:: Where Autoconf should find files
* Output:: Outputting results from the configuration
standard macros like @code{AC_ARG_ENABLE} instead of attempting to
implement your own option processing. @xref{Site Configuration}.
+@node Versioning
+@section Dealing with Autoconf versions
+@cindex Autoconf version
+@cindex version, Autoconf
-@node Notices
-@section Notices in @command{configure}
-@cindex Notices in @command{configure}
-
-The following macros manage version numbers for @command{configure}
-scripts. Using them is optional.
+The following optional macros can be used to help choose the minimum
+version of Autoconf that can successfully compile a given
+@file{configure.ac}.
-@c FIXME: AC_PREREQ should not be here
@defmac AC_PREREQ (@var{version})
@acindex{PREREQ}
@cindex Version
for consistency, you are invited not to do so.
@end defmac
+@defmac AC_VERSION
+@acindex{VERSION}
+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
+other words, for this release of Autoconf, its value is
+@samp{@value{VERSION}}. One potential use of this macro is for writing
+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.
+@end defmac
+
+@node Notices
+@section Notices in @command{configure}
+@cindex Notices in @command{configure}
+
+The following macros manage version numbers for @command{configure}
+scripts. Using them is optional.
+
@defmac AC_COPYRIGHT (@var{copyright-notice})
@acindex{COPYRIGHT}
@cindex Copyright Notice
@code{m4_append_uniq} to grow strings without duplicating substrings.
@end defmac
+@anchor{m4_version_compare}
@defmac m4_version_compare (@var{version-1}, @var{version-2})
@msindex{version_compare}
Introduced in autoconf 2.53. Compare the version strings
@var{version-1} is smaller, @samp{0} if they are the same, or @samp{1}
@var{version-2} is smaller. Version strings must be a list of elements
separated by @samp{.}, where each element is a number along with an
-optional letter. The comparison stops at the leftmost element that
-contains a difference, although a 0 element compares equal to a missing
-element.
+optional lower case letter. The comparison stops at the leftmost
+element that contains a difference, although a 0 element compares equal
+to a missing element.
@example
m4_version_compare([1.1], [2.0])
@end example
@end defmac
-@defmac m4_AUTOCONF_VERSION
-@defmacx m4_PACKAGE_VERSION
-@msindex{AUTOCONF_VERSION}
-@msindex{PACKAGE_VERSION}
-These macros identify the version of Autoconf that is currently parsing
-the input file, in a format suitable for @code{m4_version_compare}. The
-name @code{m4_AUTOCONF_VERSION} was introduced in Autoconf 2.62. The
-synonym @code{m4_PACKAGE_VERSION} existed since Autoconf 2.53, but was
-undocumented for many years because it is not named very well, and it
-may be withdrawn in a future release. One use of these macros is for
-writing conditional fallbacks based on when a feature was added to
-Autoconf, rather than using @code{AC_PREREQ} to require the newer
-version of Autoconf.
-
-For an example, @code{AC_USE_SYSTEM_EXTENSIONS} was only added in
-Autoconf 2.60 (@pxref{AC_USE_SYSTEM_EXTENSIONS}). A @file{configure.ac}
-designed to work even with Autoconf 2.59 can do the following in a
-compatibility section, then use the newer macros elsewhere without
-worrying about Autoconf versions:
-
-@example
-m4_ifndef([m4_AUTOCONF_VERSION],
- [m4_define([m4_AUTOCONF_VERSION],
- m4_defn([m4_PACKAGE_VERSION]))])
-m4_if(m4_version_compare(m4_AUTOCONF_VERSION, [2.60]), [-1],
- [AC_DEFUN([AC_USE_SYSTEM_EXTENSIONS], [AC_GNU_SOURCE])])
-@end example
-@end defmac
-
@node Forbidden Patterns
@subsection Forbidden Patterns