]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
m4sh: reduce size of AS_VAR_TEST_SET
authorEric Blake <eblake@redhat.com>
Wed, 25 Aug 2010 22:22:45 +0000 (16:22 -0600)
committerEric Blake <eblake@redhat.com>
Wed, 25 Aug 2010 23:22:21 +0000 (17:22 -0600)
* lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Make more compact.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
lib/m4sugar/m4sh.m4

index fe403cda653c180106e3efde573b5b504f846204..dbb2fbfdfb375916fbc2a166c2a9d390d41678e3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2010-08-25  Eric Blake  <eblake@redhat.com>
 
+       m4sh: reduce size of AS_VAR_TEST_SET
+       * lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Make more compact.
+
        tests: improve some shell assumption testing
        * tests/m4sh.at (Functions Support, Functions and return Support)
        (Negated classes in globbing): Update comments.
index 6b1c1ead41b2a4df89e89b6f6e174e2159c33d74..facd70d9bfc82201d2c87cece90409c2028ad19c 100644 (file)
@@ -2063,13 +2063,13 @@ m4_define([AS_VAR_SET_IF],
 
 # AS_VAR_TEST_SET(VARIABLE)
 # -------------------------
-# Expands into the `test' expression which is true if VARIABLE
+# Expands into an expression which is true if VARIABLE
 # is set.  Polymorphic.
 m4_define([AS_VAR_TEST_SET],
 [AS_LITERAL_WORD_IF([$1],
-              [test "${$1+set}" = set],
-              [{ as_var=$1; eval "test \"\${$as_var+set}\" = set"; }],
-              [eval "test \"\${$1+set}\"" = set])])
+  [${$1+:} false],
+  [{ as_var=$1; eval \${$as_var+:} false; }],
+  [eval \${$1+:} false])])
 
 
 ## -------------------- ##