configure: do not fork off grep subprocess while testing for whitespace
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>
Wed, 26 Aug 2015 03:22:49 +0000 (23:22 -0400)
committerMichael Niedermayer <michael@niedermayer.cc>
Wed, 26 Aug 2015 09:53:15 +0000 (11:53 +0200)
grep is not necessary for the functionality.
This avoids an unnecessary fork.

Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
configure

index 76c6662..6449018 100755 (executable)
--- a/configure
+++ b/configure
@@ -2974,8 +2974,9 @@ if test -f configure; then
     source_path=.
 else
     source_path=$(cd $(dirname "$0"); pwd)
-    echo "$source_path" | grep -q '[[:blank:]]' &&
-        die "Out of tree builds are impossible with whitespace in source path."
+    case "$source_path" in
+        *[[:blank:]]*) die "Out of tree builds are impossible with whitespace in source path." ;;
+    esac
     test -e "$source_path/config.h" &&
         die "Out of tree builds are impossible with config.h in source dir."
 fi