summaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-16 14:59:26 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-02-16 14:59:26 -0600
commit60733179a9153d05f1a66b12bc889d8abe449b49 (patch)
tree994b1566d85231edeed3e28d4fd1c162234b1d78 /autogen.sh
downloadlibcarddav-60733179a9153d05f1a66b12bc889d8abe449b49.tar.gz
libcarddav-60733179a9153d05f1a66b12bc889d8abe449b49.zip
Initial import of libcarddav
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..f4cb74d
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+
+echo "Rebuilding build system......"
+
+autoreconf --version 2>&1 > /dev/null 2>&1
+
+if [ $? -eq 0 ]; then
+ AUTORECONF=autoreconf
+else
+ AUTORECONF=
+fi
+
+error() {
+ echo "Missing tool: $1"
+ echo "Cannot proceed until the missing tool is available"
+ exit 1
+}
+
+if [ ! -z ${AUTORECONF} ]; then
+ echo "Using autoreconf to rebuild build system"
+ autoreconf --force --install --symlink
+else
+ echo "No autoreconf found. Using plain old tools to rebuild build system"
+ libtoolize --automake --force || error libtoolize
+ aclocal -I m4|| error aclocal
+ autoheader --force || error autoheader
+ automake --add-missing --force-missing --gnu || error automake
+ autoconf --force || error autoconf
+fi
+./configure $*
+
+exit 0