I've attached a short patch which documents the AS_TR_* macros.  I'm
going to commit it in a day or two if there are no objections.

2005-06-07  Derek Price  <[EMAIL PROTECTED]>

        * doc/autoconf.texi (Programming in M4sh): Document AS_TR_SH &
        AS_TR_CPP.


My apologies if this email shows up twice.  The copy I sent yesterday
hasn't appeared yet.

Cheers,

Derek
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.906
diff -u -p -r1.906 autoconf.texi
--- doc/autoconf.texi   6 Jun 2005 08:01:32 -0000       1.906
+++ doc/autoconf.texi   6 Jun 2005 18:27:29 -0000
@@ -8961,6 +8961,30 @@ even though Posix is unclear whether @sa
 succeed in that case.
 @end defmac
 
[EMAIL PROTECTED] AS_TR_CPP (@var{expression})
[EMAIL PROTECTED]
+Transform @var{expression} into a valid right-hand side for a C @code{#define}.
+For example:
+
[EMAIL PROTECTED]
+$ type="char *"
+$ echo "#define AS_TR_CPP(HAVE_$type) 1"
+#define HAVE_CHAR_P 1
[EMAIL PROTECTED] example
[EMAIL PROTECTED] defmac
+
[EMAIL PROTECTED] AS_TR_SH (@var{expression})
[EMAIL PROTECTED]
+Transform @var{expression} into a valid shell variable name.  For example:
+
[EMAIL PROTECTED]
+$ header="sys/some file.h"
+$ AS_TR_SH(HAVE_$header)=:
+$ if $HAVE_sys_some_file_h; then echo "Have it!"; fi
+Have it!
[EMAIL PROTECTED] example
[EMAIL PROTECTED] 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

Reply via email to