Re: M4sh tests 77 and 78 vs /bin/sh -> dash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/12/20 1:53 PM, Zack Weinberg wrote:
the
changed behavior of autoconf trunk was not intentional; it's because
commit 2b59b6f8a79b8bf77e178ff4e5aa0ede433d39cf missed a direct use of
$as_echo in _AS_DETECT_BETTER_SHELL, causing _AS_DETECT_BETTER_SHELL
*not to work at all*!

Thanks for catching that. I looked into the history of that part of Autoconf and it appears the string is being echoed only for historical reasons. So I installed the attached to bypass the need for using $as_echo or equivalent.
>From 81ffea246c44336859e61a68a0fcb0ee99d582c8 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@xxxxxxxxxxx>
Date: Thu, 12 Mar 2020 17:00:44 -0700
Subject: [PATCH] Fix _AS_DETECT_BETTER_SHELL breakage

Problem reported by Zack Weinberg in:
https://lists.gnu.org/r/autoconf/2020-03/msg00017.html
* lib/m4sugar/m4sh.m4 (_AS_RUN): Use sh -c instead of
the no-longer-existent $as_echo.  This fixes a bug introduced
in 2013-01-28T03:44:45Z!gary@xxxxxxx.
---
 lib/m4sugar/m4sh.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index f8be3186..92999f58 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -418,7 +418,7 @@ m4_default_quoted([$4], [M4SH-INIT-FN]))])])
 # or under the given SHELL, protecting it from syntax errors.
 # Set as_run in order to assist _AS_LINENO_WORKS.
 m4_define([_AS_RUN],
-[m4_ifval([$2], [{ $as_echo "$as_bourne_compatible"$1 | as_run=a $2; }],
+[m4_ifval([$2], [as_run=a $2 -c "$as_bourne_compatible"$1],
 		[(eval $1)]) 2>/dev/null])
 
 
-- 
2.24.1


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux