X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.ac;h=ef251fab283e81cc8430f35f0da9955db5490e06;hb=49cc164c954c169ae94b78799622bacbbaa79f47;hp=35f8946450bd69aebe5164efa451cf5f32a6e8d2;hpb=2bd9ed649bc73acdd12fd1a59ddf5eaf59a59413;p=collectd.git diff --git a/configure.ac b/configure.ac index 35f89464..ef251fab 100644 --- a/configure.ac +++ b/configure.ac @@ -527,7 +527,7 @@ AC_CHECK_HEADERS(linux/un.h, [], [], #endif ]) -AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h locale.h) +AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h sys/vmmeter.h kvm.h wordexp.h locale.h) # For the dns plugin AC_CHECK_HEADERS(arpa/nameser.h) @@ -589,13 +589,44 @@ AC_CHECK_HEADERS(net/pfvar.h, have_termios_h="no" AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"]) +# For the turbostat plugin +have_asm_msrindex_h="no" +AC_CHECK_HEADERS(asm/msr-index.h, [have_asm_msrindex_h="yes"]) + +if test "x$have_asm_msrindex_h" = "xyes" +then + AC_CACHE_CHECK([whether asm/msr-index.h has MSR_CORE_C3_RESIDENCY], + [c_cv_have_usable_asm_msrindex_h], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[[ +#include +]]], +[[[ +int y = MSR_CORE_C3_RESIDENCY; +return(y); +]]] + )], + [c_cv_have_usable_asm_msrindex_h="yes"], + [c_cv_have_usable_asm_msrindex_h="no"], + ) + ) +fi + +have_cpuid_h="no" +AC_CHECK_HEADERS(cpuid.h, [have_cpuid_h="yes"]) + +AC_CHECK_HEADERS(sys/capability.h) # # Checks for typedefs, structures, and compiler characteristics. # AC_C_CONST +AC_C_INLINE +AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T +AC_TYPE_SSIZE_T AC_TYPE_UID_T +AC_TYPE_UINT32_T AC_HEADER_TIME # @@ -1190,6 +1221,7 @@ FILE *fh; struct mntent *me; fh = setmntent ("/etc/mtab", "r"); me = getmntent (fh); +return(me->mnt_passno); ]]] )], [c_cv_have_one_getmntent="yes"], @@ -1209,6 +1241,7 @@ me = getmntent (fh); int status; fh = fopen ("/etc/mnttab", "r"); status = getmntent (fh, &mt); + return(status); ]]] )], [c_cv_have_two_getmntent="yes"], @@ -1579,62 +1612,63 @@ fi AM_CONDITIONAL(BUILD_WITH_LIBAQUAERO5, test "x$with_libaquaero5" = "xyes") # }}} -# --with-libcredis {{{ -AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])], +# --with-libhiredis {{{ +AC_ARG_WITH(libhiredis, [AS_HELP_STRING([--with-libhiredis@<:@=PREFIX@:>@], + [Path to libhiredis.])], [ if test "x$withval" = "xyes" then - with_libcredis="yes" + with_libhiredis="yes" else if test "x$withval" = "xno" then - with_libcredis="no" + with_libhiredis="no" else - with_libcredis="yes" - LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS -I$withval/include" - LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS -L$withval/lib" + with_libhiredis="yes" + LIBHIREDIS_CPPFLAGS="$LIBHIREDIS_CPPFLAGS -I$withval/include" + LIBHIREDIS_LDFLAGS="$LIBHIREDIS_LDFLAGS -L$withval/lib" fi; fi ], -[with_libcredis="yes"]) +[with_libhiredis="yes"]) SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" -CPPFLAGS="$CPPFLAGS $LIBCREDIS_CPPFLAGS" -LDFLAGS="$LDFLAGS $LIBCREDIS_LDFLAGS" +CPPFLAGS="$CPPFLAGS $LIBHIREDIS_CPPFLAGS" +LDFLAGS="$LDFLAGS $LIBHIREDIS_LDFLAGS" -if test "x$with_libcredis" = "xyes" +if test "x$with_libhiredis" = "xyes" then - if test "x$LIBCREDIS_CPPFLAGS" != "x" + if test "x$LIBHIREDIS_CPPFLAGS" != "x" then - AC_MSG_NOTICE([libcredis CPPFLAGS: $LIBCREDIS_CPPFLAGS]) + AC_MSG_NOTICE([libhiredis CPPFLAGS: $LIBHIREDIS_CPPFLAGS]) fi - AC_CHECK_HEADERS(credis.h, - [with_libcredis="yes"], - [with_libcredis="no (credis.h not found)"]) + AC_CHECK_HEADERS(hiredis/hiredis.h, + [with_libhiredis="yes"], + [with_libhiredis="no (hiredis.h not found)"]) fi -if test "x$with_libcredis" = "xyes" +if test "x$with_libhiredis" = "xyes" then - if test "x$LIBCREDIS_LDFLAGS" != "x" + if test "x$LIBHIREDIS_LDFLAGS" != "x" then - AC_MSG_NOTICE([libcredis LDFLAGS: $LIBCREDIS_LDFLAGS]) + AC_MSG_NOTICE([libhiredis LDFLAGS: $LIBHIREDIS_LDFLAGS]) fi - AC_CHECK_LIB(credis, credis_info, - [with_libcredis="yes"], - [with_libcredis="no (symbol 'credis_info' not found)"]) + AC_CHECK_LIB(hiredis, redisCommand, + [with_libhiredis="yes"], + [with_libhiredis="no (symbol 'redisCommand' not found)"]) fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" -if test "x$with_libcredis" = "xyes" +if test "x$with_libhiredis" = "xyes" then - BUILD_WITH_LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS" - BUILD_WITH_LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS" - AC_SUBST(BUILD_WITH_LIBCREDIS_CPPFLAGS) - AC_SUBST(BUILD_WITH_LIBCREDIS_LDFLAGS) + BUILD_WITH_LIBHIREDIS_CPPFLAGS="$LIBHIREDIS_CPPFLAGS" + BUILD_WITH_LIBHIREDIS_LDFLAGS="$LIBHIREDIS_LDFLAGS" + AC_SUBST(BUILD_WITH_LIBHIREDIS_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBHIREDIS_LDFLAGS) fi -AM_CONDITIONAL(BUILD_WITH_LIBCREDIS, test "x$with_libcredis" = "xyes") +AM_CONDITIONAL(BUILD_WITH_LIBHIREDIS, test "x$with_libhiredis" = "xyes") # }}} # --with-libcurl {{{ @@ -1699,6 +1733,10 @@ then [have_curlopt_username="yes"], [have_curlopt_username="no"], [[#include ]]) + AC_CHECK_DECL(CURLOPT_TIMEOUT_MS, + [have_curlopt_timeout="yes"], + [have_curlopt_timeout="no"], + [[#include ]]) fi fi if test "x$with_libcurl" = "xyes" @@ -1712,6 +1750,11 @@ then then AC_DEFINE(HAVE_CURLOPT_USERNAME, 1, [Define if libcurl supports CURLOPT_USERNAME option.]) fi + + if test "x$have_curlopt_timeout" = "xyes" + then + AC_DEFINE(HAVE_CURLOPT_TIMEOUT_MS, 1, [Define if libcurl supports CURLOPT_TIMEOUT_MS option.]) + fi fi AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes") # }}} @@ -1750,7 +1793,6 @@ then LDFLAGS="$LDFLAGS $with_libdbi_ldflags" AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"]) - AC_CHECK_LIB(dbi, dbi_driver_open_r, [with_libdbi_r="yes"], [with_libdbi_r="no"]) CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" @@ -1763,11 +1805,6 @@ then AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS) AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS) AC_SUBST(BUILD_WITH_LIBDBI_LIBS) - - if test "x$with_libdbi_r" = "xyes" - then - AC_DEFINE(HAVE_LIBDBI_R, 1, [Define if reentrant dbi facility is present and usable.]) - fi fi AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes") # }}} @@ -1963,7 +2000,7 @@ then [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"]) if test "$with_libgcrypt" != "no"; then - AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)") + m4_ifdef([AM_PATH_LIBGCRYPT],[AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")]) GCRYPT_CPPFLAGS="$LIBGCRYPT_CPPFLAGS $LIBGCRYPT_CFLAGS" GCRYPT_LIBS="$LIBGCRYPT_LIBS" fi @@ -1983,6 +2020,93 @@ AC_SUBST(GCRYPT_LIBS) AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes") # }}} +# --with-libgnutls {{{ +with_libgnutls_cflags="$GNUTLS_CFLAGS" +with_libgnutls_libs="$GNUTLS_LIBS" +AC_ARG_WITH(libgnutls, [AS_HELP_STRING([--with-libgnutls@<:@=PREFIX@:>@], [Path to GnuTLS.])], +[ + if test "x$withval" = "xno" + then + with_libgnutls="no" + else if test "x$withval" = "xyes" + then + with_libgnutls="use_pkgconfig" + else if test -d "$with_libgnutls/lib" + then + AC_MSG_NOTICE([Not checking for libgnutls: Manually configured]) + with_libgnutls_cflags="-I$withval/include" + with_libgnutls_libs="-L$withval/lib -lgnutls" + with_libgnutls="yes" + fi; fi; fi +], +[with_libgnutls="use_pkgconfig"]) + +# configure using pkg-config +if test "x$with_libgnutls" = "xuse_pkgconfig" +then + if test "x$PKG_CONFIG" = "x" + then + with_libgnutls="no (Don't have pkg-config)" + fi +fi +if test "x$with_libgnutls" = "xuse_pkgconfig" +then + AC_MSG_NOTICE([Checking for gnutls using $PKG_CONFIG]) + $PKG_CONFIG --exists 'gnutls' 2>/dev/null + if test $? -ne 0 + then + with_libgnutls="no (pkg-config doesn't know gnutls)" + fi +fi +if test "x$with_libgnutls" = "xuse_pkgconfig" +then + with_libgnutls_cflags="`$PKG_CONFIG --cflags 'gnutls'`" + if test $? -ne 0 + then + with_libgnutls="no ($PKG_CONFIG failed)" + fi + with_libgnutls_libs="`$PKG_CONFIG --libs 'gnutls'`" + if test $? -ne 0 + then + with_libgnutls="no ($PKG_CONFIG failed)" + fi +fi +if test "x$with_libgnutls" = "xuse_pkgconfig" +then + with_libgnutls="yes" +fi + +SAVE_CPPFLAGS="$CPPFLAGS" +CPPFLAGS="$CPPFLAGS $with_libgnutls_cflags" + +# with_libgnutls_cflags and with_libgnutls_libs are set up now, let's do +# the actual checks. +if test "x$with_libgnutls" = "xyes" +then + AC_CHECK_HEADERS(gnutls/gnutls.h, [], [with_libgnutls="no (gnutls/gnutls.h not found)"]) +fi +if test "x$with_libgnutls" = "xyes" +then + AC_CHECK_HEADERS(gnutls/dtls.h gnutls/openpgp.h) +fi +if test "x$with_libgnutls" = "xyes" +then + AC_CHECK_LIB(gnutls, gnutls_global_init, + [with_libgnutls="yes"], + [with_libgnutls="no (symbol gnutls_global_init not found)"], + [$with_libgnutls_libs]) +fi +if test "x$with_libgnutls" = "xyes" +then + BUILD_WITH_LIBGNUTLS_CFLAGS="$with_libgnutls_cflags" + BUILD_WITH_LIBGNUTLS_LIBS="$with_libgnutls_libs" + AC_SUBST(BUILD_WITH_LIBGNUTLS_CFLAGS) + AC_SUBST(BUILD_WITH_LIBGNUTLS_LIBS) +fi + +CPPFLAGS="$SAVE_CPPFLAGS" +# }}} + # --with-libiptc {{{ AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])], [ @@ -2080,6 +2204,10 @@ fi # --with-java {{{ with_java_home="$JAVA_HOME" +if test "x$with_java_home" = "x" +then + with_java_home="/usr/lib/jvm" +fi with_java_vmtype="client" with_java_cflags="" with_java_libs="" @@ -2104,7 +2232,7 @@ then if test -d "$with_java_home" then AC_MSG_CHECKING([for jni.h]) - TMPVAR=`find "$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 | head -n 1` if test "x$TMPVAR" != "x" then AC_MSG_RESULT([found in $TMPVAR]) @@ -2114,7 +2242,7 @@ then fi AC_MSG_CHECKING([for jni_md.h]) - TMPVAR=`find "$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 | head -n 1` if test "x$TMPVAR" != "x" then AC_MSG_RESULT([found in $TMPVAR]) @@ -2124,7 +2252,7 @@ then fi AC_MSG_CHECKING([for libjvm.so]) - TMPVAR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` + TMPVAR=`find -L "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1` if test "x$TMPVAR" != "x" then AC_MSG_RESULT([found in $TMPVAR]) @@ -2136,7 +2264,7 @@ then if test "x$JAVAC" = "x" then AC_MSG_CHECKING([for javac]) - TMPVAR=`find "$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 | head -n 1` if test "x$TMPVAR" != "x" then JAVAC="$TMPVAR" @@ -2148,7 +2276,7 @@ then if test "x$JAR" = "x" then AC_MSG_CHECKING([for jar]) - TMPVAR=`find "$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 | head -n 1` if test "x$TMPVAR" != "x" then JAR="$TMPVAR" @@ -2247,6 +2375,64 @@ AC_SUBST(JAVA_LIBS) AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes") # }}} +# --with-libldap {{{ +AC_ARG_WITH(libldap, [AS_HELP_STRING([--with-libldap@<:@=PREFIX@:>@], [Path to libldap.])], +[ + if test "x$withval" = "xyes" + then + with_libldap="yes" + else if test "x$withval" = "xno" + then + with_libldap="no" + else + with_libldap="yes" + LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS -I$withval/include" + LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS -L$withval/lib" + fi; fi +], +[with_libldap="yes"]) + +SAVE_CPPFLAGS="$CPPFLAGS" +SAVE_LDFLAGS="$LDFLAGS" + +CPPFLAGS="$CPPFLAGS $LIBLDAP_CPPFLAGS" +LDFLAGS="$LDFLAGS $LIBLDAP_LDFLAGS" + +if test "x$with_libldap" = "xyes" +then + if test "x$LIBLDAP_CPPFLAGS" != "x" + then + AC_MSG_NOTICE([libldap CPPFLAGS: $LIBLDAP_CPPFLAGS]) + fi + AC_CHECK_HEADERS(ldap.h, + [with_libldap="yes"], + [with_libldap="no ('ldap.h' not found)"]) +fi +if test "x$with_libldap" = "xyes" +then + if test "x$LIBLDAP_LDFLAGS" != "x" + then + AC_MSG_NOTICE([libldap LDFLAGS: $LIBLDAP_LDFLAGS]) + fi + AC_CHECK_LIB(ldap, ldap_initialize, + [with_libldap="yes"], + [with_libldap="no (symbol 'ldap_initialize' not found)"]) + +fi + +CPPFLAGS="$SAVE_CPPFLAGS" +LDFLAGS="$SAVE_LDFLAGS" + +if test "x$with_libldap" = "xyes" +then + BUILD_WITH_LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS" + BUILD_WITH_LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS" + AC_SUBST(BUILD_WITH_LIBLDAP_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBLDAP_LDFLAGS) +fi +AM_CONDITIONAL(BUILD_WITH_LIBLDAP, test "x$with_libldap" = "xyes") +# }}} + # --with-liblvm2app {{{ with_liblvm2app_cppflags="" with_liblvm2app_ldflags="" @@ -3110,6 +3296,7 @@ then ]]], [[[ int val = PCAP_ERROR_IFACE_NOT_UP; + return(val); ]]] )], [c_cv_libpcap_have_pcap_error_iface_not_up="yes"], @@ -3160,12 +3347,12 @@ if test "x$with_libperl" = "xyes" \ && test -n "$perl_interpreter" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string) PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts` - PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts` + PERL_LIBS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts` CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([for libperl], [c_cv_have_libperl], @@ -3192,13 +3379,13 @@ dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string then AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.]) AC_SUBST(PERL_CFLAGS) - AC_SUBST(PERL_LDFLAGS) + AC_SUBST(PERL_LIBS) else with_libperl="no" fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" else if test -z "$perl_interpreter"; then with_libperl="no (no perl interpreter found)" c_cv_have_libperl="no" @@ -3208,9 +3395,9 @@ AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes") if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([if perl supports ithreads], [c_cv_have_perl_ithreads], @@ -3237,17 +3424,17 @@ then fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3) # (see issues #41 and #42) CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([for broken Perl_load_module()], [c_cv_have_broken_perl_load_module], @@ -3271,7 +3458,7 @@ then ) CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE, test "x$c_cv_have_broken_perl_load_module" = "xyes") @@ -3279,9 +3466,9 @@ AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE, if test "x$with_libperl" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" CFLAGS="$CFLAGS $PERL_CFLAGS" - LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + LIBS="$LIBS $PERL_LIBS" AC_CHECK_MEMBER( [struct mgvtbl.svt_local], @@ -3300,7 +3487,7 @@ then fi CFLAGS="$SAVE_CFLAGS" - LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi # }}} @@ -3656,10 +3843,11 @@ fi # --with-librdkafka {{{ AC_ARG_WITH(librdkafka, [AS_HELP_STRING([--with-librdkafka@<:@=PREFIX@:>@], [Path to librdkafka.])], [ - if test "x$withval" = "xno" && test "x$withval" != "xyes" + if test "x$withval" != "xno" && test "x$withval" != "xyes" then with_librdkafka_cppflags="-I$withval/include" with_librdkafka_ldflags="-L$withval/lib" + with_librdkafka_rpath="$withval/lib" with_librdkafka="yes" else with_librdkafka="$withval" @@ -3671,6 +3859,9 @@ AC_ARG_WITH(librdkafka, [AS_HELP_STRING([--with-librdkafka@<:@=PREFIX@:>@], [Pat SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" +CPPFLAGS="$CPPFLAGS $with_librdkafka_cppflags" +LDFLAGS="$LDFLAGS $with_librdkafka_ldflags" + if test "x$with_librdkafka" = "xyes" then AC_CHECK_HEADERS(librdkafka/rdkafka.h, [with_librdkafka="yes"], [with_librdkafka="no (librdkafka/rdkafka.h not found)"]) @@ -3680,13 +3871,18 @@ if test "x$with_librdkafka" = "xyes" then AC_CHECK_LIB(rdkafka, rd_kafka_new, [with_librdkafka="yes"], [with_librdkafka="no (Symbol 'rd_kafka_new' not found)"]) AC_CHECK_LIB(rdkafka, rd_kafka_conf_set_log_cb, [with_librdkafka_log_cb="yes"], [with_librdkafka_log_cb="no"]) - AC_CHECK_LIB(rdkafka, rd_kafka_conf_set_logger, [with_librdkafka_logger="yes"], [with_librdkafka_logger="no"]) + AC_CHECK_LIB(rdkafka, rd_kafka_set_logger, [with_librdkafka_logger="yes"], [with_librdkafka_logger="no"]) fi if test "x$with_librdkafka" = "xyes" then BUILD_WITH_LIBRDKAFKA_CPPFLAGS="$with_librdkafka_cppflags" BUILD_WITH_LIBRDKAFKA_LDFLAGS="$with_librdkafka_ldflags" - BUILD_WITH_LIBRDKAFKA_LIBS="-lrdkafka" + if test "x$with_librdkafka_rpath" != "x" + then + BUILD_WITH_LIBRDKAFKA_LIBS="-Wl,-rpath,$with_librdkafka_rpath -lrdkafka" + else + BUILD_WITH_LIBRDKAFKA_LIBS="-lrdkafka" + fi AC_SUBST(BUILD_WITH_LIBRDKAFKA_CPPFLAGS) AC_SUBST(BUILD_WITH_LIBRDKAFKA_LDFLAGS) AC_SUBST(BUILD_WITH_LIBRDKAFKA_LIBS) @@ -4080,13 +4276,14 @@ fi if test "x$with_libstatgrab" = "xyes" then SAVE_CFLAGS="$CFLAGS" - SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" CFLAGS="$CFLAGS $with_libstatgrab_cflags" LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags" + LIBS="-lstatgrab $LIBS" - AC_CACHE_CHECK([if sg_init() requires an argument], - [c_cv_have_libstatgrab_init_arg], + AC_CACHE_CHECK([if libstatgrab >= 0.90], + [c_cv_have_libstatgrab_0_90], AC_LINK_IFELSE([AC_LANG_PROGRAM( [[[ #include @@ -4096,13 +4293,14 @@ then if (sg_init()) return 0; ]]] )], - [c_cv_have_libstatgrab_init_arg="no"], - [c_cv_have_libstatgrab_init_arg="yes"] + [c_cv_have_libstatgrab_0_90="no"], + [c_cv_have_libstatgrab_0_90="yes"] ) ) CFLAGS="$SAVE_CFLAGS" LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" fi AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes") @@ -4113,9 +4311,9 @@ then BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags" AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS) AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS) - if test "x$c_cv_have_libstatgrab_init_arg" = "xyes" + if test "x$c_cv_have_libstatgrab_0_90" = "xyes" then - AC_DEFINE(HAVE_LIBSTATGRAB_INIT_ARG, 1, [Define to 1 if sg_init does require an argument]) + AC_DEFINE(HAVE_LIBSTATGRAB_0_90, 1, [Define to 1 if libstatgrab version >= 0.90]) fi fi # }}} @@ -4628,25 +4826,18 @@ fi if test "x$with_libvarnish" = "xyes" then SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags" - AC_CHECK_HEADERS(varnish/varnishapi.h, [], [with_libvarnish="no (varnish/varnishapi.h not found)"]) - - CPPFLAGS="$SAVE_CPPFLAGS" -fi -if test "x$with_libvarnish" = "xyes" -then - SAVE_CPPFLAGS="$CPPFLAGS" - #SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags" - #LDFLAGS="$LDFLAGS $with_libvarnish_libs" - AC_CHECK_HEADERS(varnish/vsc.h, - [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support])], - [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])]) + AC_CHECK_HEADERS(varnish/vapi/vsc.h, + [AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])], + [AC_CHECK_HEADERS(varnish/vsc.h, + [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support])], + [AC_CHECK_HEADERS(varnish/varnishapi.h, + [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])], + [with_libvarnish="no (found none of the varnish header files)"])])]) CPPFLAGS="$SAVE_CPPFLAGS" - #LDFLAGS="$SAVE_LDFLAGS" fi if test "x$with_libvarnish" = "xyes" then @@ -4855,6 +5046,62 @@ then fi # }}} +# --with-libatasmart {{{ +with_libatasmart_cppflags="" +with_libatasmart_ldflags="" +AC_ARG_WITH(libatasmart, [AS_HELP_STRING([--with-libatasmart@<:@=PREFIX@:>@], [Path to libatasmart.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + with_libatasmart_cppflags="-I$withval/include" + with_libatasmart_ldflags="-L$withval/lib" + with_libatasmart="yes" + else + with_libatasmart="$withval" + fi +], +[ + if test "x$ac_system" = "xLinux" + then + with_libatasmart="yes" + else + with_libatasmart="no (Linux only library)" + fi +]) +if test "x$with_libatasmart" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags" + + AC_CHECK_HEADERS(atasmart.h, [with_libatasmart="yes"], [with_libatasmart="no (atasmart.h not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" +fi +if test "x$with_libatasmart" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags" + LDFLAGS="$LDFLAGS $with_libatasmart_ldflags" + + AC_CHECK_LIB(atasmart, sk_disk_open, [with_libatasmart="yes"], [with_libatasmart="no (Symbol 'sk_disk_open' not found)"]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +if test "x$with_libatasmart" = "xyes" +then + BUILD_WITH_LIBATASMART_CPPFLAGS="$with_libatasmart_cppflags" + BUILD_WITH_LIBATASMART_LDFLAGS="$with_libatasmart_ldflags" + BUILD_WITH_LIBATASMART_LIBS="-latasmart" + AC_SUBST(BUILD_WITH_LIBATASMART_CPPFLAGS) + AC_SUBST(BUILD_WITH_LIBATASMART_LDFLAGS) + AC_SUBST(BUILD_WITH_LIBATASMART_LIBS) + AC_DEFINE(HAVE_LIBATASMART, 1, [Define if libatasmart is present and usable.]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBATASMART, test "x$with_libatasmart" = "xyes") +# }}} + PKG_CHECK_MODULES([LIBNOTIFY], [libnotify], [with_libnotify="yes"], [if test "x$LIBNOTIFY_PKG_ERRORS" = "x"; then @@ -4993,6 +5240,7 @@ plugin_ascent="no" plugin_barometer="no" plugin_battery="no" plugin_bind="no" +plugin_ceph="no" plugin_cgroups="no" plugin_conntrack="no" plugin_contextswitch="no" @@ -5025,6 +5273,7 @@ plugin_tape="no" plugin_tcpconns="no" plugin_ted="no" plugin_thermal="no" +plugin_turbostat="no" plugin_uptime="no" plugin_users="no" plugin_virt="no" @@ -5032,6 +5281,8 @@ plugin_vmem="no" plugin_vserver="no" plugin_wireless="no" plugin_zfs_arc="no" +plugin_zone="no" +plugin_zookeeper="no" # Linux if test "x$ac_system" = "xLinux" @@ -5047,6 +5298,7 @@ then plugin_entropy="yes" plugin_fscache="yes" plugin_interface="yes" + plugin_ipc="yes" plugin_irq="yes" plugin_load="yes" plugin_lvm="yes" @@ -5069,6 +5321,10 @@ then then plugin_ipvs="yes" fi + if test "x$c_cv_have_usable_asm_msrindex_h" = "xyes" && test "x$have_cpuid_h" = "xyes" + then + plugin_turbostat="yes" + fi fi if test "x$ac_system" = "xOpenBSD" @@ -5088,6 +5344,7 @@ fi if test "x$ac_system" = "xAIX" then plugin_tcpconns="yes" + plugin_ipc="yes" fi # FreeBSD @@ -5119,8 +5376,10 @@ fi if test "x$with_kstat" = "xyes" then plugin_nfs="yes" + plugin_processes="yes" plugin_uptime="yes" plugin_zfs_arc="yes" + plugin_zone="yes" fi if test "x$with_devinfo$with_kstat" = "xyesyes" @@ -5185,6 +5444,11 @@ then plugin_curl_xml="yes" fi +if test "x$with_libyajl" = "xyes" +then + plugin_ceph="yes" +fi + if test "x$have_processor_info" = "xyes" then plugin_cpu="yes" @@ -5357,6 +5621,7 @@ AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics]) AC_PLUGIN([barometer], [$plugin_barometer], [Barometer sensor on I2C]) AC_PLUGIN([battery], [$plugin_battery], [Battery statistics]) AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics]) +AC_PLUGIN([ceph], [$plugin_ceph], [Ceph daemon statistics]) AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics]) AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics]) AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics]) @@ -5375,11 +5640,13 @@ AC_PLUGIN([email], [yes], [EMail statistics]) AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics]) AC_PLUGIN([ethstat], [$plugin_ethstat], [Stats from NIC driver]) AC_PLUGIN([exec], [yes], [Execution of external programs]) +AC_PLUGIN([fhcount], [yes], [File handles statistics]) AC_PLUGIN([filecount], [yes], [Count files in directories]) AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics]) AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin]) AC_PLUGIN([hddtemp], [yes], [Query hddtempd]) AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics]) +AC_PLUGIN([ipc], [$plugin_ipc], [IPC statistics]) AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics]) AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters]) AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics]) @@ -5406,6 +5673,7 @@ AC_PLUGIN([modbus], [$with_libmodbus], [Modbus plugin]) AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values]) AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics]) AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin]) +AC_PLUGIN([netcmd], [$with_libgnutls], [Network control socket]) AC_PLUGIN([netlink], [$with_libmnl], [Enhanced Linux network statistics]) AC_PLUGIN([network], [yes], [Network communication plugin]) AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics]) @@ -5417,6 +5685,7 @@ AC_PLUGIN([numa], [$plugin_numa], [NUMA virtual memory statistics]) AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics]) AC_PLUGIN([olsrd], [yes], [olsrd statistics]) AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics]) +AC_PLUGIN([openldap], [$with_libldap], [OpenLDAP statistics]) AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics]) AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin]) AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter]) @@ -5429,13 +5698,14 @@ AC_PLUGIN([powerdns], [yes], [PowerDNS statistics]) AC_PLUGIN([processes], [$plugin_processes], [Process statistics]) AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics]) AC_PLUGIN([python], [$with_python], [Embed a Python interpreter]) -AC_PLUGIN([redis], [$with_libcredis], [Redis plugin]) +AC_PLUGIN([redis], [$with_libhiredis], [Redis plugin]) AC_PLUGIN([routeros], [$with_librouteros], [RouterOS plugin]) AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin]) AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin]) AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics]) AC_PLUGIN([serial], [$plugin_serial], [serial port traffic]) AC_PLUGIN([sigrok], [$with_libsigrok], [sigrok acquisition sources]) +AC_PLUGIN([smart], [$with_libatasmart], [SMART statistics]) AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin]) AC_PLUGIN([statsd], [yes], [StatsD plugin]) AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics]) @@ -5455,6 +5725,7 @@ AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics]) AC_PLUGIN([threshold], [yes], [Threshold checking plugin]) AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics]) +AC_PLUGIN([turbostat], [$plugin_turbostat], [Advanced statistic on Intel cpu states]) AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin]) AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics]) AC_PLUGIN([users], [$plugin_users], [User statistics]) @@ -5467,12 +5738,16 @@ AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics]) AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin]) 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_redis], [$with_libcredis], [Redis output plugin]) +AC_PLUGIN([write_redis], [$with_libhiredis], [Redis output plugin]) AC_PLUGIN([write_riemann], [$have_protoc_c], [Riemann output plugin]) +AC_PLUGIN([write_sensu], [yes], [Sensu output plugin]) AC_PLUGIN([write_tsdb], [yes], [TSDB output plugin]) AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics]) AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics]) +AC_PLUGIN([zone], [$plugin_zone], [Solaris container statistics]) +AC_PLUGIN([zookeeper], [yes], [Zookeeper statistics]) dnl Default configuration file # Load either syslog or logfile @@ -5656,22 +5931,27 @@ Configuration: Libraries: intel mic . . . . . . $with_mic libaquaero5 . . . . . $with_libaquaero5 + libatasmart . . . . . $with_libatasmart libcurl . . . . . . . $with_libcurl libdbi . . . . . . . $with_libdbi - libcredis . . . . . . $with_libcredis libesmtp . . . . . . $with_libesmtp libganglia . . . . . $with_libganglia libgcrypt . . . . . . $with_libgcrypt + libgnutls . . . . . . $with_libgnutls + libhal . . . . . . . $with_libhal + libhiredis . . . . . $with_libhiredis libi2c-dev . . . . . $with_libi2c libiokit . . . . . . $with_libiokit libiptc . . . . . . . $with_libiptc libjvm . . . . . . . $with_java libkstat . . . . . . $with_kstat libkvm . . . . . . . $with_libkvm + libldap . . . . . . . $with_libldap liblvm2app . . . . . $with_liblvm2app libmemcached . . . . $with_libmemcached libmnl . . . . . . . $with_libmnl libmodbus . . . . . . $with_libmodbus + libmongoc . . . . . . $with_libmongoc libmysql . . . . . . $with_libmysql libnetapp . . . . . . $with_libnetapp libnetsnmp . . . . . $with_libnetsnmp @@ -5679,6 +5959,7 @@ Configuration: liboconfig . . . . . $with_liboconfig libopenipmi . . . . . $with_libopenipmipthread liboping . . . . . . $with_liboping + libowcapi . . . . . . $with_libowcapi libpcap . . . . . . . $with_libpcap libperfstat . . . . . $with_perfstat libperl . . . . . . . $with_libperl @@ -5699,9 +5980,8 @@ Configuration: libxml2 . . . . . . . $with_libxml2 libxmms . . . . . . . $with_libxmms libyajl . . . . . . . $with_libyajl - libevent . . . . . . $with_libevent - protobuf-c . . . . . $have_protoc_c oracle . . . . . . . $with_oracle + protobuf-c . . . . . $have_protoc_c python . . . . . . . $with_python Features: @@ -5716,15 +5996,16 @@ Configuration: amqp . . . . . . . $enable_amqp apache . . . . . . . $enable_apache apcups . . . . . . . $enable_apcups - aquaero . . . . . . . $enable_aquaero apple_sensors . . . . $enable_apple_sensors + aquaero . . . . . . . $enable_aquaero ascent . . . . . . . $enable_ascent barometer . . . . . . $enable_barometer battery . . . . . . . $enable_battery bind . . . . . . . . $enable_bind + ceph . . . . . . . . $enable_ceph + cgroups . . . . . . . $enable_cgroups conntrack . . . . . . $enable_conntrack contextswitch . . . . $enable_contextswitch - cgroups . . . . . . . $enable_cgroups cpu . . . . . . . . . $enable_cpu cpufreq . . . . . . . $enable_cpufreq csv . . . . . . . . . $enable_csv @@ -5740,11 +6021,13 @@ Configuration: entropy . . . . . . . $enable_entropy ethstat . . . . . . . $enable_ethstat exec . . . . . . . . $enable_exec + fhcount . . . . . . . $enable_fhcount filecount . . . . . . $enable_filecount fscache . . . . . . . $enable_fscache gmond . . . . . . . . $enable_gmond hddtemp . . . . . . . $enable_hddtemp interface . . . . . . $enable_interface + ipc . . . . . . . . . $enable_ipc ipmi . . . . . . . . $enable_ipmi iptables . . . . . . $enable_iptables ipvs . . . . . . . . $enable_ipvs @@ -5752,8 +6035,8 @@ Configuration: java . . . . . . . . $enable_java load . . . . . . . . $enable_load logfile . . . . . . . $enable_logfile - lpar . . . . . . . . $enable_lpar log_logstash . . . . $enable_log_logstash + lpar . . . . . . . . $enable_lpar lvm . . . . . . . . . $enable_lvm madwifi . . . . . . . $enable_madwifi match_empty_counter . $enable_match_empty_counter @@ -5771,6 +6054,7 @@ Configuration: multimeter . . . . . $enable_multimeter mysql . . . . . . . . $enable_mysql netapp . . . . . . . $enable_netapp + netcmd . . . . . . . $enable_netcmd netlink . . . . . . . $enable_netlink network . . . . . . . $enable_network nfs . . . . . . . . . $enable_nfs @@ -5782,6 +6066,7 @@ Configuration: nut . . . . . . . . . $enable_nut olsrd . . . . . . . . $enable_olsrd onewire . . . . . . . $enable_onewire + openldap . . . . . . $enable_openldap openvpn . . . . . . . $enable_openvpn oracle . . . . . . . $enable_oracle perl . . . . . . . . $enable_perl @@ -5800,13 +6085,14 @@ Configuration: sensors . . . . . . . $enable_sensors serial . . . . . . . $enable_serial sigrok . . . . . . . $enable_sigrok + smart . . . . . . . . $enable_smart snmp . . . . . . . . $enable_snmp statsd . . . . . . . $enable_statsd swap . . . . . . . . $enable_swap syslog . . . . . . . $enable_syslog table . . . . . . . . $enable_table - tail . . . . . . . . $enable_tail tail_csv . . . . . . $enable_tail_csv + tail . . . . . . . . $enable_tail tape . . . . . . . . $enable_tape target_notification . $enable_target_notification target_replace . . . $enable_target_replace @@ -5819,6 +6105,7 @@ Configuration: thermal . . . . . . . $enable_thermal threshold . . . . . . $enable_threshold tokyotyrant . . . . . $enable_tokyotyrant + turbostat . . . . . . $enable_turbostat unixsock . . . . . . $enable_unixsock uptime . . . . . . . $enable_uptime users . . . . . . . . $enable_users @@ -5831,12 +6118,16 @@ Configuration: write_graphite . . . $enable_write_graphite write_http . . . . . $enable_write_http write_kafka . . . . . $enable_write_kafka + write_log . . . . . . $enable_write_log write_mongodb . . . . $enable_write_mongodb write_redis . . . . . $enable_write_redis write_riemann . . . . $enable_write_riemann + write_sensu . . . . . $enable_write_sensu write_tsdb . . . . . $enable_write_tsdb xmms . . . . . . . . $enable_xmms zfs_arc . . . . . . . $enable_zfs_arc + zone . . . . . . . . $enable_zone + zookeeper . . . . . . $enable_zookeeper EOF