X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=configure.ac;h=352a7b66e223355273fb2a58c26ac88cbe2f8950;hp=62bea50e6c125d5a60d87d032641747a6123788e;hb=77ca1a45bab2f6adf9301723d0db68e5813a6d98;hpb=68c08bd380d63281f5707e893c27f952c5fde1d8 diff --git a/configure.ac b/configure.ac index 62bea50e..352a7b66 100644 --- a/configure.ac +++ b/configure.ac @@ -168,6 +168,7 @@ AC_CHECK_HEADERS_ONCE([ \ pthread_np.h \ pwd.h \ regex.h \ + sys/endian.h \ sys/fs_types.h \ sys/fstyp.h \ sys/ioctl.h \ @@ -520,32 +521,6 @@ if test "x$ac_system" = "xLinux"; then ]] ) # For the turbostat plugin - AC_CHECK_HEADERS([asm/msr-index.h], - [have_asm_msrindex_h="yes"], - [have_asm_msrindex_h="no"] - ) - - if test "x$have_asm_msrindex_h" = "xyes"; then - AC_CACHE_CHECK([whether asm/msr-index.h has MSR_PKG_C10_RESIDENCY], - [c_cv_have_usable_asm_msrindex_h], - [ - AC_COMPILE_IFELSE( - [ - AC_LANG_PROGRAM( - [[#include]], - [[ - int y = MSR_PKG_C10_RESIDENCY; - return(y); - ]] - ) - ], - [c_cv_have_usable_asm_msrindex_h="yes"], - [c_cv_have_usable_asm_msrindex_h="no"], - ) - ] - ) - fi - AC_CHECK_HEADERS([cpuid.h], [have_cpuid_h="yes"], [have_cpuid_h="no (cpuid.h not found)"] @@ -2349,7 +2324,9 @@ AC_SUBST(BUILD_WITH_LIBDBI_LIBS) # --with-libdpdk {{{ AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk]) +AC_ARG_VAR([LIBDPDK_CFLAGS], [Compiler flags for libdpdk]) AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk]) +AC_ARG_VAR([LIBDPDK_LIBS], [Libraries to link for libdpdk]) AC_ARG_WITH([libdpdk], [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])], @@ -2358,11 +2335,26 @@ AC_ARG_WITH([libdpdk], ) if test "x$with_libdpdk" != "xno"; then + PKG_CHECK_MODULES([DPDK], [libdpdk], [], + [AC_MSG_NOTICE([no DPDK pkg-config, using defaults])]) if test "x$LIBDPDK_CPPFLAGS" = "x"; then LIBDPDK_CPPFLAGS="-I/usr/include/dpdk" fi + if test "x$LIBDPDK_CFLAGS" = "x"; then + LIBDPDK_CFLAGS="$DPDK_CFLAGS" + LIBDPDK_CPPFLAGS="$LIBDPDK_CPPFLAGS $DPDK_CFLAGS" + fi + if test "x$LIBDPDK_LIBS" = "x"; then + if test "x$DPDK_LIBS" != "x"; then + LIBDPDK_LIBS="$DPDK_LIBS" + else + LIBDPDK_LIBS="-ldpdk" + fi + fi SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS" + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$LIBDPDK_CFLAGS $CFLAGS" AC_CHECK_HEADERS([rte_config.h], [ with_libdpdk="yes" @@ -2384,6 +2376,7 @@ if test "x$with_libdpdk" != "xno"; then [with_libdpdk="no (rte_config.h not found)"] ) CPPFLAGS="$SAVE_CPPFLAGS" + CFLAGS="$SAVE_CFLAGS" fi if test "x$with_libdpdk" = "xyes"; then @@ -2642,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 @@ -2721,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 {{{ @@ -3675,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 {{{ @@ -5725,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 @@ -6150,6 +6154,7 @@ plugin_python="no" plugin_serial="no" plugin_smart="no" plugin_swap="no" +plugin_synproxy="no" plugin_tape="no" plugin_tcpconns="no" plugin_ted="no" @@ -6194,6 +6199,7 @@ if test "x$ac_system" = "xLinux"; then plugin_protocols="yes" plugin_serial="yes" plugin_swap="yes" + plugin_synproxy="yes" plugin_tcpconns="yes" plugin_thermal="yes" plugin_uptime="yes" @@ -6206,7 +6212,7 @@ if test "x$ac_system" = "xLinux"; then plugin_ipvs="yes" fi - if test "x$c_cv_have_usable_asm_msrindex_h" = "xyes" && test "x$have_cpuid_h" = "xyes"; then + if test "x$have_cpuid_h" = "xyes"; then plugin_turbostat="yes" fi @@ -6378,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 @@ -6469,8 +6485,7 @@ if test "x$with_libxenctrl" = "xyes"; then plugin_xencpu="yes" fi -if test "x$with_libdpdk" = "xyes" -then +if test "x$with_libdpdk" = "xyes"; then plugin_dpdkevents="$dpdk_keepalive" plugin_dpdkstat="yes" fi @@ -6607,6 +6622,7 @@ AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugi AC_PLUGIN([snmp_agent], [$with_libnetsnmpagent], [SNMP agent plugin]) AC_PLUGIN([statsd], [yes], [StatsD plugin]) AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics]) +AC_PLUGIN([synproxy], [$plugin_synproxy], [Synproxy stats plugin]) AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin]) AC_PLUGIN([table], [yes], [Parsing of tabular data]) AC_PLUGIN([tail], [yes], [Parsing of logfiles]) @@ -7024,6 +7040,7 @@ AC_MSG_RESULT([ snmp . . . . . . . . $enable_snmp]) AC_MSG_RESULT([ snmp_agent . . . . . $enable_snmp_agent]) AC_MSG_RESULT([ statsd . . . . . . . $enable_statsd]) AC_MSG_RESULT([ swap . . . . . . . . $enable_swap]) +AC_MSG_RESULT([ synproxy . . . . . . $enable_synproxy]) AC_MSG_RESULT([ syslog . . . . . . . $enable_syslog]) AC_MSG_RESULT([ table . . . . . . . . $enable_table]) AC_MSG_RESULT([ tail_csv . . . . . . $enable_tail_csv])