From 6428a776c7764d1976370138ecf37bd813329afc Mon Sep 17 00:00:00 2001 From: Alban Browaeys Date: Thu, 15 Aug 2013 13:12:24 +0200 Subject: [PATCH 1/2] build: Fix out of source directory build. --- autogen.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/autogen.sh b/autogen.sh index 59c531f..7901f2d 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,6 +1,10 @@ #!/bin/sh set -e +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +builddir=`pwd` if test -n "$AUTOMAKE"; then : # don't override an explicit user request elif automake-1.11 --version >/dev/null 2>/dev/null && \ @@ -14,6 +18,7 @@ elif automake-1.11 --version >/dev/null 2>/dev/null && \ export ACLOCAL fi +cd "$srcdir" autoreconf -i -f #Check if submodules should be enabled @@ -37,11 +42,12 @@ if test $enable_submodules = true; then git submodule update # launch Wocky's autogen.sh - cd lib/ext/wocky - sh autogen.sh --no-configure - cd ../../.. + mkdir -p "$builddir"/lib/ext/wocky/ + cd "$builddir"/lib/ext/wocky/ + sh "$srcdir"/lib/ext/wocky/autogen.sh --no-configure fi +cd "$builddir" # Honor NOCONFIGURE for compatibility with gnome-autogen.sh if test x"$NOCONFIGURE" = x; then run_configure=true @@ -59,5 +65,5 @@ else fi if test $run_configure = true; then - ./configure "$@" + "$srcdir"/configure "$@" fi -- 1.8.4.rc2