[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: AH_VERBATIM isn't really verbatim with backslashes (autoconf 2.49c)
From: |
Akim Demaille |
Subject: |
Re: AH_VERBATIM isn't really verbatim with backslashes (autoconf 2.49c) |
Date: |
26 Feb 2001 22:41:21 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) |
I think this is what we need:
Index: ChangeLog
from Akim Demaille <address@hidden>
* acgeneral.m4 (AH_VERBATIM, AH_TEMPLATE): New, use AS_ESCAPE, not
_AS_QUOTE.
(_AH_VERBATIM_OLD, _AH_TEMPLATE_OLD): New, used for bugward
compatibility in...
(AC_DEFINE, AC_DEFINE_UNQUOTED): here.
Index: acgeneral.m4
===================================================================
RCS file: /cvs/autoconf/acgeneral.m4,v
retrieving revision 1.698
diff -u -u -r1.698 acgeneral.m4
--- acgeneral.m4 2001/02/25 10:44:37 1.698
+++ acgeneral.m4 2001/02/26 21:33:49
@@ -284,6 +284,15 @@
# output as is, with no formating.
m4_define([AH_VERBATIM],
[AS_LITERAL_IF([$1],
+ [AH_OUTPUT([$1], AS_ESCAPE([[$2]]))])
+])
+
+
+# _AH_VERBATIM_OLD(KEY, TEMPLATE)
+# -------------------------------
+# Same as above, but with bugward compatibility.
+m4_define([_AH_VERBATIM_OLD],
+[AS_LITERAL_IF([$1],
[AH_OUTPUT([$1], _AS_QUOTE([[$2]]))])
])
@@ -298,6 +307,15 @@
#undef $1])])
+# _AH_TEMPLATE_OLD(KEY, DESCRIPTION)
+# ----------------------------------
+# Same as above, but with bugward compatibility.
+m4_define([_AH_TEMPLATE_OLD],
+[_AH_VERBATIM_OLD([$1],
+ m4_text_wrap([$2 */], [ ], [/* ])[
+#undef $1])])
+
+
# AH_TOP(TEXT)
# ------------
# Output TEXT at the top of `config.h.in'.
@@ -2045,7 +2063,7 @@
# die. The third argument is used by autoheader.
m4_define([AC_DEFINE],
[AC_DEFINE_TRACE([$1])dnl
-m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
+m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
cat >>confdefs.h <<\EOF
address@hidden:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
EOF
@@ -2057,7 +2075,7 @@
# Similar, but perform shell substitutions $ ` \ once on VALUE.
m4_define([AC_DEFINE_UNQUOTED],
[AC_DEFINE_TRACE([$1])dnl
-m4_ifval([$3], [AH_TEMPLATE([$1], [$3])])dnl
+m4_ifval([$3], [_AH_TEMPLATE_OLD([$1], [$3])])dnl
cat >>confdefs.h <<EOF
address@hidden:@define] $1 m4_if($#, 2, [$2], $#, 3, [$2], 1)
EOF
I'm committing it once some sanity check performed. Remains 1. to
document, 2. to test.
FYI:
/tmp % cat configure.ac nostromo 22:40
AC_INIT
AC_CONFIG_HEADERS(config.hin)
AH_VERBATIM(foo, [\\"])
/tmp % $ace/autoheader -A $ace nostromo 22:40
autoheader: warning: both `configure.ac' and `configure.in' are present.
autoheader: warning: proceeding with `configure.ac'.
autoheader: config.hin.in is unchanged
/tmp % cat config.hin.in nostromo 22:41
/* config.hin.in. Generated automatically from configure.ac by autoheader. */
\\"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: AH_VERBATIM isn't really verbatim with backslashes (autoconf 2.49c),
Akim Demaille <=