On 01/11/2011 11:09 AM, Mostafa wrote:
> In 
> http://www.gnu.org/software/autoconf/manual/autoconf.html#Conditional-constructs
>  , under the definition for m4_ifval, I believe the following clause is 
> erroneous:
> 
> This is shorthand for:
> 
>           m4_if([cond], [], [if-true], [if-false])
> 
> Since the latter expands to if-true if cond is empty, while the definition 
> for m4_ifval says m4_ifval([cond], [if-true], [if-false]) expands to if-true 
> if cond is NOT empty.
> 
> This was rather confusing and I had to verify the correct behaviour via a 
> configure.ac template.
> 
> Hope this is corrected.

Thanks for the report; it is indeed a doc bug.

> 
> Thanks,
> 
> Mostafa

I will push this once I know how to credit your name in THANKS (that is,
do you have a preferred name longer than just "Mostafa"?).

diff --git i/ChangeLog w/ChangeLog
index cad88b0..2ea3fb4 100644
--- i/ChangeLog
+++ w/ChangeLog
@@ -1,3 +1,10 @@
+2011-01-11  Eric Blake  <ebl...@redhat.com>
+
+       docs: fix description of m4_ifval
+       * doc/autoconf.texi (Conditional constructs) <m4_ifval>: Use
+       correct argument order.
+       Reported by Mostafa.
+
 2011-01-10  Ralf Wildenhues  <ralf.wildenh...@gmx.de>

        docs: link to Gnulib configmake documentation.
diff --git i/doc/autoconf.texi w/doc/autoconf.texi
index b999f03..9f5494e 100644
--- i/doc/autoconf.texi
+++ w/doc/autoconf.texi
@@ -11881,7 +11881,7 @@ Conditional constructs
 Expands to @var{if-true} if @var{cond} is not empty, otherwise to
 @var{if-false}.  This is shorthand for:
 @example
-m4_if([...@var{cond}], [], [...@var{if-true}], [...@var{if-false}])
+m4_if([...@var{cond}], [], [...@var{if-false}], [...@var{if-true}])
 @end example
 @end defmac



-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to