From: KO Myung-Hun Date: Wed, 18 Oct 2023 18:00:11 +0000 (-0400) Subject: m4/m4.m4: Quote argument to AS_ECHO correctly. X-Git-Tag: v2.72d~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=88011e1f263fd7e794caa6e0984e623769d1c8c3;p=thirdparty%2Fautoconf.git 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. --- diff --git a/m4/m4.m4 b/m4/m4.m4 index e62031185..919dbf4a7 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(,<>)d'nl ac_snip2=${ac_snip2}${as_nl}def'ine(,)>)d'nl ac_snip2=${ac_snip2}${as_nl}m4'wrap()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 &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()' \ && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=: