autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Document AS_VERSION_COMPARE.


From: Ralf Wildenhues
Subject: Document AS_VERSION_COMPARE.
Date: Tue, 7 Oct 2008 22:27:43 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

I'd like to use AS_VERSION_COMPARE in AM_PROG_VALAC in Automake.
Thus I propose to document it in Autoconf now.

Do you think this is ok?  Should the relationship with
m4_version_compare be documented better?  I haven't checked
but I think they have slightly different semantics, too.

Thanks,
Ralf

    Document AS_VERSION_COMPARE.
    
    * doc/autoconf.texi (Programming in M4sh): Document
    AS_VERSION_COMPARE.
    * NEWS: Update.

diff --git a/NEWS b/NEWS
index ca04535..148067f 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,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.
+
 ** config.cache files are updated atomically.
 
 
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index 649b41b..66dbac7 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
 
address@hidden AS_VERSION_COMPARE (@var{version-1}, @var{version-2}, @
+  @ovar{action-if-less}, @ovar{action-if-equal}, @ovar{action-if-greater})
address@hidden
+Compare two strings @var{version-1} and @var{version-2}, possibly
+containing shell variables, as version strings, and expand
address@hidden, @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}).
address@hidden defmac
+
 
 @node File Descriptor Macros
 @section File Descriptor Macros




reply via email to

[Prev in Thread] Current Thread [Next in Thread]