Robustify autogen.sh
authorTimothy B. Terriberry <tterribe@xiph.org>
Thu, 7 Feb 2013 20:33:03 +0000 (12:33 -0800)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Fri, 8 Feb 2013 07:58:33 +0000 (18:58 +1100)
This allows the script to be run from somewhere other than the
 top-level build directory.

Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
autogen.sh

index 1a9a020..ab52ab6 100755 (executable)
@@ -2,6 +2,13 @@
 # Run this to set up the build system: configure, makefiles, etc.
 # We trust that the user has a recent enough autoconf & automake setup
 # (not older than a few years...)
+set -e
+
+srcdir=`dirname $0`
+test -n "$srcdir" && cd "$srcdir"
+
+echo "Updating build configuration files for FLAC, please wait...."
+
 touch config.rpath
-autoreconf -i
-#$srcdir/configure "$@" && echo
+autoreconf -isf
+#./configure "$@" && echo