[Top][All Lists]

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

autoconf 2.57 and DJGPP: autoconf Perl programs & $ENV{'SHELL'}

From: Richard Dawe
Subject: autoconf 2.57 and DJGPP: autoconf Perl programs & $ENV{'SHELL'}
Date: Sat, 11 Jan 2003 11:44:37 +0000


One problem that I found when porting autoconf 2.57 to DJGPP, based on Tim van
Holder's work, is that some of the Perl programs failed, because they were
using, the Windows command-line shell (*). does not
support the redirection constructs supported by Unix /bin/sh.

(*) on Windows versions before Windows NT

The solution I adopted is to hardcode the setting of $SHELL, as detected by
the configure script, into the Perl scripts. An example patch is below. In
reality you may wish to do this based on the setting of a DJGPP-specific
environment variable, e.g. DJDIR, the path to the main DJGPP directory, which
corresponds roughly to /usr on Unices & Linux. This approach has been used in
tests/, from the fileutils test suite:

    # When running in a DJGPP environment, make $ENV{SHELL} point to bash.
    # Otherwise, a bad shell might be used (e.g. and many
    # tests would fail.
    defined $ENV{DJDIR}
      and $ENV{SHELL} = "$ENV{DJDIR}/bin/bash.exe";

Thanks, regards,

Richard Dawe [ ]

--- /dev/c/develop/ports/orig/autoconf-2.57/bin/   2002-10-22
11:14:44.000000000 +0000
+++ /dev/c/develop/ports/ 2003-01-04
12:58:50.000000000 +0000
@@ -29,6 +29,11 @@ eval 'case $# in 0) exec @PERL@ -S "$0";
+  # <address@hidden>: We need to use bash as the shell,
+  # to support command-line redirection. $ENV{SHELL} may be set
+  # to COMMAND.COM, which will not work.
+  $ENV{'SHELL'} = "@SHELL@";
   my $perllibdir = $ENV{'autom4te_perllibdir'} || '@datadir@';
   unshift @INC, "$perllibdir";

reply via email to

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