bug-autoconf
[Top][All Lists]
Advanced

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

autoconf uses /bin/sh in config.status; should be $CONFIG_SHELL?


From: Paul Eggert
Subject: autoconf uses /bin/sh in config.status; should be $CONFIG_SHELL?
Date: Mon, 19 Mar 2001 03:22:37 -0800 (PST)

I see that textutils-2.0.13/configure contains this:

   cat >$CONFIG_STATUS <<\_ACEOF
   #! /bin/sh
   ...
   SHELL=${CONFIG_SHELL-/bin/sh}
   ...
   _ACEOF

This appears to me to be an autoconf bug: surely config.status should
use $CONFIG_SHELL, not /bin/sh.  I.e. surely configure should contain
something like this instead:

   sed "s'/bin/sh'$CONFIG_SHELL'g" >$CONFIG_STATUS <<\_ACEOF
   #! /bin/sh
   ...
   SHELL=${CONFIG_SHELL-'/bin/sh'}
   ...
   _ACEOF


Here's an untested patch.

2001-03-19  Paul Eggert  <address@hidden>

        * acgeneral.m4 (_AC_OUTPUT_CONFIG_STATUS): Use $CONFIG_SHELL,
        not /bin/sh, to execute $CONFIG_STATUS.  Quote /bin/sh so that
        it works properly even if $CONFIG_SHELL contains some strange
        characters.

--- acgeneral.m4        Mon Mar 19 02:22:30 2001
+++ acgeneral.m4.new    Mon Mar 19 02:27:35 2001
@@ -3588,7 +3588,7 @@ AC_PROVIDE_IFELSE([AC_CONFIG_SUBDIRS], [
 # shells die.  Unfortunately the limit is not known precisely...
 m4_define([_AC_OUTPUT_CONFIG_STATUS],
 [AC_MSG_NOTICE([creating $CONFIG_STATUS])
-cat >$CONFIG_STATUS <<\_ACEOF
+sed "s'/bin/sh'$CONFIG_SHELL'g" >$CONFIG_STATUS <<\_ACEOF
 #! /bin/sh
 # Generated automatically by configure.
 # Run this file to recreate the current configuration.
@@ -3597,7 +3597,7 @@ cat >$CONFIG_STATUS <<\_ACEOF
 
 debug=false
 as_me=`echo "$[0]" | sed 's,.*/,,'`
-SHELL=${CONFIG_SHELL-/bin/sh}
+SHELL=${CONFIG_SHELL-'/bin/sh'}
 
 AS_SHELL_SANITIZE
 _AC_INIT_DEFAULTS_FDS



reply via email to

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