diff --git a/ChangeLog b/ChangeLog index 58c60ce6..d1b9411a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2002-10-22 Akim Demaille + + * 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 * bin/autom4te.in (handle_m4): Pass --fatal-warning to m4, so that diff --git a/THANKS b/THANKS index ec878fbd..b8d3019d 100644 --- a/THANKS +++ b/THANKS @@ -30,6 +30,7 @@ Bob Wilson bwilson@tensilica.com 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 diff --git a/bin/autoheader.in b/bin/autoheader.in index 60099f36..e3440b4d 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -176,6 +176,7 @@ xsystem ("$autoconf " . " $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]" diff --git a/lib/autoconf/autoheader.m4 b/lib/autoconf/autoheader.m4 index d60b0bda..e78d4c72 100644 --- a/lib/autoconf/autoheader.m4 +++ b/lib/autoconf/autoheader.m4 @@ -64,18 +64,22 @@ m4_define([AH_OUTPUT], []) # 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]], [\"@$]))]) ]) diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index e7681865..a77d8486 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -335,18 +335,15 @@ m4_define([_AS_ECHO_UNQUOTED], [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])]) diff --git a/tests/tools.at b/tests/tools.at index bd89dd08..f8e6ce80 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -166,7 +166,7 @@ TRACE1 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])) @@ -183,8 +183,8 @@ AT_CHECK_AUTOCONF([-t TRACE1 -t TRACE2], 0, [[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 @@ -205,7 +205,7 @@ AT_CHECK_AUTOCONF([[-t TRACE1:' [[ [], [], []. -[foo], [bar], [baz]. +[foo], [@bar], [@baz]. [bar], [baz], []. @@ -226,7 +226,7 @@ foo], []. AT_CHECK_AUTOCONF([-t TRACE2:'${)===(}@'], 0, [[[] [] -[bar])===([baz] +[@bar])===([@baz] [baz] [])===([baz] [ACTIVE])===([baz] @@ -458,14 +458,14 @@ AT_DATA([configure.ac], 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.]) ]]) @@ -484,14 +484,14 @@ Top1 from configure.ac. 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 @@ -512,7 +512,7 @@ Bottom1 from configure.ac. Bottom2 from configure.ac. -The Dog in a @. +The Dog in a h@t. /* Bottom from acconfig.h. */ ]])