summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2014-06-04 18:55:31 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2014-06-04 18:55:31 +0200
commit9b6108117233aa5d9f500fa42a65a72fbf0b7d68 (patch)
tree1dccabe6032baf7fe7c0bc4366001aa7df80c9dc
parent125d9174e04e950921dd001ae182b0883bdbd519 (diff)
Try to work around missing cppunit, when running autogen.sh on a clean git checkout.
-rwxr-xr-xautogen.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/autogen.sh b/autogen.sh
index 298a369..a40a3ee 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,2 +1,14 @@
#!/bin/sh -e
+
+# 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 actest 2>/dev/null || echo "AC_DEFUN([AM_PATH_CPPUNIT],[])" > acinclude.m4
+rm -Rf actest
+
+# Now run autoreconf
${AUTORECONF:-autoreconf} -fiv