From: Thierry Reding Date: Tue, 7 Mar 2017 13:52:47 +0000 (+0100) Subject: build: use a more standard autogen.sh X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6876721f7407e15860c59b386669505c477a7850;p=qemu-gpiodev%2Flibgpiod.git 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 --- 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