[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 Makefile.in 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 SHELL=${SHELL}
echo CONFIG_SHELL=${CONFIG_SHELL}
echo 0=$0
echo BASH_VERSION=${BASH_VERSION}
echo BASH=${BASH}
here is what was printed:
SHELL=/bin/sh
CONFIG_SHELL=
0=configure
BASH_VERSION=2.05.0(1)-release
BASH=/bin/bash
so, obviously the configure script is being run by bash, but neither
SHELL nor CONFIG_SHELL tell me that, so when I put
SHELL=${CONFIG_SHELL-${SHELL-/bin/sh}}
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 (http://www.podval.org/~sds) on Fedora Core release 5 (Bordeaux)
http://memri.org http://camera.org http://ffii.org http://mideasttruth.com
http://truepeace.org http://honestreporting.com http://thereligionofpeace.com
((lambda (x) `(,x ',x)) '(lambda (x) `(,x ',x)))