]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document m4_version_prereq.
authorEric Blake <ebb9@byu.net>
Thu, 18 Dec 2008 13:44:59 +0000 (06:44 -0700)
committerEric Blake <ebb9@byu.net>
Thu, 18 Dec 2008 13:44:59 +0000 (06:44 -0700)
* doc/autoconf.texi (Number processing Macros)
<m4_version_prereq>: Add documentation.
* NEWS: Mention it.
Reported by Bruno Haible.

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

index 704ec477811602214700d9e8a3a5d34b8b7bea4f..86c6c4b629eee3e5bbb0520535741cf8671b62cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-12-18  Eric Blake  <ebb9@byu.net>
+
+       Document m4_version_prereq.
+       * doc/autoconf.texi (Number processing Macros)
+       <m4_version_prereq>: Add documentation.
+       * NEWS: Mention it.
+       Reported by Bruno Haible.
+
 2008-12-10  Jim Meyering  <meyering@redhat.com>
 
        AC_HEADER_ASSERT: don't say assertions are disabled when they're not
diff --git a/NEWS b/NEWS
index 65e5486cb2ec7992eddd7ba527f6e56947184f35..2e7fa1e34396a544f634cb56c114c9e411c478b2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -30,7 +30,7 @@ GNU Autoconf NEWS - User visible changes.
    m4_map_args_pair  m4_set_map
 
 ** The following m4sugar macros are documented now:
-   m4_copy  m4_dumpdefs  m4_rename
+   m4_copy  m4_dumpdefs  m4_rename  m4_version_prereq
 
 ** The m4sugar macro m4_expand has been taught to handle unterminated
    comments and shell case statements.  As a result, it is used
index d232e4e701197e25e2ce085420d20c4bb8bcadf0..aeeb38817ddffd6b565c9ff114c5074f4db7831a 100644 (file)
@@ -11835,6 +11835,18 @@ m4_version_compare([2.61b], [2.61a-248-dc51])
 @end example
 @end defmac
 
+@defmac m4_version_prereq (@var{version}, @ovar{if-new-enough}, @
+  @dvar{if-old, m4_fatal})
+@msindex{version_prereq}
+Compares @var{version} against the version of Autoconf currently
+running.  If the running version is at @var{version} or newer, expand
+@var{if-new-enough}, but if @var{version} is larger than the version
+currently executing, expand @var{if-old}, which defaults to printing an
+error message and exiting m4sugar with status 63.  When given only one
+argument, this behaves like @code{AC_PREREQ} (@pxref{Versioning}).
+Remember that the autoconf philosophy favors feature checks over version
+checks.
+@end defmac
 
 @node Set manipulation Macros
 @subsection Set manipulation in M4