]>
Commit | Line | Data |
---|---|---|
33086d97 RK |
1 | AC_DEFUN([PDNS_CHECK_FLEX], [ |
2 | AC_REQUIRE([AC_PROG_LEX]) | |
3 | AC_REQUIRE([AC_PROG_EGREP]) | |
4 | ||
5 | AC_CACHE_CHECK([if the lexer is flex],[pdns_cv_prog_flex],[ | |
6 | AS_IF([$LEX --version 2>/dev/null | $EGREP -q '^flex '], | |
7 | [pdns_cv_prog_flex=yes], [pdns_cv_prog_flex=no]) | |
8 | ]) | |
9 | ||
10 | AS_IF([test "x$pdns_cv_prog_flex" = "xno"], [ | |
11 | AS_IF([test ! -f "${srcdir}/pdns/bindlexer.c"], | |
12 | [AC_MSG_ERROR([flex is missing and you don't have ${srcdir}/pdns/bindlexer.c. Please install flex])] | |
13 | )] | |
14 | ) | |
15 | ]) |