From: Stef Walter Date: Wed, 29 Jan 2014 09:21:45 +0000 (+0900) Subject: Support running autogen.sh from srcdir != builddir X-Git-Tag: 0.20.3~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c59a6b577b7ba1990a7dc04a894c3bc4f4671471;p=p11-kit Support running autogen.sh from srcdir != builddir --- diff --git a/autogen.sh b/autogen.sh index 96cb604..94b54ab 100755 --- a/autogen.sh +++ b/autogen.sh @@ -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