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

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

 



On Sat, Jan 28, 2017 at 1:13 PM, Dimitrios Apostolou <jimis@xxxxxxx> 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

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
https://lists.gnu.org/mailman/listinfo/autoconf



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

  Powered by Linux