]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Document AS_VERSION_COMPARE.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 8 Oct 2008 05:38:54 +0000 (07:38 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Wed, 8 Oct 2008 05:38:54 +0000 (07:38 +0200)
* doc/autoconf.texi (Programming in M4sh): Document
AS_VERSION_COMPARE.
* NEWS: Update.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
NEWS
doc/autoconf.texi

index 97f075487bbe220ac4baeb39e930ae747690ebdf..07e741d430a4bf66f394249f2b7bb75ea735e4e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2008-10-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Document AS_VERSION_COMPARE.
+       * doc/autoconf.texi (Programming in M4sh): Document
+       AS_VERSION_COMPARE.
+       * NEWS: Update.
+
        Do not write to testsuite log fd before initialization.
        * lib/autotest/general.m4 (AS_MESSAGE_LOG_FD, AT_JOB_FIFO_FD):
        Define fds only when initializing the log fd so early error
diff --git a/NEWS b/NEWS
index b1de684bcce6f0fdfb98039f48288f76619f8cf3..ac822d57724a32c17726f88160d25cfa1a5c7174 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,9 @@ GNU Autoconf NEWS - User visible changes.
 ** The following m4sugar macros are new:
    m4_default_quoted
 
+** The following m4sh macros are documented now:
+   AS_VERSION_COMPARE.
+
 \f
 * Major changes in Autoconf 2.63 (2008-09-09) [stable]
   Released by Eric Blake, based on git versions 2.62.*.
index f258666f7393da49165d769934c88d8e913cb968..5753d37bce320dc1e758bf303aa80b68c901d5c0 100644 (file)
@@ -11924,6 +11924,18 @@ optimizing the common cases (@var{dir} or @var{file} is @samp{.},
 @var{file} is absolute, etc.).
 @end defmac
 
+@defmac AS_VERSION_COMPARE (@var{version-1}, @var{version-2}, @
+  @ovar{action-if-less}, @ovar{action-if-equal}, @ovar{action-if-greater})
+@asindex{VERSION_COMPARE}
+Compare two strings @var{version-1} and @var{version-2}, possibly
+containing shell variables, as version strings, and expand
+@var{action-if-less}, @var{action-if-equal}, or @var{action-if-greater}
+depending upon the result.
+The algorithm to compare is similar to the one used by strverscmp in
+glibc (@pxref{String/Array Comparison, , String/Array Comparison, libc,
+The @acronym{GNU} C Library}).
+@end defmac
+
 
 @node File Descriptor Macros
 @section File Descriptor Macros