]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(_AS_UNSET_PREPARE): Work around a bug in Bash 2.01. Problem reported
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Aug 2003 01:10:58 +0000 (01:10 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 1 Aug 2003 01:10:58 +0000 (01:10 +0000)
by Brian Gough in
<http://mail.gnu.org/archive/html/bug-autoconf/2003-07/msg00106.html>.

lib/m4sugar/m4sh.m4

index e19afb9184e38d45374186a17d509afd5b59e8e4..9826b538e7258d9a5de1d72f824bf0962e408adb 100644 (file)
@@ -276,9 +276,11 @@ fi
 # _AS_UNSET_PREPARE
 # -----------------
 # AS_UNSET depends upon $as_unset: compute it.
+# Use MAIL to trigger a bug in Bash 2.01;
+# the "|| exit" suppresses the resulting "Segmentation fault" message.
 m4_defun([_AS_UNSET_PREPARE],
 [# Support unset when possible.
-if (as_foo=foo; unset as_foo) >/dev/null 2>&1; then
+if ((MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
   as_unset=unset
 else
   as_unset=false