]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* NEWS: Autoconf-generated shell scripts no longer export BIN_SH,
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Oct 2006 19:35:57 +0000 (19:35 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Oct 2006 19:35:57 +0000 (19:35 +0000)
due to configuration hassles with this.  See Tonya Underwood's report
<http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00003.html>.
* doc/autoconf.texi (Special Shell Variables): Likewise.

2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
    Stepan Kasal  <kasal@ucw.cz>

* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Don't set BIN_SH.
(_AS_DETECT_BETTER_SHELL): Don't look in /usr/bin/posix.

2006-10-11  Stepan Kasal  <kasal@ucw.cz>

* lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Move the
  initialization which is not inherited through the environment
(_AS_BOURNE_COMPATIBLE): ... to this new macro.
(_AS_RUN): Call _AS_BOURNE_COMPATIBLE, not AS_BOURNE_COMPATIBLE.

ChangeLog
NEWS
doc/autoconf.texi
lib/m4sugar/m4sh.m4

index 1bc6d76b38211a0d4c264dd7386f16d09793340b..32815e253b38c532eb46ee1d85248a917f82d571 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * NEWS: Autoconf-generated shell scripts no longer export BIN_SH,
+       due to configuration hassles with this.  See Tonya Underwood's report
+       <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00003.html>.
+       * doc/autoconf.texi (Special Shell Variables): Likewise.
+
+2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
+           Stepan Kasal  <kasal@ucw.cz>
+
+       * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Don't set BIN_SH.
+       (_AS_DETECT_BETTER_SHELL): Don't look in /usr/bin/posix.
+
+2006-10-11  Stepan Kasal  <kasal@ucw.cz>
+
+       * lib/m4sugar/m4sh.m4 (AS_BOURNE_COMPATIBLE): Move the
+         initialization which is not inherited through the environment
+       (_AS_BOURNE_COMPATIBLE): ... to this new macro.
+       (_AS_RUN): Call _AS_BOURNE_COMPATIBLE, not AS_BOURNE_COMPATIBLE.
+
 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
 
        * doc/autoconf.texi (Limitations of Usual Tools): Describe
diff --git a/NEWS b/NEWS
index 26ecd66c374ff0668f181f73e18b8c97cc535efd..1c7bd5c238de2bd17e593aafeda921af07641a23 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,11 @@
 * Major changes in Autoconf 2.60b (??)
 
+** BIN_SH
+  Autoconf-generated shell scripts no longer export BIN_SH, due to
+  configuration hassles with this.  Installers who need BIN_SH in
+  their environment should set it before invoking 'configure' and
+  'make'.  As far as we know, this affects only Unixware installations.
+
 ** Obsolescent macros
   The documentation now says that the following macros are obsolescent,
   as they are superseded by Gnulib:
index 335164a612385fc8db93db98f657f59428599c0a..189c057a790c43577fcbe1c3cecf04eafbff28ab 100644 (file)
@@ -11891,7 +11891,6 @@ the last command executed.
 @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 405432d82b22295ecc87ffb25c024e86b8c3f7a1..b74fdcb7ea59d8324bdb4abb70ebdac239b34ffa 100644 (file)
@@ -161,24 +161,30 @@ $2
 # --------------------
 # 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
 # <http://lists.gnu.org/archive/html/autoconf-patches/2006-03/msg00081.html>.
-# 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
 # <http://lists.gnu.org/archive/html/bug-autoconf/2006-06/msg00025.html>.
 m4_define([AS_BOURNE_COMPATIBLE],
-[# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
+[# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+_$0
+])
+
+# _AS_BOURNE_COMPATIBLE
+# ---------------------
+# This is the part of AS_BOURNE_COMPATIBLE which has to be repeated inside
+# each instance.
+m4_define([_AS_BOURNE_COMPATIBLE],
+[AS_IF([test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1],
+ [emulate sh
   NULLCMD=:
   [#] Zsh 3.x and 4.x performs word splitting on ${1+"$[@]"}, which
   # is contrary to our usage.  Disable this feature.
   alias -g '${1+"$[@]"}'='"$[@]"'
-  setopt NO_GLOB_SUBST
-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
+  setopt NO_GLOB_SUBST],
+ [AS_CASE([`(set -o) 2>/dev/null`], [*posix*], [set -o posix])])
 ])
 
 
@@ -189,7 +195,7 @@ DUALCASE=1; export DUALCASE # for MKS sh
 m4_define([_AS_RUN],
 [m4_ifval([$2],
 [{ $2 <<\_ASEOF
-AS_BOURNE_COMPATIBLE
+_AS_BOURNE_COMPATIBLE
 $1
 _ASEOF
 }],
@@ -223,16 +229,14 @@ m4_expand_once([m4_append([_AS_DETECT_SUGGESTED_BODY], [
 # The real workhorse for detecting a shell with the correct
 # features.
 #
-# FIXME: The '/usr/bin/posix' below works around a shell bug in OSF
-# <http://lists.gnu.org/archive/html/autoconf-patches/2006-03/msg00081.html>
-# 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
 # <http://lists.gnu.org/archive/html/bug-autoconf/2006-06/msg00017.html>
-# 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
+# <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00003.html>
 #
-# FIXME: The 'test -f "$as_shell.exe"' works around a problem in OS/2
-# <http://lists.gnu.org/archive/html/autoconf/2006-06/msg00038.html>
-# 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
+# <http://lists.gnu.org/archive/html/autoconf-patches/2006-03/msg00081.html>.
 #
 m4_defun_once([_AS_DETECT_BETTER_SHELL],
 [m4_wrap([m4_divert_text([M4SH-SANITIZE], [
@@ -245,7 +249,7 @@ if test "x$CONFIG_SHELL" = x; then
         _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