From 7f7ad3f2bf2208438968b845754e313a6821794a Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Fri, 20 Sep 2013 11:52:21 +0200 Subject: [PATCH] autogen.sh: Allow calling from out of tree This is similar to the fix that was done for gstreamer https://bugzilla.gnome.org/show_bug.cgi?id=667664 --- autogen.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/autogen.sh b/autogen.sh index e43e0df..5611736 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,9 +1,20 @@ #!/bin/sh +set -e + if [ `whoami` = ds ] ; then confargs="$confargs --enable-gtk-doc" fi -autoreconf -i -f && -./configure --disable-static $confargs $@ +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +olddir=`pwd` +cd "$srcdir" + +autoreconf -i -f + +cd "$olddir" + +$srcdir/configure --disable-static $confargs $@ -- 2.7.4