diff --git a/.gitignore b/.gitignore index 717dac7..7bca30e 100644 --- a/.gitignore +++ b/.gitignore @@ -10,6 +10,7 @@ Makefile.in aclocal.m4 autom4te.cache/ build-aux/ +build/ config.h config.h.in config.h.in~ diff --git a/autogen.sh b/autogen.sh index 0bb5ca8..65a6fe1 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,8 +1,17 @@ #!/bin/sh set -e -mkdir -p m4 -autoreconf -i -if test ! "x$NOCONFIGURE" = "x1" ; then - exec ./configure "$@" +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +origdir=`pwd` +cd $srcdir + +mkdir -p m4 +autoreconf -is --force + +cd $origdir + +if test -z "$NOCONFIGURE" ; then + exec $srcdir/configure "$@" fi