summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKO Myung-Hun <komh78@gmail.com>2023-10-18 14:00:11 -0400
committerZack Weinberg <zack@owlfolio.org>2023-10-18 14:00:11 -0400
commit88011e1f263fd7e794caa6e0984e623769d1c8c3 (patch)
tree55c9ddd4b0a1f542b3b5e1abd470259c03d97442
parentc4a695510d240491f89d78204a3d5a6fdbe03648 (diff)
downloadautoconf-88011e1f263fd7e794caa6e0984e623769d1c8c3.tar.gz
m4/m4.m4: Quote argument to AS_ECHO correctly.
AS_ECHO’s argument is required to be “a single shell word,” and this more precisely means it must not be altered by shell word splitting. In particular, if the argument contains shell variables whose values contain whitespace then it needs to be wrapped in "shell double quotes". The absence of these quotes caused one of the embedded M4 scripts to be mangled by the Autoconf 2.69 implementation of AS_ECHO. We don’t officially support bootstrapping with an older version of Autoconf (use the ./bootstrap script instead) but the absence of quotes is still incorrect. For consistency add [M4 quotes] to the use of AS_ECHO that was shell-quoted but not M4-quoted. * m4/m4.m4 (AC_PROG_GNU_M4): Quote argument to AS_ECHO correctly.
-rw-r--r--m4/m4.m46
1 files changed, 3 insertions, 3 deletions
diff --git a/m4/m4.m4 b/m4/m4.m4
index e6203118..919dbf4a 100644
--- a/m4/m4.m4
+++ b/m4/m4.m4
@@ -41,12 +41,12 @@ AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
ac_snip2=change'quote(<,>)def''ine(<T>,<>)d'nl
ac_snip2=${ac_snip2}${as_nl}def'ine(<F>,<T(<traced>)>)d'nl
ac_snip2=${ac_snip2}${as_nl}m4'wrap(<F>)d'nl
- AS_ECHO("$as_me:${as_lineno-$LINENO}: trying $ac_path_M4") \
+ AS_ECHO(["$as_me:${as_lineno-$LINENO}: trying $ac_path_M4"]) \
>&AS_MESSAGE_LOG_FD
test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \
- && test -z "`AS_ECHO([$ac_snippet]) | $ac_path_M4 --trace=mac 2>&1`" \
+ && test -z "`AS_ECHO(["$ac_snippet"]) | $ac_path_M4 --trace=mac 2>&1`" \
&& test -f conftest.m4f \
- && test x"`AS_ECHO([$ac_snip2]) | \
+ && test x"`AS_ECHO(["$ac_snip2"]) | \
$ac_path_M4 --trace=T --debug=aflq 2>&1`" = \
x'm4trace:stdin:3: -1- T(<traced>)' \
&& ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=: