summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Watson <mattdangerw@gmail.com>2013-06-19 23:48:51 -0700
committerMatt Watson <mattdangerw@gmail.com>2013-06-20 00:02:50 -0700
commit41cf9468100fdedb48af0f5658877a0a2c49e5b8 (patch)
tree62706129cdcf57479faf538af39973b527376ce7
parentdde468286c1a240da7bd509a67a3d0619432142e (diff)
Added hack so configure works with automake 1.13 and 1.11
The problem was with needing the serial-tests option in 1.13 More details here http://gnu-automake.7480.n7.nabble.com/serial-tests-option-and-backwards-compatibility-td19571.html
-rw-r--r--.gitignore1
-rwxr-xr-xautogen.sh9
-rw-r--r--configure.ac9
3 files changed, 16 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 5c7842c..2e12801 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@ stamp*
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
+/m4/serial-tests.m4
.dirstamp
# Gettext droppings
diff --git a/autogen.sh b/autogen.sh
index 6c20886..6ff77fb 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -32,6 +32,15 @@ if test -z "$NOCONFIGURE"; then
echo "environment."
fi
+am_ver=`automake --version | grep -m 1 -o '[^ ]*$'`
+# Autmake 1.11.x doesn't grasp the 'serial-tests' option. Add a m4 file which
+# defines HAS_SERIAL_TESTS_OPTION so we can keep our configure.ac forward
+# compatible
+case $am_ver in
+ *\ 1.11*|*\ 1.12*) ;;
+ *) echo 'm4_define([HAS_SERIAL_TESTS_OPTION], [1])';;
+esac > m4/serial-tests.m4
+
# Run the actual tools to prepare the clean checkout
gtkdocize || exit $?
autoreconf -fi || exit $?
diff --git a/configure.ac b/configure.ac
index 524049b..74c167e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,10 +35,13 @@ AC_INIT([Open Endless SDK], [_EOS_SDK_VERSION_MACRO],
# Verify that the source directory can be found
dnl AC_CONFIG_SRCDIR([src/hello.c])
# Initialize Automake: enable all warnings and do not insist on GNU standards
-# Automake >= 1.13 required for serial-tests
# no-portability suppresses warnings about syntax specific to GNU make
-# serial-tests uses the old-style test suite
-AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign 1.13 serial-tests])
+# If Automake >= 1.13 we need the serial-tests options
+# We use an serial-test.m4 file set up in autogen.sh to test if we need it
+m4_include([m4/serial-tests.m4])
+m4_ifdef([HAS_SERIAL_TESTS_OPTION],
+ [AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign 1.11 serial-tests])],
+ [AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign 1.11])])
# Avoid spewing garbage over the terminal ('make V=1' to see the garbage)
AM_SILENT_RULES([yes])
# Initialize Libtool; don't build static libraries