From: Ralf Wildenhues Date: Wed, 8 Oct 2008 05:38:54 +0000 (+0200) Subject: Document AS_VERSION_COMPARE. X-Git-Tag: v2.63b~278 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d88e6dc09ec0f9c019949c78de47ec1cbb9aebf3;p=thirdparty%2Fautoconf.git Document AS_VERSION_COMPARE. * doc/autoconf.texi (Programming in M4sh): Document AS_VERSION_COMPARE. * NEWS: Update. Signed-off-by: Ralf Wildenhues --- diff --git a/ChangeLog b/ChangeLog index 97f07548..07e741d4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2008-10-08 Ralf Wildenhues + 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 b1de684b..ac822d57 100644 --- 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. + * Major changes in Autoconf 2.63 (2008-09-09) [stable] Released by Eric Blake, based on git versions 2.62.*. diff --git a/doc/autoconf.texi b/doc/autoconf.texi index f258666f..5753d37b 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -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