characters is a syntax warning now.
(_AS_QUOTE): Accept $2 as list of characters to quote.
* lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD):
Quote for Perl, not sh.
* bin/autoheader.in: When $debug, report the file which is
`do'ne.
* tests/tools.at (autom4te, autoheader): Exercise @bar, not merely
`@', to tickle Perl's lists.
Reported by Carlos Velasco.
+2002-10-22 Akim Demaille <akim@epita.fr>
+
+ * lib/m4sugar/m4sh.m4 (_AS_QUOTE): The warning about quoted
+ characters is a syntax warning now.
+ (_AS_QUOTE): Accept $2 as list of characters to quote.
+ * lib/autoconf/autoheader.m4 (AH_VERBATIM, _AH_VERBATIM_OLD):
+ Quote for Perl, not sh.
+ * bin/autoheader.in: When $debug, report the file which is
+ `do'ne.
+ * tests/tools.at (autom4te, autoheader): Exercise @bar, not merely
+ `@', to tickle Perl's lists.
+ Reported by Carlos Velasco.
+
2002-10-18 Akim Demaille <akim@epita.fr>
* bin/autom4te.in (handle_m4): Pass --fatal-warning to m4, so that
Bram Moolenaar bram@vim.org
Bruno Haible haible@ilog.fr
Carl Edman cedman@princeton.edu
+Carlos Velasco carlosev@newipnet.com
Chad R. Larson chad@anasazi.com
Chris P. Ross cross@uu.net
Chris Provenzano proven@cygnus.com
. " $ARGV[0] >$tmp/traces.pl");
local (%verbatim, %symbol);
+debug "$me: \`do'ing $tmp/traces.pl:\n" . `sed 's/^/| /' $tmp/traces.pl`;
do "$tmp/traces.pl";
warn "couldn't parse $tmp/traces.pl: $@" if $@;
error "error: AC_CONFIG_HEADERS not found in $ARGV[0]"
# may occur if there is AC_CHECK_FUNCS($my_func)), issue an autoheader
# TEMPLATE associated to the KEY. Otherwise, do nothing. TEMPLATE is
# output as is, with no formatting.
+#
+# Quote for Perl "" strings, which are those used by Autoheader.
m4_define([AH_VERBATIM],
[AS_LITERAL_IF([$1],
- [AH_OUTPUT([$1], AS_ESCAPE([[$2]]))])
+ [AH_OUTPUT([$1], AS_ESCAPE([[$2]], [\"@$]))])
])
# _AH_VERBATIM_OLD(KEY, TEMPLATE)
# -------------------------------
# Same as above, but with bugward compatibility.
+#
+# Quote for Perl "" strings, which are those used by Autoheader.
m4_define([_AH_VERBATIM_OLD],
[AS_LITERAL_IF([$1],
- [AH_OUTPUT([$1], _AS_QUOTE([[$2]]))])
+ [AH_OUTPUT([$1], _AS_QUOTE([[$2]], [\"@$]))])
])
[echo "$1" >&m4_default([$2], [AS_MESSAGE_FD])])
-# _AS_QUOTE(STRING)
-# -----------------
+# _AS_QUOTE(STRING, [CHARS = `"])
+# -------------------------------
# If there are quoted (via backslash) backquotes do nothing, else
# backslash all the quotes.
-# FIXME: In a distant future (2.51 or +), this warning should be
-# classified as `syntax'. It is classified as `obsolete' to ease
-# the transition (for Libtool for instance).
m4_define([_AS_QUOTE],
[_AS_QUOTE_IFELSE([$1],
- [AS_ESCAPE([$1], [`""])],
- [m4_warn([obsolete],
- [back quotes and double quotes should not be escaped in: $1])dnl
+ [AS_ESCAPE([$1], m4_default([$2], [`""]))],
+ [m4_warn([syntax],
+ [back quotes and double quotes must not be escaped in: $1])dnl
$1])])
TRACE2
# With arguments, single line.
-TRACE1(foo, bar, baz)
+TRACE1(foo, @bar, @baz)
TRACE1(foo, TRACE1(bar, baz))
TRACE1(foo, active, baz)
TRACE1(foo, [active], TRACE1(active, [active]))
[[configure.ac:6:TRACE1:
configure.ac:6:TRACE2:
configure.ac:7:TRACE2:
-configure.ac:10:TRACE1:foo:bar:baz
-configure.ac:10:TRACE2:bar:baz
+configure.ac:10:TRACE1:foo:@bar:@baz
+configure.ac:10:TRACE2:@bar:@baz
configure.ac:11:TRACE1:bar:baz
configure.ac:11:TRACE2:baz
configure.ac:11:TRACE1:foo::baz
[[
[], [], [].
-[foo], [bar], [baz].
+[foo], [@bar], [@baz].
[bar], [baz], [].
AT_CHECK_AUTOCONF([-t TRACE2:'${)===(}@'], 0,
[[[]
[]
-[bar])===([baz]
+[@bar])===([@baz]
[baz]
[])===([baz]
[ACTIVE])===([baz]
AC_CONFIG_HEADERS(config.h:config.hin)
AH_TOP([Top1 from configure.ac.])
AH_TOP([Top2 from configure.ac.])
-AH_TOP([The Cat in a @.])
+AH_TOP([The Cat in a h@t.])
AH_VERBATIM([Middle], [Middle from configure.ac.])
-AH_VERBATIM([Mouse], [The Mouse in a @.])
+AH_VERBATIM([Mouse], [The Mouse in a h@t.])
AH_BOTTOM([Bottom1 from configure.ac.])
AH_BOTTOM([Bottom2 from configure.ac.])
-AH_BOTTOM([The Dog in a @.])
+AH_BOTTOM([The Dog in a h@t.])
-AC_DEFINE([ANT], [@], [The Ant in a @.])
+AC_DEFINE([ANT], [@], [The Ant in a h@t.])
]])
Top2 from configure.ac.
-The Cat in a @.
+The Cat in a h@t.
-/* The Ant in a @. */
+/* The Ant in a h@t. */
#undef ANT
Middle from configure.ac.
-The Mouse in a @.
+The Mouse in a h@t.
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
Bottom2 from configure.ac.
-The Dog in a @.
+The Dog in a h@t.
/* Bottom from acconfig.h. */
]])