From: Ruben Kerkhof Date: Sat, 27 Dec 2014 17:11:55 +0000 (+0100) Subject: Check for bison instead of yacc X-Git-Tag: rec-3.7.0-rc1~67^2~22^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2014%2Fhead;p=thirdparty%2Fpdns.git Check for bison instead of yacc Bail out if we need it but can't find it. Part of #774 --- diff --git a/configure.ac b/configure.ac index 19cda86960..1b36736a66 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ AC_CANONICAL_HOST AC_PROG_CC AM_PROG_CC_C_O -AC_PROG_YACC +PDNS_CHECK_BISON AM_PROG_LEX AC_PROG_INSTALL AC_PROG_MAKE_SET diff --git a/m4/pdns_check_bison.m4 b/m4/pdns_check_bison.m4 new file mode 100644 index 0000000000..7f1c83c13e --- /dev/null +++ b/m4/pdns_check_bison.m4 @@ -0,0 +1,15 @@ +AC_DEFUN([PDNS_CHECK_BISON], [ + AC_REQUIRE([AC_PROG_YACC]) + AC_REQUIRE([AC_PROG_EGREP]) + + AC_CACHE_CHECK([if bison is the parser generator],[pdns_cv_prog_bison],[ + AS_IF([$YACC --version 2>/dev/null | $EGREP -q '^bison '], + [pdns_cv_prog_bison=yes], [pdns_cv_prog_bison=no]) + ]) + + AS_IF([test "x$pdns_cv_prog_bison" = "xno"], [ + AS_IF([test ! -f "${srcdir}/pdns/bindparser.cc"], + [AC_MSG_ERROR([bison is missing and you don't have ${srcdir}/pdns/bindparser.cc. Please install bison])] + )] + ) +])