From 6876721f7407e15860c59b386669505c477a7850 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Tue, 7 Mar 2017 14:52:47 +0100 Subject: [PATCH] build: use a more standard autogen.sh This version of the autogen.sh script allows execution from a sub- directory and will automatically run the configure script that it has generated. This is useful for out-of-tree and cross builds. Signed-off-by: Thierry Reding Signed-off-by: Bartosz Golaszewski --- autogen.sh | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/autogen.sh b/autogen.sh index 7f824e9..45a11fc 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,3 +1,14 @@ #!/bin/sh -autoreconf --force --install --verbose +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +ORIGDIR=`pwd` +cd "$srcdir" + +autoreconf --force --install --verbose || exit 1 +cd $ORIGDIR || exit $? + +if test -z "$NOCONFIGURE"; then + exec "$srcdir"/configure "$@" +fi -- 2.30.2