[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Autoconf 2.53: improved fix for problems with CONFIG_SHELL=bash
From: |
Paul Eggert |
Subject: |
Re: Autoconf 2.53: improved fix for problems with CONFIG_SHELL=bash |
Date: |
Tue, 19 Mar 2002 18:04:28 -0800 (PST) |
> From: Akim Demaille <address@hidden>
> Date: 19 Mar 2002 16:52:24 +0100
> I'm against moving bash at the end.
Likewise, given that we seem to have more problems with ksh than bash
in practice.
> Actually, I'd be happy to see zsh promoted to a higher rank too,
I would put it between bash and ksh.
> So maybe we should just keep SHELL != CONFIG_SHELL.
Sorry, I don't understand this point. I don't think Aaron Ucko was
suggesting that we use the same variable for both concepts.
Going back to his original message, I'm afraid that I don't understand
his bug report either. The Bash 2.05a manual says that Bash reads
.bashrc only if it is an interactive shell that is not a login shell,
or if it is being run by rshd. Surely neither condition applies here.
Perhaps the installers had set BASH_ENV to point to their .bashrc?
That might explain the problem. There is a similar problem with ENV
in various shells, including Bash in some cases. Sounds a bit weird,
though -- why would someone put a "cd" command in their BASH_ENV?
Anyway, If my guess is correct, the following untested patch should
fix things. But I would like some confirmation and advice before
installing this.
2002-03-19 Paul Eggert <address@hidden>
* lib/m4sugar/m4sh.m4 (_AS_LINENO_PREPARE): Unset ENV and
BASH_ENV when reinvoking the shell, to work around problems
with installers who put "cd" commands in their environments.
--- m4sh.m4.~1.76.~ 2002-03-18 22:13:55.000000000 -0800
+++ m4sh.m4 2002-03-19 17:49:08.147121000 -0800
@@ -507,6 +507,8 @@ m4_define([_AS_LINENO_PREPARE],
case $as_dir in
/*)
if ("$as_dir/$as_base" -c '_AS_LINENO_WORKS') 2>/dev/null; then
+ AS_UNSET(ENV, /dev/null)
+ AS_UNSET(BASH_ENV, /dev/null)
CONFIG_SHELL=$as_dir/$as_base
export CONFIG_SHELL
exec "$CONFIG_SHELL" "$[0]" ${1+"address@hidden"}