From 6114bc3b065815c7810fa1ebf6defaf5bfc3459c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Jard=C3=B3n?= Date: Tue, 18 Oct 2011 17:35:19 +0100 Subject: [PATCH] autogen.sh: Improve the script a bit Fix builddir != sourcedir issues ans also run ./configure if Its needed --- autogen.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 0b51c5c2..6035bc02 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,5 +1,20 @@ #!/bin/sh +test -n "$srcdir" || srcdir=`dirname "$0"` +test -n "$srcdir" || srcdir=. + +olddir=`pwd` +cd $srcdir + +AUTORECONF=`which autoreconf` +if test -z $AUTORECONF; then + echo "*** No autoreconf found, please intall it ***" + exit 1 +fi + mkdir -p m4 -exec autoreconf -vfi +autoreconf --force --install --verbose + +cd $olddir +test -n "$NOCONFIGURE" || "$srcdir/configure" "$@"