From: Eric Blake Date: Thu, 18 Dec 2008 13:44:59 +0000 (-0700) Subject: Document m4_version_prereq. X-Git-Tag: v2.63b~58 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=96ab16be4a15f75fad0b28dd40a49ddcb201188f;p=thirdparty%2Fautoconf.git Document m4_version_prereq. * doc/autoconf.texi (Number processing Macros) : Add documentation. * NEWS: Mention it. Reported by Bruno Haible. Signed-off-by: Eric Blake --- diff --git a/ChangeLog b/ChangeLog index 704ec4778..86c6c4b62 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-12-18 Eric Blake + + Document m4_version_prereq. + * doc/autoconf.texi (Number processing Macros) + : Add documentation. + * NEWS: Mention it. + Reported by Bruno Haible. + 2008-12-10 Jim Meyering AC_HEADER_ASSERT: don't say assertions are disabled when they're not diff --git a/NEWS b/NEWS index 65e5486cb..2e7fa1e34 100644 --- 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 diff --git a/doc/autoconf.texi b/doc/autoconf.texi index d232e4e70..aeeb38817 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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