[Top][All Lists]

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

Re: [PATCH 1/2] Fix detection of GNU M4 on mksh

From: KO Myung-Hun
Subject: Re: [PATCH 1/2] Fix detection of GNU M4 on mksh
Date: Thu, 19 Oct 2023 22:58:00 +0900
User-agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:10.0.6esrpre) Gecko/20120715 Firefox/10.0.6esrpre SeaMonkey/2.7.2


Zack Weinberg wrote:
> On Wed, Oct 18, 2023, at 10:09 AM, KO Myung-Hun wrote:
>> Zack Weinberg wrote:
>>> Details please?
>> Commit message was not enough ?
> I'm afraid not.  I needed to know everything you say in the next two
> paragraphs:
>> $ac_snip2 contains NL. And in order to print it, `print -r --' command
>> is used on mksh.
>> BTW, printing without double-quoting, NL in $ac_snip2 is replaced with
>> a space. Because of this, M4 does not return contents expected. As a
>> result, test for $ac_snip2 fails.
> With this information I can understand your suggested change easily;
> without it I thought I might have to construct my own OS/2+mksh
> environment in order to figure out why this test was failing *only* in
> that environment.
> The reason this test is failing only in your environment, is because
> you generated the configure script *for Autoconf itself* with an older
> version of Autoconf.  Current versions do not use `print -r` in the
> implementation of AS_ECHO.  If you are building Autoconf from a git
> checkout, you should use the "bootstrap" script in the source directory
> to generate the configure script; if you are building from a release
> tarball you should use the configure script included in that tarball.
> Either of these should have masked the bug you found.

Oh, exactly!

> Having said that, you *have* found a genuine bug. Autoconf's
> documentation is quite clear that the argument to AS_ECHO must be a
> "single shell word", in particular, not containing any unquoted
> whitespace (not just no newlines) after variable expansion.  *Both*
> $ac_snippet and $ac_snip2 contain whitespace and therefore need to be
> quoted.  It happens that replacing newlines with horizontal spaces
> breaks $ac_snip2 but not $ac_snippet, and it also happens that the
> `printf`-based implementation of AS_ECHO (which is used unconditionally
> by current Autoconf) mangles both in a different way that doesn't break
> either of them.  But we should not be relying on either of these things.
> So I'm going to go ahead and commit your patch with quoting added to
> both $ac_snip2 and $ac_snippet.  Final patch below.


KO Myung-Hun

Korean OS/2 User Community :

reply via email to

[Prev in Thread] Current Thread [Next in Thread]