]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* lib/m4sugar/m4sh.m4:
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Jun 2004 15:00:29 +0000 (15:00 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 24 Jun 2004 15:00:29 +0000 (15:00 +0000)
Don't fail if ENV, MAIL, MAILPATH, LC_ALL, etc. are read only.

ChangeLog
bin/autoconf.in
configure
lib/m4sugar/m4sh.m4
tests/wrapper.in

index b5463b6968ee916e1973ab4ee05478b00c6fcdb6..71d4fe61e26fa16e14525bcf9efd29396ffed9e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-06-24  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Require
+       _AS_UNSET_PREPARE, so that we can use $as_unset directly.
+       Don't fail if ENV or BASH_ENV is readonly.
+       (AS_SHELL_SANITIZE): Don't fail if ENV, MAIL, MAILPATH, LC_ALL,
+       etc. are read only.  Problem reported by Ludovic Courtes.
+
 2004-06-23  Noah Misch  <noah@cs.caltech.edu>
 
         * lib/m4sugar/m4sh.m4 (_AS_BOURNE_COMPATIBLE): If the shell is
@@ -9,12 +17,6 @@
        * doc/autoconf.texi (File System Conventions): Warn about
        names like "aux".  Problem reported by Eric Blake.
 
-       * lib/m4sugar/m4sh.m4 (_AS_DETECT_BETTER_SHELL): Require
-       _AS_UNSET_PREPARE, so that we can use $as_unset directly.
-       Don't fail if ENV or BASH_ENV is readonly.
-       (AS_SHELL_SANITIZE): Don't fail if ENV, MAIL, MAILPATH, LC_ALL,
-       etc. are read only.
-
        * lib/autoconf/c.m4 (AC_LANG_BOOL_COMPILE_TRY (C)): Use division
        by zero instead of array size, so that we can use any arithmetic
        constant expression (instead of requiring an integer constant
index ed45afc68b100ab5f9bf0ec522f8b7bc61fb639d..7a86c4ea30c7a3e9073eb491f47f2cd56fe33a1e 100644 (file)
@@ -71,7 +71,9 @@ if test ! -f "$as_myself"; then
 fi
 
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -85,7 +87,7 @@ do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
@@ -273,8 +275,9 @@ fi
       done
 
       if test "x$CONFIG_SHELL" != x; then
-  $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-        $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
         export CONFIG_SHELL
         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 fi
index 9287d2fa9a99446a70baf47adc071b4dde7d388e..d63dc1fd396900cc4cbb5073158b7a16b8f15847 100755 (executable)
--- a/configure
+++ b/configure
@@ -80,7 +80,9 @@ if test ! -f "$as_myself"; then
 fi
 
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -94,7 +96,7 @@ do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
@@ -296,8 +298,9 @@ fi
       done
 
       if test "x$CONFIG_SHELL" != x; then
-  $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-        $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
         export CONFIG_SHELL
         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 fi
@@ -2690,7 +2693,9 @@ echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
 fi
 
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -2704,7 +2709,7 @@ do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
index 79529bbfc4d8733b7ccc9f17fbfd76916e5bb9af..480c3f3fcdd195857b890f64a4612b95c37c014a 100644 (file)
@@ -209,6 +209,7 @@ m4_expand_once([m4_append([_AS_DETECT_SUGGESTED_BODY], [
 # features.
 m4_defun_once([_AS_DETECT_BETTER_SHELL],
 [m4_wrap([m4_divert_text([M4SH-SANITIZE], [
+AS_REQUIRE([_AS_UNSET_PREPARE])dnl
 if test "x$CONFIG_SHELL" = x; then
   AS_IF([_AS_RUN([_AS_DETECT_REQUIRED_BODY]) 2>/dev/null],
         [as_have_required=yes],
@@ -234,8 +235,9 @@ if test "x$CONFIG_SHELL" = x; then
       done
 
       AS_IF([test "x$CONFIG_SHELL" != x],
-        [AS_UNSET([ENV])
-        AS_UNSET([BASH_ENV])
+        [for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
         export CONFIG_SHELL
         exec "$CONFIG_SHELL" "$as_myself" ${1+"$[@]"}])
 
@@ -319,7 +321,9 @@ if test ! -f "$as_myself"; then
 fi
 
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -333,7 +337,7 @@ do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
index 848477e5811762ffea1092704686fd52fb228019..c53b8020f7a819818c2a32adcd0bd5aa96df1e7d 100755 (executable)
@@ -71,7 +71,9 @@ if test ! -f "$as_myself"; then
 fi
 
 # Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
 PS1='$ '
 PS2='> '
 PS4='+ '
@@ -85,7 +87,7 @@ do
   if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
     eval $as_var=C; export $as_var
   else
-    $as_unset $as_var
+    ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
   fi
 done
 
@@ -273,8 +275,9 @@ fi
       done
 
       if test "x$CONFIG_SHELL" != x; then
-  $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
-        $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+  for as_var in BASH_ENV ENV
+        do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+        done
         export CONFIG_SHELL
         exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
 fi