From: Ruben Kerkhof Date: Fri, 26 Feb 2016 21:51:50 +0000 (+0100) Subject: Merge pull request #1570 from rubenk/detect-bison X-Git-Tag: collectd-5.5.2~6^2~38 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=9c0d7874312b86db7ca94c12f1285ae6d1cb0c1a;hp=ead2c08d3110f1c67f1fd77986a7ed7fa296a1ab;p=collectd.git Merge pull request #1570 from rubenk/detect-bison configure.ac: detect bison --- diff --git a/configure.ac b/configure.ac index f623263f..912aa917 100644 --- a/configure.ac +++ b/configure.ac @@ -44,6 +44,7 @@ AC_SYS_LARGEFILE # AC_PROG_CC AC_PROG_CPP +AC_PROG_EGREP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET @@ -60,6 +61,18 @@ m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-conf PKG_PROG_PKG_CONFIG +AC_CACHE_CHECK([if bison is the parser generator], + [collectd_cv_prog_bison], + [AS_IF([$YACC --version 2>/dev/null | $EGREP -q '^bison '], + [collectd_cv_prog_bison=yes], [collectd_cv_prog_bison=no] + )] +) + +if test "x$collectd_cv_prog_bison" = "xno" && test ! -f "${srcdir}/liboconfig/parser.c" +then + AC_MSG_ERROR([bison is missing and you do not have ${srcdir}/liboconfig/parser.c. Please install bison]) +fi + AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no]) if test "x$have_protoc_c" = "xno" then