Hi/2.

Zack Weinberg wrote:
> On Sat, Oct 14, 2023, at 9:19 AM, KO Myung-Hun wrote:
>> * m4/m4.m4 (AC_PROG_GNU_M4): Double-quotes $ac_snip2.
> 
> Please explain why it isn't also necessary to add double quotes
> around all the other variable expansions in this check, particularly
> $ac_snippet and $ac_path_M4.
> 

Because this test fails due to $ac_snip2. Anyway I've double-quoted
$ac_snippet, too.

However, not required to $ac_path_M4, which does not contain NL.

> Also, typo in your commit message: "Double-quotes" should be "Double-quote".
> 

Fixed.



-- 
KO Myung-Hun

Korean OS/2 User Community : https://www.os2.kr/
From 304a559a34e2cceeacce30e218e21c1cfd626400 Mon Sep 17 00:00:00 2001
From: KO Myung-Hun <komh@chollian.net>
Date: Sat, 14 Oct 2023 21:59:12 +0900
Subject: [PATCH v2] Fix detection of GNU M4 on mksh

If printing variables containing NL without double-quotation, NL is
replaced with a space on mksh.

As a result, detection of GNU M4 fails because of $ac_snip2 test.

* m4/m4.m4 (AC_PROG_GNU_M4): Double-quote $ac_snippet and $ac_snip2.
---
 m4/m4.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/m4/m4.m4 b/m4/m4.m4
index e6203118..157ac04f 100644
--- a/m4/m4.m4
+++ b/m4/m4.m4
@@ -44,9 +44,9 @@ AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4 gnum4],
       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=:
-- 
2.42.0

Reply via email to