autoconf
[Top][All Lists]
Advanced

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

Re: config.status and /bin/sh on Solaris


From: Zack Weinberg
Subject: Re: config.status and /bin/sh on Solaris
Date: Sat, 28 Jan 2017 15:54:28 -0500

On Sat, Jan 28, 2017 at 1:13 PM, Dimitrios Apostolou <address@hidden> wrote:
> In my case, /usr/xpg4/bin/sh is a capable-enough shell, thus
> as_have_required is *yes* and _AS_RUN(["$as_suggested"]) *succeeds*, thus
> the long snippet that tries all shells, is skipped!
>
> By reading this, it seems that the intent is to set SHELL to the *currently
> running shell interpreter*, since it passed all tests. But that one is not
> /bin/sh, since the script was manually executed with "sh ./configure" and a
> modified PATH.

Yes, that's the intent.

> The best solution would be to detect the currently running interpreter. But
> how?

Inconveniently, I'm not sure there's a reliable way to detect it.  $0
is going to be set to "configure".  Bash has a $BASH special variable
that expands to the full pathname of the shell interpreter, but that
is actually evidence for the _lack_ of a portable way to detect it.
Similarly, /proc/$$/exe is a Linuxism.  Anyone else got an idea?

zw



reply via email to

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