summaryrefslogtreecommitdiff
path: root/autogen.sh
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-09-08 20:41:22 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-09-08 20:41:22 +0200
commitf20a926381ea2dccedd663db1f3bd22515f4ca8a (patch)
tree4a671f425a27342ccef25ee14aa585badd008b75 /autogen.sh
First file
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..c027031
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,25 @@
+#!/bin/sh -e
+
+# Check if hugin has been obtained:
+if [ ! -d hugin ]
+then
+ echo "You are missing the hugin submodule."
+ echo "Run"
+ echo " git submodule init"
+ echo " git submodule update"
+ echo "to obtain it."
+ exit 1
+fi
+
+# Check for the existence of cppunit.m4. If missing emulate it.
+mkdir -p actest
+cat << EOF > actest/configure.ac
+AC_INIT([actest], [1.0.0])
+AM_PATH_CPPUNIT(1.9.6)
+EOF
+[ -f acinclude.m4 ] && rm acinclude.m4
+autoreconf -W error actest 2>/dev/null || echo "AC_DEFUN([AM_PATH_CPPUNIT],[echo 'cppunit hack'])" > acinclude.m4
+rm -Rf actest
+
+# Now run autoreconf
+${AUTORECONF:-autoreconf} -fiv