m4sh: reduce size of AS_VAR_TEST_SET

* lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Make more compact.

Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
Eric Blake 2010-08-25 16:22:45 -06:00
parent bbf53dd459
commit ae1cc9f03f
2 changed files with 7 additions and 4 deletions

View File

@ -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.

View 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])])
## -------------------- ##