2006-10-04 Paul Eggert
Stepan Kasal
* doc/autoconf.texi (Special Shell Variables): Autoconf-generated
shell scripts no longer export BIN_SH, due to configuration
hassles with this. See, for example, Tonya Underwood's report
.
* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Don't set BIN_SH.
(_AS_DETECT_BETTER_SHELL): Don't look in /usr/bin/posix.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1090
diff -u -r1.1090 autoconf.texi
--- doc/autoconf.texi 6 Oct 2006 15:31:26 -0000 1.1090
+++ doc/autoconf.texi 9 Oct 2006 14:04:18 -0000
@@ -11891,7 +11891,6 @@
@evindex BIN_SH
In Tru64, if @env{BIN_SH} is set to @code{xpg4}, subsidiary invocations of
the standard shell conform to Posix.
-Autoconf-generated scripts export this variable when they start up.
@item CDPATH
@evindex CDPATH
Index: lib/m4sugar/m4sh.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/m4sugar/m4sh.m4,v
retrieving revision 1.196
diff -u -r1.196 m4sh.m4
--- lib/m4sugar/m4sh.m4 6 Oct 2006 15:31:26 -0000 1.196
+++ lib/m4sugar/m4sh.m4 9 Oct 2006 14:04:19 -0000
@@ -161,9 +161,10 @@
# --------------------
# Try to be as Bourne and/or POSIX as possible.
#
-# FIXME: The assignment to BIN_SH is dubious; see
+# This does not set BIN_SH, due to the problems described in
# .
-# It might be better to remove it, but first please see
+# People who need BIN_SH should set it in their environment before invoking
+# configure; apparently this would include UnixWare, as described in
# .
m4_define([AS_BOURNE_COMPATIBLE],
[# Be Bourne compatible
@@ -177,7 +178,6 @@
else
case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
fi
-BIN_SH=xpg4; export BIN_SH # for Tru64
DUALCASE=1; export DUALCASE # for MKS sh
])
@@ -223,16 +223,14 @@
# The real workhorse for detecting a shell with the correct
# features.
#
-# FIXME: The '/usr/bin/posix' below works around a shell bug in OSF
-#
-# but this causes a regression on OpenServer 6.0.0
+# In previous versions, we prepended /usr/posix/bin to the path, but that
+# caused a regression on OpenServer 6.0.0
#
-# The code should test for the OSF bug directly rather than look at
-# /usr/bin/posix here.
+# and on HP-UX 11.11, see the failure of test 120 in
+#
#
-# FIXME: The 'test -f "$as_shell.exe"' works around a problem in OS/2
-#
-# but we should replace the two test -f calls with a single AS_EXECUTABLE_P.
+# FIXME: The code should test for the OSF bug described in
+# .
#
m4_defun_once([_AS_DETECT_BETTER_SHELL],
[m4_wrap([m4_divert_text([M4SH-SANITIZE], [
@@ -245,7 +243,7 @@
_AS_RUN([_AS_DETECT_SUGGESTED_BODY]) 2> /dev/null],
[],
[as_candidate_shells=
- _AS_PATH_WALK([/usr/bin/posix$PATH_SEPARATOR/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH],
+ _AS_PATH_WALK([/bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH],
[case $as_dir in
/*)
for as_base in sh bash ksh sh5; do