build: make autogen.sh comply to gnome-build rules
authorDavid Herrmann <dh.herrmann@gmail.com>
Tue, 29 Oct 2013 06:50:05 +0000 (07:50 +0100)
committerDavid Herrmann <dh.herrmann@gmail.com>
Tue, 29 Oct 2013 06:50:05 +0000 (07:50 +0100)
Fix some minor autogen.sh features so we comply to common build-chain
rules.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
autogen.sh

index ccd3d9c..65a6fe1 100755 (executable)
@@ -1,8 +1,17 @@
 #!/bin/sh
 set -e
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+origdir=`pwd`
+cd $srcdir
+
 mkdir -p m4
-autoreconf -is
+autoreconf -is --force
+
+cd $origdir
 
-if test ! "x$NOCONFIGURE" = "x1" ; then
-    exec ./configure "$@"
+if test -z "$NOCONFIGURE" ; then
+    exec $srcdir/configure "$@"
 fi