>>> "Richard" == Richard Dawe <[EMAIL PROTECTED]> writes:

[...]

 Richard> I found the problem. It was due to $SHELL (in the
 Richard> environment) not being set to bash.
 >> 
 >> Is this something we should set in Automake?
 >> 
 >> For instance
 >> $ENV{'SHELL'} = '@SHELL@'
 >> where @SHELL@ is the shell computed by ./configure

 Richard> Yes, but I don't know whether you should do this for
 Richard> all platforms or just DJGPP (by checking for
 Richard> defined($ENV{'DJGPP'}) before defining $ENV{'SHELL'}
 Richard> to be @SHELL@).

Thanks.  I'm installing the following change on HEAD and branch-1-7.

2003-02-10  Alexandre Duret-Lutz  <[EMAIL PROTECTED]>

        * automake.in (BEGIN): Override $ENV{'SHELL'} with ./configure's
        SHELL for DJGPP.
        Suggested by Richard Dawe.

Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1365.2.30
diff -u -r1.1365.2.30 automake.in
--- automake.in 6 Feb 2003 16:52:51 -0000       1.1365.2.30
+++ automake.in 10 Feb 2003 14:02:35 -0000
@@ -33,6 +33,15 @@
 {
   my $perllibdir = $ENV{'perllibdir'} || '@datadir@/@PACKAGE@-@APIVERSION@';
   unshift @INC, $perllibdir;
+
+  # Override SHELL.  This is required on DJGPP so that system() uses
+  # bash, not COMMAND.COM which doesn't quote arguments properly.
+  # Other systems aren't expected to use $SHELL when Automake
+  # runs, but it should be safe to drop the `if DJGPP' gard if
+  # it turns up other systems need the same thing.  After all,
+  # if SHELL is used, ./configure's SHELL is always better than
+  # the user's SHELL (which may be something like tcsh).
+  $ENV{'SHELL'} = '@SHELL@' if exists $ENV{'DJGPP'};
 }
 
 use Automake::Struct;

-- 
Alexandre Duret-Lutz



Reply via email to