]> git.sesse.net Git - x264/commitdiff
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)
committerFiona Glaser <fiona@x264.com>
Tue, 6 Mar 2012 16:51:04 +0000 (08:51 -0800)
configure

index db7ad0e8431c5a069c0d52cd57029bb1b46b1060..145d4685cb6d7f213824424aa30bf9152f98e8b3 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}'