[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: config.sub/config.guess using nonportable $(...) substitutions
From: |
Tim Rice |
Subject: |
Re: config.sub/config.guess using nonportable $(...) substitutions |
Date: |
Mon, 8 Mar 2021 17:06:13 -0800 (PST) |
User-agent: |
Alpine 2.11 (UW2 23 2013-08-11) |
On Mon, 8 Mar 2021, Nick Bowler wrote:
> Hi,
>
> I noticed that config.sub (and config.guess) scripts were very recently
> changed to use the POSIX $(...) form for command substitutions.
>
> This change is, I fear, ill-advised. The POSIX construction is
> widely understood to be nonportable as it is not supported by
> traditional Bourne shells such as, for example, Solaris 10 /bin/sh.
> This specific portability problem is discussed in the Autoconf manual
> for portable shell programming[1].
>
> These scripts using $(...) are incorporated into the recently-released
> Automake 1.16.3, which means they get copied into packages bootstrapped
> with this version. So now, if I create a package using the latest bits,
> configuring with heirloom-sh fails:
>
> % CONFIG_SHELL=/bin/jsh jsh ./configure CONFIG_SHELL=/bin/jsh
> configure: error: cannot run /bin/jsh ./config.sub
But why would you use CONFIG_SHELL= to specify a less capable shell?
It is there to specify a more capable shell in case it is not already
detected.
Now if an autoconf built configure attempts to run config.guess/config.sub
before detecting a capapable shell and exec(ing) itself, then that is
not so good.
> % jsh config.sub x86_64-pc-linux-gnu
> config.sub: syntax error at line 53: `me=$' unexpected
>
> (The heirloom-sh is essentially Solaris /bin/sh but runs on GNU/Linux
> systems).
--
Tim Rice Multitalents
tim@multitalents.net
- Re: config.sub/config.guess using nonportable $(...) substitutions, (continued)
- Re: config.sub/config.guess using nonportable $(...) substitutions, Karl Berry, 2021/03/09
- Re: config.sub/config.guess using nonportable $(...) substitutions, Paul Eggert, 2021/03/09
- Re: config.sub/config.guess using nonportable $(...) substitutions, Warren Young, 2021/03/09
- Re: config.sub/config.guess using nonportable $(...) substitutions, Tim Rice, 2021/03/09
- Re: config.sub/config.guess using nonportable $(...) substitutions, Zack Weinberg, 2021/03/09
- Re: config.sub/config.guess using nonportable $(...) substitutions, Nick Bowler, 2021/03/09
- Re: config.sub/config.guess using nonportable $(...) substitutions, Karl Berry, 2021/03/10
- Re: config.sub/config.guess using nonportable $(...) substitutions, Todd C. Miller, 2021/03/09
- Re: config.sub/config.guess using nonportable $(...) substitutions, Paul Eggert, 2021/03/09
Re: config.sub/config.guess using nonportable $(...) substitutions, Bob Friesenhahn, 2021/03/08
Re: config.sub/config.guess using nonportable $(...) substitutions,
Tim Rice <=