Allow non-sourcedir build
authorTheppitak Karoonboonyanan <thep@linux.thai.net>
Wed, 22 Aug 2012 04:52:21 +0000 (11:52 +0700)
committerJens Georg <mail@jensge.org>
Fri, 30 Nov 2012 13:21:02 +0000 (14:21 +0100)
https://bugzilla.gnome.org/show_bug.cgi?id=682576

autogen.sh

index b9f6b87..2227774 100755 (executable)
 #  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 #  Boston, MA 02110-1301, USA.
 
+test -n "$srcdir" || srcdir=`dirname "$0"`
+test -n "$srcdir" || srcdir=.
+
+olddir=`pwd`
+cd "$srcdir"
+
 gtkdocize || exit 1
 ACLOCAL="${ACLOCAL-aclocal} $ACLOCAL_FLAGS" autoreconf -v --install || exit 1
-./configure --enable-maintainer-mode --enable-debug "$@"
+
+cd "$olddir"
+if test -z "$NOCONFIGURE"; then
+    "$srcdir/configure" --enable-maintainer-mode --enable-debug "$@"
+fi