# HG changeset patch # User Manuele Conti # Date 1343681940 -7200 # Node ID eaa49b276e17ed445745dd0e2876fbb305614fdc # Parent e3616f6b6959e38bca0b5ebe020c34a006eab909 Add check bison version in configure.ac file. To build correctly matiec we need bison greater or equals than 2.4 version. Now the "configure" script is able to check if system has correctly requirements. diff -r e3616f6b6959 -r eaa49b276e17 configure.ac --- a/configure.ac Thu Aug 16 18:28:23 2012 +0100 +++ b/configure.ac Mon Jul 30 22:59:00 2012 +0200 @@ -25,6 +25,21 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_RANLIB +AC_PROG_AWK + +# Check bison version, we need a version great or equal than 2.4 to build matiec. +[[[ $(bison --version) =~ ([0-9][.][0-9]*) ]]] && version_bison="${BASH_REMATCH[[1]]}" + +AS_IF([awk -v ver="$version_bison" 'BEGIN { if (ver < 2.4) exit 1; }'], + [have_bison_correct=yes], [have_bison_correct=no]) + + +if test "x${have_bison_correct}" = xno; then + echo "------------------------------------------" + echo " Wrong bison version: $version_bison < 2.4 " + echo "------------------------------------------" + (exit 1); exit 1; +fi # Checks for header files. AC_CHECK_HEADERS([float.h limits.h stdint.h stdlib.h string.h strings.h sys/timeb.h unistd.h]) @@ -47,6 +62,7 @@ AC_FUNC_REALLOC AC_CHECK_FUNCS([clock_gettime memset pow strcasecmp strdup strtoul strtoull]) + AC_CONFIG_MACRO_DIR([config]) AC_CONFIG_FILES([Makefile \