]> git.datanom.net - vcard-parser.git/blobdiff - autogen.sh
New function
[vcard-parser.git] / autogen.sh
index 0c4b0aea3abca1eda76cb31b5acc7eed6f09c903..c9f6e385fc738497579c623a728142590606d67c 100755 (executable)
@@ -1,8 +1,32 @@
 #!/bin/sh
 
-autoconf
-automake --add-missing
-libtoolize
-autoreconf -f
-./configure --enable-maintainer-mode
+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 --enable-maintainer-mode $*
+
+exit 0
This page took 0.028767 seconds and 5 git commands to generate.