[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
22-as-unset.patch
From: |
Akim Demaille |
Subject: |
22-as-unset.patch |
Date: |
02 Nov 2000 12:26:03 +0100 |
User-agent: |
Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (Channel Islands) |
Index: 0.491/ChangeLog
from Akim Demaille <address@hidden>
* 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.
Index: 0.491/acgeneral.m4
--- 0.491/acgeneral.m4 Wed, 01 Nov 2000 14:06:01 +0100 akim (ace/27_acgeneral.
1.169.8.80 666)
+++ 0.492(w)/acgeneral.m4 Wed, 01 Nov 2000 14:38:57 +0100 akim
(ace/27_acgeneral. 1.169.8.81 666)
@@ -1373,12 +1373,7 @@
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])
Index: 0.491/m4sh.m4
--- 0.491/m4sh.m4 Wed, 01 Nov 2000 14:25:34 +0100 akim (ace/b/41_m4sh.m4 1.3
644)
+++ 0.492(w)/m4sh.m4 Wed, 01 Nov 2000 14:37:51 +0100 akim (ace/b/41_m4sh.m4 1.3
644)
@@ -77,12 +77,26 @@
])# 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; }])
- 22-as-unset.patch,
Akim Demaille <=