Hello Ralf,
first, please let me apologize that I haven't got to this earlier.
On Sat, Jan 14, 2006 at 02:56:32PM +0100, Ralf Wildenhues wrote:
> > Let's find a good specification first; [...]
> Stepan, people would like to see new versions [...]
you are absolutely right. Please forget about my "grand" proposals.
But let's adjust the details of `CONFIG_SHELL' documentation:
It took big effort (and still takes) to teach people to put variables
to the argument list.
With current version of Autoconf, the command
/bin/bash ./configure CONFIG_SHELL=/bin/bash
doesn't work as expected, because value of the environment variable
CONFIG_SHELL is used before the arguments are parsed. This is a bug,
and I believe that it'll be eventually fixed.[*] But you are right,
Ralf, that it is better to put the fix off, after 2.60.
There is a workaround for the bug, to set CONFIG_SHELL also in the
environment. Though it's enough to set it only in the environment,
I'd prefer to tell people to set it twice
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
because it shows the nature of the workaround.
I think that it's better to use the term `workaround for a bug', not
`exception from the rule'.
Attached please find a suggested patch.
Have a nice day,
Stepan
[*] A footnote:
The fix for the bug will be relatively simple:
for as_option
do
case $as_option in
CONFIG_SHELL=* )
CONFIG_SHELL=`expr "$as_option" : '[^=]*=\(.*\)'`
export CONFIG_SHELL ;;
esac
done
(Yes, it breaks for lines like
./configure --enable-variables 'CONFIG_SHELL=none FOO=bar'
but the preffered syntax
./configure --enable-variables='CONFIG_SHELL=none FOO=bar'
works perfectly, so this is not a big problem.)
2006-02-01 Stepan Kasal <[EMAIL PROTECTED]>
* doc/install.texi (Defining Variables): Classify the `CONFIG_SHELL'
hint as ``a workaround for a bug.''
Index: doc/install.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/install.texi,v
retrieving revision 1.44
diff -u -r1.44 install.texi
--- doc/install.texi 31 Jan 2006 12:03:32 -0000 1.44
+++ doc/install.texi 1 Feb 2006 17:03:30 -0000
@@ -226,17 +226,25 @@
@noindent
causes the specified @command{gcc} to be used as the C compiler (unless it is
overridden in the site shell script).
-Because the value of @var{CONFIG_SHELL} may be needed before the argument
-parsing loop of @command{configure}, it is an exception to this rule, and
-should be put in the environment:
+
[EMAIL PROTECTED]
+Unfortunately, there is a bug in Autoconf 2.60: the command
+
[EMAIL PROTECTED]
+/bin/bash ./configure CONFIG_SHELL=/bin/bash
[EMAIL PROTECTED] example
+
[EMAIL PROTECTED]
+doesn't work as it should. A possible workaround is to set the variable in
+the environment, too:
@example
-CONFIG_SHELL=/bin/bash /bin/bash ./configure
+CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
@end example
@noindent
-Here the @samp{CONFIG_SHELL=/bin/bash} operand causes subsequent
-configuration-related scripts to be executed by @command{/bin/bash}.
+This problem will be fixed in a future release of Autoconf.
+
@node configure Invocation
@section @command{configure} Invocation