X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=configure.ac;h=352a7b66e223355273fb2a58c26ac88cbe2f8950;hp=55f78d8a73d3d9950d2dcce7b5f16f4f6cd77372;hb=77ca1a45bab2f6adf9301723d0db68e5813a6d98;hpb=7a8cd12cc66a349106a34a7655944cfeac71d7c5 diff --git a/configure.ac b/configure.ac index 55f78d8a..352a7b66 100644 --- a/configure.ac +++ b/configure.ac @@ -2635,6 +2635,7 @@ AC_ARG_WITH([libgrpc++], if test "x$withval" != "xno" && test "x$withval" != "xyes"; then with_libgrpcpp_cppflags="-I$withval/include" with_libgrpcpp_ldflags="-L$withval/lib" + with_libgrpcpp_bin="$withval/bin" with_libgrpcpp="yes" fi if test "x$withval" = "xno"; then @@ -2714,7 +2715,11 @@ AC_SUBST([BUILD_WITH_LIBGRPCPP_LIBS]) # }}} AC_ARG_VAR([GRPC_CPP_PLUGIN], [path to the grpc_cpp_plugin binary]) -AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin]) +if test "x$with_libgrpcpp_bin" = "x"; then + AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin]) +else + AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin], [], "$with_libgrpcpp_bin:$PATH") +fi AM_CONDITIONAL([HAVE_GRPC_CPP], [test "x$GRPC_CPP_PLUGIN" != "x"]) # --with-libiptc {{{ @@ -3668,6 +3673,7 @@ if test "x$with_libmnl" = "xyes"; then fi AC_SUBST([BUILD_WITH_LIBMNL_CFLAGS]) AC_SUBST([BUILD_WITH_LIBMNL_LIBS]) +AM_CONDITIONAL([HAVE_LIBMNL], [test "x$with_libmnl" = "xyes"]) # }}} # --with-libnetapp {{{ @@ -5718,20 +5724,25 @@ if test "x$with_libvarnish" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags" - AC_CHECK_HEADERS([vapi/vsc.h], - [AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])], - [ - AC_CHECK_HEADERS([vsc.h], - [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support]) ], - [ - AC_CHECK_HEADERS([varnishapi.h], - [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])], - [with_libvarnish="no (found none of the varnish header files)"] - ) - ] - ) - ] - ) + $PKG_CONFIG --atleast-version=5.2 'varnishapi' 2>/dev/null + if test $? -eq 0; then + AC_DEFINE([HAVE_VARNISH_V5], [1], [Varnish 5 API support]) + else + AC_CHECK_HEADERS([vapi/vsc.h], + [AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])], + [ + AC_CHECK_HEADERS([vsc.h], + [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support]) ], + [ + AC_CHECK_HEADERS([varnishapi.h], + [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])], + [with_libvarnish="no (found none of the varnish header files)"] + ) + ] + ) + ] + ) + fi CPPFLAGS="$SAVE_CPPFLAGS" fi @@ -6373,8 +6384,18 @@ if test "x$with_libgps" = "xyes"; then plugin_gps="yes" fi -if test "x$with_libgrpcpp" = "xyes" && test "x$with_libprotobuf" = "xyes" && test "x$have_protoc3" = "xyes" && test "x$GRPC_CPP_PLUGIN" != "x"; then - plugin_grpc="yes" +plugin_grpc="yes" +if test "x$GRPC_CPP_PLUGIN" = "x"; then + plugin_grpc="no (grpc_cpp_plugin not found)" +fi +if test "x$have_protoc3" != "xyes"; then + plugin_grpc="no (protoc3 not found)" +fi +if test "x$with_libprotobuf" != "xyes"; then + plugin_grpc="no (libprotobuf not found)" +fi +if test "x$with_libgrpcpp" != "xyes"; then + plugin_grpc="no (libgrpc++ not found)" fi if test "x$have_getifaddrs" = "xyes"; then