]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* doc/autoconf.texi (Programming in M4sh): Document AS_TR_CPP &
authorDerek Price <derek@ximbiot.com>
Fri, 10 Jun 2005 15:42:42 +0000 (15:42 +0000)
committerDerek Price <derek@ximbiot.com>
Fri, 10 Jun 2005 15:42:42 +0000 (15:42 +0000)
AS_TR_SH.

ChangeLog
doc/autoconf.texi

index d90b9010bcd8f442f0a2b7e5288a13b5ac0aed53..54e338a6085c3142fc04519c7eea2d7ddeeac0b7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-10  Derek Price  <derek@ximbiot.com>
+
+       * doc/autoconf.texi (Programming in M4sh): Document AS_TR_CPP &
+       AS_TR_SH.
+
 2005-06-08  Paul Eggert  <eggert@cs.ucla.edu>
 
        * lib/autotest/general.m4 (AT_INIT): Don't accept Solaris 9's diff
index 8bf2f27a94a70a7e388e211ff43fddb43b2996ce..c700383e7c10f25a282202b800d110a5d97e20ef 100644 (file)
@@ -8965,6 +8965,30 @@ even though Posix is unclear whether @samp{mkdir -p} should
 succeed in that case.
 @end defmac
 
+@defmac AS_TR_CPP (@var{expression})
+@asindex{TR_CPP}
+Transform @var{expression} into a valid right-hand side for a C @code{#define}.
+For example:
+
+@example
+$ type="char *"
+$ echo "#define AS_TR_CPP(HAVE_$type) 1"
+#define HAVE_CHAR_P 1
+@end example
+@end defmac
+
+@defmac AS_TR_SH (@var{expression})
+@asindex{TR_SH}
+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
+Have it!
+@end example
+@end defmac
+
 @defmac AS_SET_CATFILE (@var{var}, @var{dir}, @var{file})
 @asindex{SET_CATFILE}
 Set the shell variable @var{var} to @var{dir}/@var{file}, but