From 80c6028ddd1d33a6262be484bb4190a85a610e7b Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Tue, 26 Jun 2012 13:14:10 +0000 Subject: [PATCH] Allow to build outside source directory Reviewed-by: James Cameron Acked-by: Simon Schampijer --- autogen.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index f25b0a3c..c5e1bf34 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,15 @@ #!/bin/sh + +test -n "${srcdir}" || srcdir=`dirname "$0"` +test -n "${srcdir}" || srcdir="$(pwd)" + +olddir="$(pwd)" +cd "$srcdir" + export ACLOCAL="aclocal -I m4" intltoolize autoreconf -i -./configure --enable-maintainer-mode "$@" + +cd "$olddir" +"$srcdir/configure" --enable-maintainer-mode "$@"