X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=ac738f80ff813201f43fce310f24a14e6bd642b2;hb=c76419c0cf983f1ecd3d36aa236cc4e3f9cff733;hp=31c842afcede940e66c458f3b30369438fa41898;hpb=e1bfa71aca1f37c2f293dc9adb44065c6e7a9ad9;p=collectd.git diff --git a/configure.ac b/configure.ac index 31c842af..ac738f80 100644 --- a/configure.ac +++ b/configure.ac @@ -808,7 +808,20 @@ fi have_cpuid_h="no" AC_CHECK_HEADERS(cpuid.h, [have_cpuid_h="yes"]) -AC_CHECK_HEADERS(sys/capability.h) +have_capability="yes" +AC_CHECK_HEADERS(sys/capability.h, + [have_capability="yes"], + [have_capability="no ( not found)"]) +if test "x$have_capability" = "xyes"; then +AC_CHECK_LIB(cap, cap_get_bound, + [have_capability="yes"], + [have_capability="no (cap_get_bound() not found)"]) +fi +if test "x$have_capability" = "xyes"; then + AC_DEFINE(HAVE_CAPABILITY, 1, [Define to 1 if you have cap_get_bound() (-lcap).]) +fi +AM_CONDITIONAL(BUILD_WITH_CAPABILITY, test "x$have_capability" = "xyes") + # # Checks for typedefs, structures, and compiler characteristics. # @@ -2633,7 +2646,7 @@ then if test -d "$with_java_home" then AC_MSG_CHECKING([for jni.h]) - TMPVAR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | LC_ALL=C sort | head -n 1` if test "x$TMPVAR" != "x" then AC_MSG_RESULT([found in $TMPVAR]) @@ -2643,7 +2656,7 @@ then fi AC_MSG_CHECKING([for jni_md.h]) - TMPVAR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | LC_ALL=C sort | head -n 1` if test "x$TMPVAR" != "x" then AC_MSG_RESULT([found in $TMPVAR]) @@ -2653,7 +2666,7 @@ then fi AC_MSG_CHECKING([for libjvm.so]) - TMPVAR=`find -L "$with_java_home" -type f \( -name libjvm.so -o -name libjvm.dylib \) -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -type f \( -name libjvm.so -o -name libjvm.dylib \) -exec 'dirname' '{}' ';' 2>/dev/null | LC_ALL=C sort | head -n 1` if test "x$TMPVAR" != "x" then AC_MSG_RESULT([found in $TMPVAR]) @@ -2665,7 +2678,7 @@ then if test "x$JAVAC" = "x" then AC_MSG_CHECKING([for javac]) - TMPVAR=`find -L "$with_java_home" -name javac -type f 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -name javac -type f 2>/dev/null | LC_ALL=C sort | head -n 1` if test "x$TMPVAR" != "x" then JAVAC="$TMPVAR" @@ -2677,7 +2690,7 @@ then if test "x$JAR" = "x" then AC_MSG_CHECKING([for jar]) - TMPVAR=`find -L "$with_java_home" -name jar -type f 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -name jar -type f 2>/dev/null | LC_ALL=C sort | head -n 1` if test "x$TMPVAR" != "x" then JAR="$TMPVAR" @@ -3032,6 +3045,70 @@ fi AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes") # }}} +# --with-libmicrohttpd {{{ +with_libmicrohttpd_cppflags="" +with_libmicrohttpd_ldflags="" +AC_ARG_WITH([libmicrohttpd], [AS_HELP_STRING([--with-libmicrohttpd@<:@=PREFIX@:>@], [Path to libmicrohttpd.])], + [ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + with_libmicrohttpd_cppflags="-I$withval/include" + with_libmicrohttpd_ldflags="-L$withval/lib" + with_libmicrohttpd="yes" + fi + if test "x$withval" = "xno" + then + with_libmicrohttpd="no (disabled on command line)" + fi + ], + [withval="yes"] +) +if test "x$withval" = "xyes" +then +PKG_CHECK_MODULES([MICROHTTPD], [libmicrohttpd], + [with_libmicrohttpd="yes"], + [with_libmicrohttpd="no (pkg-config could not find libmicrohttpd)"] +) +fi + +if test "x$MICROHTTPD_LIBS" = "x" +then + MICROHTTPD_LIBS="-lmicrohttpd" +fi + +SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" +SAVE_LIBS="$LIBS" +CPPFLAGS="$with_libmicrohttpd_cppflags $MICROHTTPD_CFLAGS" +LDFLAGS="$with_libmicrohttpd_ldflags $LDFLAGS" +LIBS="$LIBS $MICROHTTPD_LIBS" + +if test "x$with_libmicrohttpd" = "xyes" +then + AC_CHECK_HEADERS([microhttpd.h], + [with_libmicrohttpd="yes"], + [with_libmicrohttpd="no ( not found)"]) +fi + +if test "x$with_libmicrohttpd" = "xyes" +then + AC_CHECK_LIB([microhttpd], [MHD_start_daemon], + [with_libmicrohttpd="yes"], + [with_libmicrohttpd="no (libmicrohttpd not found)"]) +fi + +CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" +LIBS="$SAVE_LIBS" + +BUILD_WITH_LIBMICROHTTPD_CPPFLAGS="$with_libmicrohttpd_cppflags $MICROHTTPD_CFLAGS" +BUILD_WITH_LIBMICROHTTPD_LDFLAGS="$with_libmicrohttpd_ldflags" +BUILD_WITH_LIBMICROHTTPD_LIBS="$MICROHTTPD_LIBS" +AC_SUBST([BUILD_WITH_LIBMICROHTTPD_CPPFLAGS]) +AC_SUBST([BUILD_WITH_LIBMICROHTTPD_LDFLAGS]) +AC_SUBST([BUILD_WITH_LIBMICROHTTPD_LIBS]) +# }}} + # --with-libmodbus {{{ with_libmodbus_config="" with_libmodbus_cflags="" @@ -4098,6 +4175,55 @@ fi AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes") # }}} +# --with-libpqos {{{ +with_libpqos_cppflags="" +with_libpqos_ldflags="" +AC_ARG_WITH(libpqos, [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + with_libpqos_cppflags="-I$withval/include" + with_libpqos_ldflags="-L$withval/lib" + with_libpqos="yes" + else + with_libpqos="$withval" + fi +], +[ + with_libpqos="yes" +]) +if test "x$with_libpqos" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags" + + AC_CHECK_HEADERS(pqos.h, [with_libpqos="yes"], [with_libpqos="no (pqos.h not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" +fi +if test "x$with_libpqos" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags" + LDFLAGS="$LDFLAGS $with_libpqos_ldflags" + + AC_CHECK_LIB(pqos, pqos_init, [with_libpqos="yes"], [with_libpqos="no (Can't find libpqos)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +if test "x$with_libpqos" = "xyes" +then + BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags" + BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags" + BUILD_WITH_LIBPQOS_LIBS="-lpqos" + AC_SUBST(BUILD_WITH_LIBPQOS_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBPQOS_LDFLAGS) + AC_SUBST(BUILD_WITH_LIBPQOS_LIBS) +fi +# }}} + # --with-libprotobuf {{{ with_libprotobuf_cppflags="" with_libprotobuf_ldflags="" @@ -4441,11 +4567,10 @@ then if test "x$with_librdkafka_log_cb" = "xyes" then AC_DEFINE(HAVE_LIBRDKAFKA_LOG_CB, 1, [Define if librdkafka log facility is present and usable.]) - fi - if test "x$with_librdkafka_logger" = "xyes" + else if test "x$with_librdkafka_logger" = "xyes" then AC_DEFINE(HAVE_LIBRDKAFKA_LOGGER, 1, [Define if librdkafka log facility is present and usable.]) - fi + fi; fi fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" @@ -5786,6 +5911,7 @@ plugin_fscache="no" plugin_gps="no" plugin_grpc="no" plugin_hugepages="no" +plugin_intel_rdt="no" plugin_interface="no" plugin_ipmi="no" plugin_ipvs="no" @@ -5815,6 +5941,7 @@ plugin_virt="no" plugin_vmem="no" plugin_vserver="no" plugin_wireless="no" +plugin_write_prometheus="no" plugin_xencpu="no" plugin_zfs_arc="no" plugin_zone="no" @@ -6102,6 +6229,10 @@ fi if test "x$have_protoc_c" = "xyes" && test "x$with_libprotobuf_c" = "xyes" then plugin_pinba="yes" + if test "x$with_libmicrohttpd" = "xyes" + then + plugin_write_prometheus="yes" + fi fi # Mac OS X memory interface @@ -6243,6 +6374,7 @@ AC_PLUGIN([gps], [$plugin_gps], [GPS plugin]) AC_PLUGIN([grpc], [$plugin_grpc], [gRPC plugin]) AC_PLUGIN([hddtemp], [yes], [Query hddtempd]) AC_PLUGIN([hugepages], [$plugin_hugepages], [Hugepages statistics]) +AC_PLUGIN([intel_rdt], [$with_libpqos], [Intel RDT monitor plugin]) AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics]) AC_PLUGIN([ipc], [$plugin_ipc], [IPC statistics]) AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics]) @@ -6340,6 +6472,7 @@ AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin] AC_PLUGIN([write_kafka], [$with_librdkafka], [Kafka output plugin]) AC_PLUGIN([write_log], [yes], [Log output plugin]) AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin]) +AC_PLUGIN([write_prometheus], [$plugin_write_prometheus], [Prometheus write plugin]) AC_PLUGIN([write_redis], [$with_libhiredis], [Redis output plugin]) AC_PLUGIN([write_riemann], [$with_libriemann_client], [Riemann output plugin]) AC_PLUGIN([write_sensu], [yes], [Sensu output plugin]) @@ -6588,6 +6721,7 @@ AC_MSG_RESULT([ libldap . . . . . . . $with_libldap]) AC_MSG_RESULT([ liblua . . . . . . . $with_liblua]) AC_MSG_RESULT([ liblvm2app . . . . . $with_liblvm2app]) AC_MSG_RESULT([ libmemcached . . . . $with_libmemcached]) +AC_MSG_RESULT([ libmicrohttpd . . . . $with_libmicrohttpd]) AC_MSG_RESULT([ libmnl . . . . . . . $with_libmnl]) AC_MSG_RESULT([ libmodbus . . . . . . $with_libmodbus]) AC_MSG_RESULT([ libmongoc . . . . . . $with_libmongoc]) @@ -6604,6 +6738,7 @@ AC_MSG_RESULT([ libpcap . . . . . . . $with_libpcap]) AC_MSG_RESULT([ libperfstat . . . . . $with_perfstat]) AC_MSG_RESULT([ libperl . . . . . . . $with_libperl]) AC_MSG_RESULT([ libpq . . . . . . . . $with_libpq]) +AC_MSG_RESULT([ libpqos . . . . . . . $with_libpqos]) AC_MSG_RESULT([ libprotobuf . . . . . $with_libprotobuf]) AC_MSG_RESULT([ libprotobuf-c . . . . $with_libprotobuf_c]) AC_MSG_RESULT([ libpython . . . . . . $with_libpython]) @@ -6676,6 +6811,7 @@ AC_MSG_RESULT([ gps . . . . . . . . . $enable_gps]) AC_MSG_RESULT([ grpc . . . . . . . . $enable_grpc]) AC_MSG_RESULT([ hddtemp . . . . . . . $enable_hddtemp]) AC_MSG_RESULT([ hugepages . . . . . . $enable_hugepages]) +AC_MSG_RESULT([ intel_rdt. . . . . . $enable_intel_rdt]) AC_MSG_RESULT([ interface . . . . . . $enable_interface]) AC_MSG_RESULT([ ipc . . . . . . . . . $enable_ipc]) AC_MSG_RESULT([ ipmi . . . . . . . . $enable_ipmi]) @@ -6772,6 +6908,7 @@ AC_MSG_RESULT([ write_http . . . . . $enable_write_http]) AC_MSG_RESULT([ write_kafka . . . . . $enable_write_kafka]) AC_MSG_RESULT([ write_log . . . . . . $enable_write_log]) AC_MSG_RESULT([ write_mongodb . . . . $enable_write_mongodb]) +AC_MSG_RESULT([ write_prometheus. . . $enable_write_prometheus]) AC_MSG_RESULT([ write_redis . . . . . $enable_write_redis]) AC_MSG_RESULT([ write_riemann . . . . $enable_write_riemann]) AC_MSG_RESULT([ write_sensu . . . . . $enable_write_sensu])