]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Fix the examples for AS_TR_CPP and AS_TR_SH.
authorStepan Kasal <kasal@ucw.cz>
Fri, 26 Aug 2005 16:12:21 +0000 (16:12 +0000)
committerStepan Kasal <kasal@ucw.cz>
Fri, 26 Aug 2005 16:12:21 +0000 (16:12 +0000)
ChangeLog
doc/autoconf.texi

index b9c7a0fd9ef6b3771d3604f71fa2c0fd5c7f09ff..d3ee1c682fdeacb5137bcfb13454ec507d4af9ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-08-26  Stepan Kasal  <kasal@ucw.cz>
+
+       * doc/autoconf.texi (Programming in M4sh) <AS_TR_CPP>: Fix m4 quoting
+       in the example.  Reported by Bruno Haible.
+       <AS_TR_SH>: Likewise.  Also modify the example to be more convincing:
+       "if $undefined_var;" succeeds with my shell.
+
 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lib/m4sugar/m4sh.m4 (_AS_VERSION_COMPARE_PREPARE):
index 4a1a772fca3e55da779ca56ccd79a172b1d33dd4..b6a25d96ea45d0aea310938b37cadd3d92a82615 100644 (file)
@@ -9017,7 +9017,7 @@ For example:
 
 @example
 $ type="char *"
-$ echo "#define AS_TR_CPP(HAVE_$type) 1"
+$ echo "#define AS_TR_CPP([HAVE_$type]) 1"
 #define HAVE_CHAR_P 1
 @end example
 @end defmac
@@ -9028,8 +9028,8 @@ Transform @var{expression} into a valid shell variable name.  For example:
 
 @example
 $ header="sys/some file.h"
-$ AS_TR_SH(HAVE_$header)=:
-$ if $HAVE_sys_some_file_h; then echo "Have it!"; fi
+$ AS_TR_SH([HAVE_$header])=yes
+$ if test "$HAVE_sys_some_file_h" = yes; then echo "Have it!"; fi
 Have it!
 @end example
 @end defmac