From: Paul Eggert Date: Thu, 24 Jun 2004 15:00:29 +0000 (+0000) Subject: * lib/m4sugar/m4sh.m4: X-Git-Tag: AUTOCONF-2.59c~675 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8dcb87fb4238879aefa8a5e6f67dcd367c2d824d;p=thirdparty%2Fautoconf.git * lib/m4sugar/m4sh.m4: Don't fail if ENV, MAIL, MAILPATH, LC_ALL, etc. are read only. --- diff --git a/ChangeLog b/ChangeLog index b5463b696..71d4fe61e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2004-06-24 Paul Eggert + + * 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 * 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 diff --git a/bin/autoconf.in b/bin/autoconf.in index ed45afc68..7a86c4ea3 100644 --- a/bin/autoconf.in +++ b/bin/autoconf.in @@ -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 diff --git a/configure b/configure index 9287d2fa9..d63dc1fd3 100755 --- 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 diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4 index 79529bbfc..480c3f3fc 100644 --- a/lib/m4sugar/m4sh.m4 +++ b/lib/m4sugar/m4sh.m4 @@ -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 diff --git a/tests/wrapper.in b/tests/wrapper.in index 848477e58..c53b8020f 100755 --- a/tests/wrapper.in +++ b/tests/wrapper.in @@ -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