]> granicus.if.org Git - libevent/commitdiff
automake: define serial-tests only if automake have this option
authorAzat Khuzhin <a3at.mail@gmail.com>
Wed, 11 May 2016 13:02:02 +0000 (16:02 +0300)
committerAzat Khuzhin <a3at.mail@gmail.com>
Wed, 11 May 2016 13:47:46 +0000 (16:47 +0300)
P.S. I did try a lot of other ways, but seems that this is the only one that
will work.

Fixes: automake 1.11
Travis-CI: https://travis-ci.org/azat/libevent/jobs/129398265

Makefile.am
configure.ac

index 3457f7cb06a307beaaa316dde42d514a77739bc6..f740bf3d103e288f21f6046779c71375399a0218 100644 (file)
@@ -4,10 +4,6 @@
 #
 # See LICENSE for copying information.
 
-# 'foreign' means that we're not enforcing GNU package rules strictly.
-# '1.9' means that we need automake 1.9 or later (and we do).
-AUTOMAKE_OPTIONS = foreign 1.9 subdir-objects serial-tests
-
 ACLOCAL_AMFLAGS = -I m4
 
 # This is the "Release" of the Libevent ABI.  It takes precedence over
index 15cc47cb548b15d7cb15157d2f157f134070792b..334d29686c4f88281c51607a994257dc41064f0e 100644 (file)
@@ -10,7 +10,18 @@ AC_PREREQ(2.59)
 AC_CONFIG_SRCDIR(event.c)
 
 AC_CONFIG_MACRO_DIR([m4])
-AM_INIT_AUTOMAKE
+
+# 'foreign' means that we're not enforcing GNU package rules strictly.
+# '1.9' means that we need automake 1.9 or later (and we do).
+# serial-tests means that we don't need parallel test harness
+AM_INIT_AUTOMAKE(m4_esyscmd([echo foreign 1.9 subdir-objects
+    case `automake --version | head -n 1` in
+    *1.9*);;
+    *1.10*);;
+    *1.11*);;
+    *) echo serial-tests;;
+    esac]))
+
 dnl AM_SILENT_RULES req. automake 1.11.  [no] defaults V=1
 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
 AC_CONFIG_HEADERS(config.h  evconfig-private.h:evconfig-private.h.in)