summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8fc1bf9)
raw | patch | inline | side by side (parent: 8fc1bf9)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Sat, 12 Dec 2015 16:07:54 +0000 (17:07 +0100) | ||
committer | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Fri, 26 Feb 2016 16:31:49 +0000 (17:31 +0100) |
We use some bison-specific extensions so we really need bison, not yacc.
This has bitten a few people before, so make it easier for them.
Bison is only needed when compiling from git, since we ship the generated file
in the tarball. We take this into account by checking for the generated file first.
This has bitten a few people before, so make it easier for them.
Bison is only needed when compiling from git, since we ship the generated file
in the tarball. We take this into account by checking for the generated file first.
configure.ac | patch | blob | history |
diff --git a/configure.ac b/configure.ac
index f623263f00463014638773702f3925ad77af6cf7..912aa9175b5cf9af4291d04a2f186e393e173bc0 100644 (file)
--- a/configure.ac
+++ b/configure.ac
#
AC_PROG_CC
AC_PROG_CPP
+AC_PROG_EGREP
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
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