summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorDave Davenport <qball@gmpclient.org>2017-04-04 18:59:35 +0200
committerDave Davenport <qball@gmpclient.org>2017-04-04 18:59:35 +0200
commitc6c0d190ab0ced0ad724f34379d027eaec9c019b (patch)
tree60318b5ec5561cb63835eb2d2d775ad0da41419e /configure.ac
parent3ef88c07fbcfdd7150d1d4ced4ac7f40e5f12633 (diff)
Add lex version check.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 7 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 1b027d2e..78a39e16 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6,12 +6,17 @@ AC_CONFIG_HEADER([config.h])
dnl ---------------------------------------------------------------------
dnl Lex & Bison language parser.
dnl ---------------------------------------------------------------------
-AC_PROG_LEX
+AC_PROG_LEX([flex])
AC_PROG_YACC
-AS_IF([test "x${LEX}" != "xflex" ], [AC_MSG_ERROR( "Failed to find flex")])
AS_IF([test "x${YACC}" != "xbison -y" ], [AC_MSG_ERROR( "Failed to find bison")])
+m4_include([m4/ax_prog_flex_version.m4])
+m4_include([m4/ax_compare_version.m4])
+AC_SUBST([FLEX], [${LEX}])
+AX_PROG_FLEX_VERSION([2.5.39],,AC_MSG_ERROR("Require flex version 2.5.39 or higher"))
+#
+
dnl ---------------------------------------------------------------------
dnl Setup automake to be silent and in foreign mode.
dnl We want xz distribution