And together with those for the ${var%%...} and ${var##...} expansions.
After all, it is basically impossible to find a shell that support one
of them but not the others.

Suggestion by Eric Blake.

* configure.ac: Here.

Signed-off-by: Stefano Lattarini <stefano.lattar...@gmail.com>
---
 configure.ac |   23 ++++++-----------------
 1 file changed, 6 insertions(+), 17 deletions(-)

diff --git a/configure.ac b/configure.ac
index ef6030b..586c78e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -303,23 +303,12 @@ AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
-      [supports \${var@%:@glob}],
-      [v=a/b/c; test ${v@%:@*/} = b/c],
-      [], [am_score=1; break])
-
-    _AM_CHECK_SHELL_FEATURE([$1],
-      [supports \${var@%:@@%:@glob}],
-      [v=a/b/c; test ${v@%:@@%:@*/} = c],
-      [], [am_score=1; break])
-
-    _AM_CHECK_SHELL_FEATURE([$1],
-      [supports \${var%glob}],
-      [v=a.b.c; test ${v%.*} = a.b],
-      [], [am_score=1; break])
-
-    _AM_CHECK_SHELL_FEATURE([$1],
-      [supports \${var%%glob}],
-      [v=a.b.c; test ${v%%.*} = a],
+      [supports \${var@%:@glob} and \${var%glob}],
+      [v=a/b/c \
+        && test ${v@%:@*/} = b/c \
+        && test ${v@%:@@%:@*/} = c \
+        && test ${v%/*} = a/b \
+        && test ${v%%/*} = a],
       [], [am_score=1; break])
 
     _AM_CHECK_SHELL_FEATURE([$1],
-- 
1.7.9.5


Reply via email to