diff options
author | Vicente Olivert Riera <Vincent.Riera@imgtec.com> | 2014-08-28 11:10:07 +0100 |
---|---|---|
committer | Paul Moore <pmoore@redhat.com> | 2014-08-28 18:30:39 -0400 |
commit | b6da7a923a6200b115b5f48be7377e59b1537c3e (patch) | |
tree | f9df2153984bf1ad0d14be0688cde5fb049cb0da | |
parent | c482aff4943cb708dd27928ef3d247ae8da3dcf2 (diff) | |
download | libseccomp-b6da7a923a6200b115b5f48be7377e59b1537c3e.tar.gz |
build: only add 'serial-tests' for automake >= 1.12.
This patch is based on the following patch written by Richard W.M. Jones
from RedHat:
https://www.redhat.com/archives/libguestfs/2013-February/msg00102.html
Earlier versions of automake complain if they get a configuration
parameter which they don't understand. The error is:
configure.ac:27: error: option 'serial-tests' not recognized
Use some m4 hackery to work around this.
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
(minor style tweaks to the comments)
Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r-- | configure.ac | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 59044e6..26daeb6 100644 --- a/configure.ac +++ b/configure.ac @@ -31,7 +31,20 @@ AC_CONFIG_MACRO_DIR([m4]) dnl #### dnl automake configuration dnl #### -AM_INIT_AUTOMAKE([-Wall foreign subdir-objects tar-pax serial-tests]) +dnl Initialize automake. automake < 1.12 didn't have serial-tests and +dnl gives an error if it sees this, but for automake >= 1.13 +dnl serial-tests is required so we have to include it. Solution is to +dnl test for the version of automake (by running an external command) +dnl and provide it if necessary. Note we have to do this entirely using +dnl m4 macros since automake queries this macro by running +dnl 'autoconf --trace ...'. +m4_define([serial_tests], [ + m4_esyscmd([automake --version | + head -1 | + awk '{split ($NF,a,"."); if (a[1] == 1 && a[2] >= 12) { print "serial-tests" }}' + ]) +]) +AM_INIT_AUTOMAKE(-Wall foreign subdir-objects tar-pax serial_tests) dnl NB: Do not [quote] this parameter. dnl #### dnl build tools |