Fix running autogen.sh out-of-tree
authorBastien Nocera <hadess@hadess.net>
Sat, 01 Oct 2016 10:39:03 -0700
changeset 10398165f98326b5c
parent 10397 3126026a822b
child 10399 8e4a030053c2
Fix running autogen.sh out-of-tree
As done in GNOME's jhbuild building tool.

https://bugzilla.libsdl.org/show_bug.cgi?id=3374
autogen.sh
     1.1 --- a/autogen.sh	Sat Oct 01 10:38:15 2016 -0700
     1.2 +++ b/autogen.sh	Sat Oct 01 10:39:03 2016 -0700
     1.3 @@ -3,6 +3,10 @@
     1.4  echo "Generating build information using autoconf"
     1.5  echo "This may take a while ..."
     1.6  
     1.7 +srcdir=`dirname $0`
     1.8 +test -z "$srcdir" && srcdir=.
     1.9 +pushd $srcdir
    1.10 +
    1.11  # Regenerate configuration files
    1.12  cat acinclude/* >aclocal.m4
    1.13  found=false
    1.14 @@ -15,5 +19,7 @@
    1.15  fi
    1.16  (cd test; sh autogen.sh)
    1.17  
    1.18 +popd
    1.19 +
    1.20  # Run configure for this platform
    1.21  echo "Now you are ready to run ./configure"