[FFmpeg-cvslog] configure: do not fork off grep subprocess while testing for whitespace

Ganesh Ajjanagadde git at videolan.org
Wed Aug 26 12:16:50 CEST 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Tue Aug 25 23:22:49 2015 -0400| [6455e4fb5bc36084a2f05f811614ceac3462722c] | committer: Michael Niedermayer

configure: do not fork off grep subprocess while testing for whitespace

grep is not necessary for the functionality.
This avoids an unnecessary fork.

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6455e4fb5bc36084a2f05f811614ceac3462722c
---

 configure |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 76c6662..6449018 100755
--- 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



More information about the ffmpeg-cvslog mailing list