From: Aki Tuomi Date: Mon, 29 Jun 2020 06:55:15 +0000 (+0300) Subject: configure: Properly fail if bison or flex is missing X-Git-Tag: 2.3.13~485 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dd87051e9ef0c7527ce264e53c3d05c643fa5da8;p=thirdparty%2Fdovecot%2Fcore.git configure: Properly fail if bison or flex is missing If bison or flex is missing, and are needed, fail configure. --- diff --git a/configure.ac b/configure.ac index 7703d0130b..884d42c124 100644 --- a/configure.ac +++ b/configure.ac @@ -297,8 +297,14 @@ AC_ISC_POSIX AC_PROG_CC AC_PROG_CPP AC_PROG_CXX # lucene plugin needs this -AC_CHECK_TOOL([FLEX],[flex],AC_ERROR(flex is required)) -AC_CHECK_TOOL([BISON],[bison],AC_ERROR(bison is required)) +AC_CHECK_TOOL([FLEX],[flex],[:]) +AC_CHECK_TOOL([BISON],[bison],[:]) +AS_IF([test "$BISON" = ":" && test ! -e src/lib/event-filter-parser.h], + AC_MSG_ERROR([Bison is required when building from git]) +]) +AS_IF([test "$FLEX" = ":" && test ! -e src/lib/event-filter-lexer.c], + AC_MSG_ERROR([flex is required when building from git]) +]) AC_HEADER_STDC AC_C_INLINE AC_PROG_LIBTOOL