From 6f9a4b9e362fbce53187f1979b94b5137d9f0a97 Mon Sep 17 00:00:00 2001
From: Marek Vavrusa <marek.vavrusa@nic.cz>
Date: Tue, 23 Aug 2011 08:16:23 +0000
Subject: [PATCH] Fixed flex version check and support for reentrant parsers.

---
 configure.ac   |  4 ++--
 m4/flex-test.l | 15 +++++++++++++++
 2 files changed, 17 insertions(+), 2 deletions(-)
 create mode 100644 m4/flex-test.l

diff --git a/configure.ac b/configure.ac
index c0eb23a6ed..de0ed0ce44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -22,8 +22,8 @@ LEX_FLEX=`$LEX --version | awk '{print $1;exit}'`
 if test "$LEX_FLEX" != "flex"; then
     AC_MSG_ERROR([GNU flex needed for reentrant parsers, set the \$LEX variable before running configure])
 fi
-if ! $LEX --reentrant </dev/null 2>/dev/null; then
-    AC_MSG_ERROR([GNU flex version 2.X.X or higher needed for reentrant parsers])
+if ! $LEX --reentrant m4/flex-test.l </dev/null 2>/dev/null; then
+    AC_MSG_ERROR([GNU flex version 2.5.33 or higher needed for reentrant parsers])
 fi
 AC_PROG_YACC
 YACC_BISON=`bison --version | awk '{print $1;exit}'`
diff --git a/m4/flex-test.l b/m4/flex-test.l
new file mode 100644
index 0000000000..fb758ec90d
--- /dev/null
+++ b/m4/flex-test.l
@@ -0,0 +1,15 @@
+%{
+%}
+
+%option reentrant
+%option bison-bridge
+%option noinput
+%option nounput
+%option noreject
+
+BLANK [ \t\n]
+
+%%
+<<EOF>> return 0;
+%%
+
-- 
GitLab