From ce5ad9659d60cb28c23b0402b76df3c3a7d13084 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Thu, 2 Jun 2016 13:25:06 +0100 Subject: [PATCH] build: Update autogen.sh to allow builddir != srcdir When building pulseaudio with jhbuild set up to build in a separate directory instead of the source one, the autogen.sh script needs to be able to find the various bits it calls out to. The bootstrap.sh script is going to be in the source directory, just like the generated configure script; but in a builddir != srcdir, the configure script will be called from within the build directory. --- autogen.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index f89eace..509fa49 100755 --- a/autogen.sh +++ b/autogen.sh @@ -17,6 +17,15 @@ # Only there to make jhbuild happy +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +olddir=`pwd` +cd $srcdir + NOCONFIGURE=1 ./bootstrap.sh -exec ./configure "$@" +cd "$olddir" +if test -z "$NOCONFIGURE"; then + exec "$srcdir/configure" "$@" +fi -- 2.7.4