autoconf-patches
[Top][All Lists]
Advanced

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

Re: CONFIG_SHELL and `./config.status --recheck'


From: Ralf Wildenhues
Subject: Re: CONFIG_SHELL and `./config.status --recheck'
Date: Thu, 10 Nov 2005 19:58:25 +0100
User-agent: Mutt/1.5.11

Hi Paul,

* Paul Eggert wrote on Thu, Nov 10, 2005 at 01:03:59AM CET:
> That patch looks good to me, except:
> 
> > +  CONFIG_SHELL=$SHELL exec $SHELL $[0] $ac_configure_args 
> > \$ac_configure_extra_args --no-create --no-recursion
> 
> Many shells treat "A=B exec COMMAND" differently; they ignore the
> assignment.  For example, ksh M-11/16/88i, or Solaris 10 /bin/sh.
> I suspect this is a bug, though POSIX is a bit murky in this area.
> 
> So this should be reworded:

> Other than that, please install into Autoconf.

Thanks.  Applied as shown below.

Cheers,
Ralf

        * lib/autoconf/status.m4 (_AC_OUTPUT_CONFIG_STATUS): Pass
        CONFIG_SHELL in the environment of the configure rerun.
        * doc/autoconf.texi (Here-Documents, config.status Invocation):
        Suggest passing CONFIG_SHELL absolute, and in the environment
        rather than as option.

Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.932
diff -u -r1.932 autoconf.texi
--- doc/autoconf.texi   21 Oct 2005 05:46:50 -0000      1.932
+++ doc/autoconf.texi   10 Nov 2005 18:55:14 -0000
@@ -9958,8 +9958,8 @@
 version M-12/28/93d, mishandles variable expansion that occurs on
 1024-byte buffer boundaries within a here-document.  Users can generally
 fix these problems by using a faster or more reliable shell, e.g., by
-using the command @samp{bash ./configure CONFIG_SHELL=bash} rather than
-plain @samp{./configure}.
+using the command @samp{CONFIG_SHELL=/bin/bash /bin/bash ./configure} rather
+than plain @samp{./configure}.
 
 Some shells can be extremely inefficient when there are a lot of
 here-documents inside a single statement.  For instance if your
@@ -14149,9 +14149,9 @@
 option.  It must be Bourne-compatible.  The default is a shell that
 supports @code{LINENO} if available, and @file{/bin/sh} otherwise.
 Invoking @command{configure} by hand bypasses this setting, so you may
-need to use a command like @samp{/bin/bash ./configure
-CONFIG_SHELL=/bin/bash} to insure that the same shell is used
-everywhere.
+need to use a command like @samp{CONFIG_SHELL=/bin/bash /bin/bash ./configure}
+to insure that the same shell is used everywhere.  The absolute name of the
+shell should be passed.
 @end defvar
 
 @defvar CONFIG_STATUS
Index: lib/autoconf/status.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/status.m4,v
retrieving revision 1.79
diff -u -r1.79 status.m4
--- lib/autoconf/status.m4      9 Nov 2005 20:34:41 -0000       1.79
+++ lib/autoconf/status.m4      10 Nov 2005 18:55:14 -0000
@@ -1256,7 +1256,9 @@
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF
 if \$ac_cs_recheck; then
-  echo "running $SHELL $[0] " $ac_configure_args \$ac_configure_extra_args " 
--no-create --no-recursion" >&AS_MESSAGE_FD
+  echo "running CONFIG_SHELL=$SHELL $SHELL $[0] " $ac_configure_args 
\$ac_configure_extra_args " --no-create --no-recursion" >&AS_MESSAGE_FD
+  CONFIG_SHELL=$SHELL
+  export CONFIG_SHELL
   exec $SHELL $[0] $ac_configure_args \$ac_configure_extra_args --no-create 
--no-recursion
 fi
 m4_ifdef([_AC_OUTPUT_COMMANDS_INIT],




reply via email to

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