[Top][All Lists]

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

Re: which shell is running configure?

From: Sam Steingold
Subject: Re: which shell is running configure?
Date: Wed, 28 Jun 2006 10:20:24 -0400
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

> * Eric Blake <address@hidden> [2006-06-28 06:10:35 -0600]:
> According to Sam Steingold on 6/27/2006 10:17 AM:
>> I encountered the following problem:
>> an autoconf test that checks whether `test' supports `-nt' passes,
>> but when make tries to use "test -nt" in Makefile, it fails.
>> this appeared to suggest that configure and make were using different
>> shells, and, indeed, I found some code in configure which appears to
>> re-run it with bash:
> ...
>> why is this being done?
> You are correct that configure reruns itself with a better shell, if
> the default is insufficient for its needs, and CONFIG_SHELL was not
> set (setting CONFIG_SHELL is useful in part as a torture test of
> autoconf being able to work in spite of insufficient shells, but also
> so that you can manually choose a better shell rather than wasting
> configure's time finding it).  Does adding something like
> address@hidden@ to help your situation?

of course not - configure and config.status do not substitute @address@hidden

moreover, I inserted the following into the configure by hand:

echo 0=$0
echo BASH=${BASH}

here is what was printed:


so, obviously the configure script is being run by bash, but neither
SHELL nor CONFIG_SHELL tell me that, so when I put
into the generated shell script (that writes Makefile),
Makefile gets

SHELL = /bin/sh

which causes the original problem.

> The autoconf manual discusses the use of CONFIG_SHELL.

all I can find is this:

 - Variable: CONFIG_SHELL
     The shell with which to run `configure' for the `--recheck'
     option.  It must be Bourne-compatible.  The default is a shell that
     supports `LINENO' if available, and `/bin/sh' otherwise.

Sam Steingold ( on Fedora Core release 5 (Bordeaux)
((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))

reply via email to

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