From: Stefano Lattarini Date: Thu, 28 Jun 2012 21:29:51 +0000 (+0200) Subject: configure: clump check for ${var%...} and ${var#...} expansion together X-Git-Tag: v1.12.2~32 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e14ce4482422b56150c483cc896466ce18b6b0f9;p=thirdparty%2Fautomake.git configure: clump check for ${var%...} and ${var#...} expansion together 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 --- diff --git a/configure.ac b/configure.ac index b79f1e768..c945b13fa 100644 --- a/configure.ac +++ b/configure.ac @@ -297,23 +297,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],