Add error handling for out-of-tree build
authorOka Motofumi <chikuzen.mo@gmail.com>
Sun, 5 Feb 2012 21:07:34 +0000 (06:07 +0900)
committerJason Garrett-Glaser <jason@x264.com>
Tue, 6 Mar 2012 16:51:04 +0000 (08:51 -0800)
configure

index db7ad0e..145d468 100755 (executable)
--- a/configure
+++ b/configure
@@ -237,6 +237,7 @@ rm -f x264_config.h config.h config.mak config.log x264.pc x264.def conftest*
 SRCPATH="$(cd $(dirname $0); pwd)"
 [ "$SRCPATH" = "$(pwd)" ] && SRCPATH=.
 [ -n "$(echo $SRCPATH | grep ' ')" ] && die "Out of tree builds are impossible with whitespace in source path."
+[ -e "$SRCPATH/config.h" -o -e "$SRCPATH/x264_config.h" ] && die "Out of tree builds are impossible with config.h/x264_config.h in source dir."
 
 prefix='/usr/local'
 exec_prefix='${prefix}'