Step 1 in adding support for reentrant Flex scanners if Flex supports
[obnox/wireshark/wip.git] / configure.in
index 970c42740909c28bc23500535c5f34c953fff4b7..b345eeeab8ab476c09abf1e19efd7f642aeabec7 100644 (file)
@@ -53,6 +53,22 @@ else
 fi
 
 AC_PATH_PROG(LEX, flex)
+
+#
+# Check whether Flex supports -R, so we can build reentrant scanners.
+#
+AC_MSG_CHECKING(whether Flex can generate reentrant scanners)
+if flex -R -t <<EOF >/dev/null 2>&1
+%%
+%%
+EOF
+then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(FLEX_REENTRANT_SCANNERS, 1, [Define if Flex can generate reentrant scanners])
+else
+    AC_MSG_RESULT(no)
+fi
+
 AC_PATH_PROG(PYTHON, python)
 
 AC_SUBST(PERL)