OSDN Git Service

build: Fix autogen.sh to allow out-of-tree builds
authorMatt Turner <mattst88@gmail.com>
Wed, 1 Aug 2012 21:11:31 +0000 (14:11 -0700)
committerMatt Turner <mattst88@gmail.com>
Tue, 14 Aug 2012 17:54:39 +0000 (10:54 -0700)
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
autogen.sh

index b5f6ec4..626d213 100755 (executable)
@@ -3,17 +3,11 @@
 srcdir=`dirname "$0"`
 test -z "$srcdir" && srcdir=.
 
-SRCDIR=`(cd "$srcdir" && pwd)`
 ORIGDIR=`pwd`
-
-if test "x$SRCDIR" != "x$ORIGDIR"; then
-       echo "Mesa cannot be built when srcdir != builddir" 1>&2
-       exit 1
-fi
-
-MAKEFLAGS=""
+cd "$srcdir"
 
 autoreconf -v --install || exit 1
+cd $ORIGDIR || exit $?
 
 if test -z "$NOCONFIGURE"; then
     "$srcdir"/configure "$@"