+2000-11-03 Akim Demaille <akim@epita.fr>
+
+ * m4sh.m4 (_AS_UNSET_PREPARE): New macro, eved from
+ _AC_INIT_PREPARE_ENVIRONMENT, and fixed: set `FOO' before trying
+ to unset it: `unset' exits 1 if the variable is not defined.
+ (AS_UNSET): Require it. Use `as_unset' not `ac_unset'.
+ * acgeneral.m4 (_AC_INIT_PREPARE_ENVIRONMENT): Use it.
+
2000-11-03 Akim Demaille <akim@epita.fr>
* m4sugar.m4 (builtin, changecom, changequote, decr, dumpdef)
* autoconf.m4 (builtin, changecom, decr, incr, index, indir, len)
(syscmd, sysval, traceoff, traceon): Reactivate.
-
2000-11-03 Akim Demaille <akim@epita.fr>
* m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros.
set -o posix
fi
-# Support unset when possible.
-if (unset FOO) >/dev/null 2>&1; then
- ac_unset=unset
-else
- ac_unset=false
-fi
+_AS_UNSET_PREPARE
# NLS nuisances.
AS_UNSET([LANG], [C])
set -o posix
fi
-# Support unset when possible.
-if (unset FOO) >/dev/null 2>&1; then
- ac_unset=unset
-else
- ac_unset=false
-fi
+_AS_UNSET_PREPARE
# NLS nuisances.
AS_UNSET([LANG], [C])
])# AS_IFELSE
+# _AS_UNSET_PREPARE
+# -----------------
+# AS_UNSET depends upon $as_unset: compute it.
+m4_defun([_AS_UNSET_PREPARE],
+[# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+])
+
+
# AS_UNSET(VAR, [VALUE-IF-UNSET-NOT-SUPPORTED = `'])
# --------------------------------------------------
# Try to unset the env VAR, otherwise set it to
# VALUE-IF-UNSET-NOT-SUPPORTED. `ac_unset' must have been computed.
-m4_define([AS_UNSET],
-[$ac_unset $1 || test "${$1+set}" != set || { $1=$2; export $1; }])
+m4_defun([AS_UNSET],
+[m4_require([_AS_UNSET_PREPARE])dnl
+$as_unset $1 || test "${$1+set}" != set || { $1=$2; export $1; }])
# AS_EXIT([EXIT-CODE = 1])
])# AS_IFELSE
+# _AS_UNSET_PREPARE
+# -----------------
+# AS_UNSET depends upon $as_unset: compute it.
+m4_defun([_AS_UNSET_PREPARE],
+[# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+])
+
+
# AS_UNSET(VAR, [VALUE-IF-UNSET-NOT-SUPPORTED = `'])
# --------------------------------------------------
# Try to unset the env VAR, otherwise set it to
# VALUE-IF-UNSET-NOT-SUPPORTED. `ac_unset' must have been computed.
-m4_define([AS_UNSET],
-[$ac_unset $1 || test "${$1+set}" != set || { $1=$2; export $1; }])
+m4_defun([AS_UNSET],
+[m4_require([_AS_UNSET_PREPARE])dnl
+$as_unset $1 || test "${$1+set}" != set || { $1=$2; export $1; }])
# AS_EXIT([EXIT-CODE = 1])