X-Git-Url: https://git.octo.it/?p=collectd.git;a=blobdiff_plain;f=configure.ac;h=40ccafe3c70774a6be2d8b3eb8add11b1aeb7229;hp=5fccc66bdd920a58c2bad4050b180bdcef66f174;hb=48efd3deb4c9139fd060ff3d289896e9031bcc7c;hpb=793da5a1d4fee49f3628c8147732cad52d8b0a42 diff --git a/configure.ac b/configure.ac index 5fccc66b..40ccafe3 100644 --- a/configure.ac +++ b/configure.ac @@ -165,6 +165,7 @@ AC_CHECK_HEADERS_ONCE([ \ kstat.h \ kvm.h \ libgen.h \ + locale.h \ mntent.h \ mnttab.h \ netdb.h \ @@ -635,16 +636,6 @@ fi # }}} -# For the dns plugin -AC_CHECK_HEADERS([arpa/nameser.h]) -AC_CHECK_HEADERS([arpa/nameser_compat.h], [], [], - [[ - #if HAVE_ARPA_NAMESER_H - # include - #endif - ]] -) - AC_CHECK_HEADERS([net/if_arp.h], [], [], [[ #if HAVE_SYS_SOCKET_H @@ -752,33 +743,21 @@ test_cxx_flags() { # AC_CHECK_FUNCS_ONCE([ \ asprintf \ - closelog \ - getaddrinfo \ - getgrnam_r \ - getnameinfo \ + execvpe \ getpwnam \ getpwnam_r \ - gettimeofday \ if_indextoname \ - openlog \ - regcomp \ - regerror \ - regexec \ - regfree \ - select \ - setenv \ setgroups \ - strcasecmp \ - strdup \ - strncasecmp \ - sysconf + setlocale ] ) AC_FUNC_STRERROR_R -SAVE_CFLAGS="$CFLAGS" -CFLAGS="-Wall -Werror" +if test "x$GCC" = "xyes"; then + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wall -Werror" +fi SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="" if test "x$ac_system" = "xWindows"; then @@ -879,6 +858,17 @@ AC_CHECK_FUNCS([socket], AM_CONDITIONAL([BUILD_WITH_LIBSOCKET], [test "x$socket_needs_socket" = "xyes"]) AM_CONDITIONAL([BUILD_WITH_GNULIB], [test "x$socket_needs_gnulib" = "xyes"]) +AC_CHECK_FUNCS([inet_ntop], + [], + [ + AC_CHECK_LIB([nsl], [inet_ntop], + [inet_ntop_needs_nsl="yes"], + [AC_MSG_ERROR([cannot find inet_ntop() in libnsl])] + ) + ] +) +AM_CONDITIONAL([BUILD_WITH_LIBNSL], [test "x$inet_ntop_needs_nsl" = "xyes"]) + clock_gettime_needs_posix4="no" AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime="yes"], @@ -1583,7 +1573,7 @@ if test "x$have_getmntent" = "xlibc"; then AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( - [[#include "$srcdir/src/utils_mount.h"]], + [[#include "$srcdir/src/utils/mount/mount.h"]], [[ FILE *fh; struct mntent *me; @@ -1605,7 +1595,7 @@ if test "x$have_getmntent" = "xlibc"; then AC_COMPILE_IFELSE( [ AC_LANG_PROGRAM( - [[#include "$srcdir/src/utils_mount.h"]], + [[#include "$srcdir/src/utils/mount/mount.h"]], [[ FILE *fh; struct mnttab mt; @@ -2732,6 +2722,7 @@ if test "x$withval" != "xno"; then else AC_MSG_RESULT([no]) with_libgrpcpp="no (requires C++11 support)" + with_libprotobuf="no ( requires C++11 support)" fi fi @@ -3179,67 +3170,6 @@ AC_SUBST(BUILD_WITH_LIBLUA_CFLAGS) AC_SUBST(BUILD_WITH_LIBLUA_LIBS) # }}} -# --with-liblvm2app {{{ -AC_ARG_WITH([liblvm2app], - [AS_HELP_STRING([--with-liblvm2app@<:@=PREFIX@:>@], [Path to liblvm2app.])], - [ - if test "x$withval" = "xno"; then - with_liblvm2app="no" - else - with_liblvm2app="yes" - if test "x$withval" != "xyes"; then - with_liblvm2app_cppflags="-I$withval/include" - with_liblvm2app_ldflags="-L$withval/lib" - fi - fi - ], - [ - if test "x$ac_system" = "xLinux"; then - with_liblvm2app="yes" - else - with_liblvm2app="no (Linux only library)" - fi - ] -) - -if test "x$with_liblvm2app" = "xyes"; then - SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags" - - AC_CHECK_HEADERS([lvm2app.h], - [with_liblvm2app="yes"], - [with_liblvm2app="no (lvm2app.h not found)"] - ) - - CPPFLAGS="$SAVE_CPPFLAGS" -fi - -if test "x$with_liblvm2app" = "xyes"; then - SAVE_CPPFLAGS="$CPPFLAGS" - SAVE_LDFLAGS="$LDFLAGS" - CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags" - LDFLAGS="$LDFLAGS $with_liblvm2app_ldflags" - - AC_CHECK_LIB([lvm2app], [lvm_lv_get_property], - [with_liblvm2app="yes"], - [with_liblvm2app="no (Symbol 'lvm_lv_get_property' not found)"] - ) - - CPPFLAGS="$SAVE_CPPFLAGS" - LDFLAGS="$SAVE_LDFLAGS" -fi - -if test "x$with_liblvm2app" = "xyes"; then - BUILD_WITH_LIBLVM2APP_CPPFLAGS="$with_liblvm2app_cppflags" - BUILD_WITH_LIBLVM2APP_LDFLAGS="$with_liblvm2app_ldflags" - BUILD_WITH_LIBLVM2APP_LIBS="-llvm2app" -fi - -AC_SUBST([BUILD_WITH_LIBLVM2APP_CPPFLAGS]) -AC_SUBST([BUILD_WITH_LIBLVM2APP_LDFLAGS]) -AC_SUBST([BUILD_WITH_LIBLVM2APP_LIBS]) -# }}} - # --with-libmemcached {{{ AC_ARG_WITH([libmemcached], [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])], @@ -3868,7 +3798,10 @@ if test "x$with_libnetsnmp" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" SAVE_LIBS="$LIBS" - CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags -Wall -Werror" + CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags" + if test "x$GCC" = "xyes"; then + CPPFLAGS="$CPPFLAGS -Wall -Werror" + fi LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags" LIBS="$LIBS -lnetsnmp" @@ -3968,7 +3901,13 @@ if test "x$with_libnetsnmpagent" = "xyes"; then ) AC_CHECK_LIB([netsnmpagent], [init_agent], - [with_libnetsnmpagent="yes"], + [ + # libnetsnmp can be built without mib loading support + AC_CHECK_LIB([netsnmp], [get_tree], + [with_libnetsnmpagent="yes"], + [with_libnetsnmpagent="no (libnetsnmp doesn't support mib loading)"] + ) + ], [with_libnetsnmpagent="no (libnetsnmpagent not found)"], [$libnetsnmphelpers] ) @@ -3977,6 +3916,8 @@ if test "x$with_libnetsnmpagent" = "xyes"; then fi if test "x$with_libnetsnmpagent" = "xyes"; then + BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS="$with_libnetsnmpagent_cppflags" + BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS="$with_libnetsnmpagent_ldflags" BUILD_WITH_LIBNETSNMPAGENT_LIBS="-lnetsnmpagent $libnetsnmphelpers" fi @@ -4331,7 +4272,10 @@ if test "x$with_libperl" = "xyes"; then # (see issues #41 and #42) SAVE_CFLAGS="$CFLAGS" SAVE_LIBS="$LIBS" - CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror" + CFLAGS="$CFLAGS $PERL_CFLAGS" + if test "x$GCC" = "xyes"; then + CFLAGS="$CFLAGS -Wall -Werror" + fi LIBS="$LIBS $PERL_LIBS" AC_CACHE_CHECK([for broken Perl_load_module()], @@ -4625,7 +4569,7 @@ if test "x$withval" != "xno"; then AC_CHECK_LIB([protobuf], [main], [ SAVE_CPPFLAGS="$CPPFLAGS" - CPPFLAGS="$with_libprotobuf_cppflags $PROTOBUF_CFLAGS" + CPPFLAGS="-std=c++11 $with_libprotobuf_cppflags $PROTOBUF_CFLAGS" if test "x$PROTOBUF_LIBS" = "x" then PROTOBUF_LIBS="-lprotobuf" @@ -4771,7 +4715,7 @@ if test "$PYTHON_CONFIG" != ""; then if test $? -ne 0; then with_libpython="no" fi - LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`" + LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs --embed`" || LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`" if test $? -ne 0; then with_libpython="no" fi @@ -5455,7 +5399,7 @@ AC_ARG_WITH([libtokyotyrant], with_libtokyotyrant="$withval" else with_libtokyotyrant_cppflags="-I$withval/include" - with_libtokyotyrant_ldflags="-L$withval/include" + with_libtokyotyrant_ldflags="-L$withval/lib" with_libtokyotyrant_libs="-ltokyotyrant" with_libtokyotyrant="yes" fi @@ -5769,7 +5713,7 @@ if test "x$with_libxmms" = "xyes"; then fi if test "x$with_libxmms" = "xyes"; then - SAVE_CPPFLAGS="$CFLAGS" + SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$with_xmms_cflags" AC_CHECK_HEADER([xmmsctrl.h], @@ -6369,6 +6313,7 @@ plugin_battery="no" plugin_bind="no" plugin_ceph="no" plugin_cgroups="no" +plugin_connectivity="no" plugin_conntrack="no" plugin_contextswitch="no" plugin_cpu="no" @@ -6409,12 +6354,14 @@ plugin_pcie_errors="no" plugin_perl="no" plugin_pinba="no" plugin_processes="no" +plugin_procevent="no" plugin_protocols="no" plugin_python="no" plugin_serial="no" plugin_smart="no" plugin_swap="no" plugin_synproxy="no" +plugin_sysevent="no" plugin_tape="no" plugin_tcpconns="no" plugin_ted="no" @@ -6451,7 +6398,6 @@ if test "x$ac_system" = "xLinux"; then plugin_ipc="yes" plugin_irq="yes" plugin_load="yes" - plugin_lvm="yes" plugin_mcelog="yes" plugin_memory="yes" plugin_nfs="yes" @@ -6484,6 +6430,11 @@ if test "x$ac_system" = "xLinux"; then if test "x$with_libyajl" = "xyes" && test "x$with_libyajl2" = "xyes"; then plugin_ovs_events="yes" plugin_ovs_stats="yes" + plugin_procevent="yes" + + if test "x$with_libmnl" = "xyes"; then + plugin_connectivity="yes" + fi fi if test "x$have_pci_regs_h" = "xyes"; then @@ -6518,6 +6469,7 @@ fi # FreeBSD if test "x$ac_system" = "xFreeBSD"; then + plugin_cpufreq="yes" plugin_disk="yes" plugin_zfs_arc="yes" fi @@ -6596,6 +6548,7 @@ fi if test "x$with_libyajl" = "xyes"; then plugin_ceph="yes" + plugin_sysevent="yes" fi if test "x$have_processor_info" = "xyes"; then @@ -6630,7 +6583,7 @@ if test "x$c_cv_have_one_getmntent" = "xyes"; then plugin_df="yes" fi -if test "x$c_cv_have_getmntent_r" = "xyes"; then +if test "x$have_getmntent_r" = "xyes"; then plugin_df="yes" fi @@ -6792,6 +6745,8 @@ AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserv AC_PLUGIN([ceph], [$plugin_ceph], [Ceph daemon statistics]) AC_PLUGIN([cgroups], [$plugin_cgroups], [CGroups CPU usage accounting]) AC_PLUGIN([chrony], [yes], [Chrony statistics]) +AC_PLUGIN([check_uptime], [yes], [Notify about uptime reset]) +AC_PLUGIN([connectivity], [$plugin_connectivity], [Network interface up/down events]) AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics]) AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics]) AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics]) @@ -6835,7 +6790,6 @@ AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_eve AC_PLUGIN([logfile], [yes], [File logging plugin]) AC_PLUGIN([lpar], [$with_perfstat], [AIX logical partitions statistics]) AC_PLUGIN([lua], [$with_liblua], [Lua plugin]) -AC_PLUGIN([lvm], [$with_liblvm2app], [LVM statistics]) AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics]) AC_PLUGIN([match_empty_counter], [yes], [The empty counter match]) AC_PLUGIN([match_hashed], [yes], [The hashed match]) @@ -6880,6 +6834,7 @@ AC_PLUGIN([ping], [$with_liboping], [Network latency s AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics]) AC_PLUGIN([powerdns], [yes], [PowerDNS statistics]) AC_PLUGIN([processes], [$plugin_processes], [Process statistics]) +AC_PLUGIN([procevent], [$plugin_procevent], [Process event (start, stop) statistics]) AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics]) AC_PLUGIN([python], [$plugin_python], [Embed a Python interpreter]) AC_PLUGIN([redis], [$with_libhiredis], [Redis plugin]) @@ -6895,6 +6850,7 @@ 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([sysevent], [$plugin_sysevent], [rsyslog events]) AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin]) AC_PLUGIN([table], [yes], [Parsing of tabular data]) AC_PLUGIN([tail], [yes], [Parsing of logfiles]) @@ -6923,7 +6879,6 @@ AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer sta 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_stackdriver], [$plugin_write_stackdriver], [Google Stackdriver Monitoring 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]) @@ -6931,6 +6886,8 @@ AC_PLUGIN([write_prometheus], [$plugin_write_prometheus], [Prometheus write 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]) +AC_PLUGIN([write_stackdriver], [$plugin_write_stackdriver], [Google Stackdriver Monitoring output plugin]) +AC_PLUGIN([write_syslog], [yes], [Syslog output plugin]) AC_PLUGIN([write_tsdb], [yes], [TSDB output plugin]) AC_PLUGIN([xencpu], [$plugin_xencpu], [Xen Host CPU usage]) AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics]) @@ -7074,11 +7031,13 @@ AC_SUBST([LCC_VERSION_STRING]) AC_CONFIG_FILES([src/libcollectdclient/collectd/lcc_features.h]) -AM_CFLAGS="-Wall" -AM_CXXFLAGS="-Wall" -if test "x$enable_werror" != "xno"; then - AM_CFLAGS="$AM_CFLAGS -Werror" - AM_CXXFLAGS="$AM_CXXFLAGS -Werror" +if test "x$GCC" = "xyes"; then + AM_CFLAGS="-Wall" + AM_CXXFLAGS="-Wall" + if test "x$enable_werror" != "xno"; then + AM_CFLAGS="$AM_CFLAGS -Werror" + AM_CXXFLAGS="$AM_CXXFLAGS -Werror" + fi fi AC_SUBST([AM_CFLAGS]) @@ -7149,7 +7108,6 @@ AC_MSG_RESULT([ libkstat . . . . . . $with_kstat]) AC_MSG_RESULT([ libkvm . . . . . . . $with_libkvm]) 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]) @@ -7218,6 +7176,8 @@ AC_MSG_RESULT([ bind . . . . . . . . $enable_bind]) AC_MSG_RESULT([ ceph . . . . . . . . $enable_ceph]) AC_MSG_RESULT([ cgroups . . . . . . . $enable_cgroups]) AC_MSG_RESULT([ chrony. . . . . . . . $enable_chrony]) +AC_MSG_RESULT([ check_uptime. . . . . $enable_check_uptime]) +AC_MSG_RESULT([ connectivity. . . . . $enable_connectivity]) AC_MSG_RESULT([ conntrack . . . . . . $enable_conntrack]) AC_MSG_RESULT([ contextswitch . . . . $enable_contextswitch]) AC_MSG_RESULT([ cpu . . . . . . . . . $enable_cpu]) @@ -7261,7 +7221,6 @@ AC_MSG_RESULT([ logfile . . . . . . . $enable_logfile]) AC_MSG_RESULT([ log_logstash . . . . $enable_log_logstash]) AC_MSG_RESULT([ lpar . . . . . . . . $enable_lpar]) AC_MSG_RESULT([ lua . . . . . . . . . $enable_lua]) -AC_MSG_RESULT([ lvm . . . . . . . . . $enable_lvm]) AC_MSG_RESULT([ madwifi . . . . . . . $enable_madwifi]) AC_MSG_RESULT([ match_empty_counter . $enable_match_empty_counter]) AC_MSG_RESULT([ match_hashed . . . . $enable_match_hashed]) @@ -7305,6 +7264,7 @@ AC_MSG_RESULT([ ping . . . . . . . . $enable_ping]) AC_MSG_RESULT([ postgresql . . . . . $enable_postgresql]) AC_MSG_RESULT([ powerdns . . . . . . $enable_powerdns]) AC_MSG_RESULT([ processes . . . . . . $enable_processes]) +AC_MSG_RESULT([ procevent . . . . . . $enable_procevent]) AC_MSG_RESULT([ protocols . . . . . . $enable_protocols]) AC_MSG_RESULT([ python . . . . . . . $enable_python]) AC_MSG_RESULT([ redis . . . . . . . . $enable_redis]) @@ -7320,6 +7280,7 @@ 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([ sysevent. . . . . . . $enable_sysevent]) AC_MSG_RESULT([ syslog . . . . . . . $enable_syslog]) AC_MSG_RESULT([ table . . . . . . . . $enable_table]) AC_MSG_RESULT([ tail_csv . . . . . . $enable_tail_csv]) @@ -7356,6 +7317,7 @@ AC_MSG_RESULT([ write_redis . . . . . $enable_write_redis]) AC_MSG_RESULT([ write_riemann . . . . $enable_write_riemann]) AC_MSG_RESULT([ write_sensu . . . . . $enable_write_sensu]) AC_MSG_RESULT([ write_stackdriver . . $enable_write_stackdriver]) +AC_MSG_RESULT([ write_syslog . . . . $enable_write_syslog]) AC_MSG_RESULT([ write_tsdb . . . . . $enable_write_tsdb]) AC_MSG_RESULT([ xencpu . . . . . . . $enable_xencpu]) AC_MSG_RESULT([ xmms . . . . . . . . $enable_xmms])