diff options
-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 |