]> granicus.if.org Git - p11-kit/commitdiff
Support running autogen.sh from srcdir != builddir
authorStef Walter <stefw@gnome.org>
Wed, 29 Jan 2014 09:21:45 +0000 (18:21 +0900)
committerStef Walter <stefw@gnome.org>
Wed, 29 Jan 2014 09:21:45 +0000 (18:21 +0900)
autogen.sh

index 96cb604fcc397e9a3a37932462a21e094fc63fca..94b54abf32c51282620e7620825b1adc9fdf96ab 100755 (executable)
@@ -2,6 +2,10 @@
 
 set -e
 
+oldpwd=$(pwd)
+topdir=$(dirname $0)
+cd $topdir
+
 # Some boiler plate to get git setup as expected
 if test -d .git; then
        if test -f .git/hooks/pre-commit.sample && \
@@ -27,7 +31,7 @@ test -f configure.ac~ && mv configure.ac~ configure.ac
 
 autoreconf --force --install --verbose
 if test x"$NOCONFIGURE" = x; then
-  cd build/
-  exec ../configure "$@"
+  cd $oldpwd
+  exec $topdir/configure "$@"
 fi