aboutsummaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorjcid <devnull@localhost>2007-10-07 00:43:20 +0200
committerjcid <devnull@localhost>2007-10-07 00:43:20 +0200
commit66a921919f22190ff4b01b6eb521544f30b55a7d (patch)
tree6f887c0889982e9fcac859c56f5a7004b03e3dd5 /autogen.sh
parent93715c46a99c96d6c866968312691ec9ab0f6a03 (diff)
Added autogen.sh
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh59
1 files changed, 59 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 00000000..ab7dc444
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,59 @@
+#!/bin/sh
+#
+# Script to generate configure&make stuff
+#
+
+#-----------------------------------------------------
+# If defined, get these programs from the environment
+#
+: ${ACLOCAL:=aclocal}
+: ${AUTOHEADER:=autoheader}
+: ${AUTOCONF:=autoconf}
+: ${AUTOMAKE:=automake}
+
+#-------------------------
+# Required binaries check
+#
+check_bin_file(){
+ which $1 > /dev/null 2>&1
+ if [ $? = 0 ]; then
+ return 0
+ else
+ return 1
+ fi
+}
+
+#------
+# Main
+#
+
+#clear
+ERR="no"
+for cmd in "$ACLOCAL" "$AUTOHEADER" "$AUTOCONF" "$AUTOMAKE"
+do
+ if check_bin_file "$cmd"
+ then
+ echo -e "$cmd \tfound"
+ else
+ echo -e "$cmd \tNOT found"
+ ERR="yes"
+ fi
+done
+
+if test $ERR = "yes"
+then
+ echo
+ echo "ERROR: to run this program you need the following installed"
+ echo " $ACLOCAL $AUTOHEADER $AUTOCONF $AUTOMAKE"
+ echo
+ exit 1
+fi
+
+echo "[Checks passed]"
+echo "Generating..."
+
+"$ACLOCAL"
+"$AUTOHEADER"
+"$AUTOCONF"
+"$AUTOMAKE" -a
+