Update autogen.sh to support out-of-source build

This commit is contained in:
Peifeng Yu 2018-07-23 15:17:16 -04:00
parent 35fc04acff
commit a861a033bf
2 changed files with 14 additions and 4 deletions

1
.gitignore vendored
View File

@ -10,6 +10,7 @@ Makefile.in
aclocal.m4 aclocal.m4
autom4te.cache/ autom4te.cache/
build-aux/ build-aux/
build/
config.h config.h
config.h.in config.h.in
config.h.in~ config.h.in~

View File

@ -1,8 +1,17 @@
#!/bin/sh #!/bin/sh
set -e set -e
mkdir -p m4
autoreconf -i
if test ! "x$NOCONFIGURE" = "x1" ; then srcdir=`dirname $0`
exec ./configure "$@" 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 fi