X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=0f2db0788ddb4cdcb3464d0f57c17b6f2a68fbc3;hb=9f6f901889d4c9f594b5ae1fd0f449fcdd2d8fe3;hp=b75386d0fe5d5896d677612f83685eb070ae8f54;hpb=9cbc0fe63abd2bd3658b42f19ee144f803b658fa;p=collectd.git diff --git a/configure.in b/configure.in index b75386d0..0f2db078 100644 --- a/configure.in +++ b/configure.in @@ -49,6 +49,13 @@ AC_PROG_YACC PKG_PROG_PKG_CONFIG AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no]) +AC_CHECK_HEADERS([google/protobuf-c/protobuf-c.h], + [have_protobuf_c_h="yes"], + [have_protobuf_c_h="no"]) +if test "x$have_protoc_c" = "xyes" && test "x$have_protobuf_c_h" != "xyes" +then + have_protoc_c="no (unable to find )" +fi AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes") AC_MSG_CHECKING([for kernel type ($host_os)]) @@ -128,7 +135,7 @@ AC_HEADER_SYS_WAIT AC_HEADER_DIRENT AC_HEADER_STDBOOL -AC_CHECK_HEADERS(stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h) +AC_CHECK_HEADERS(stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h fnmatch.h libgen.h) # For ping library AC_CHECK_HEADERS(netinet/in_systm.h, [], [], @@ -270,7 +277,19 @@ if test "x$ac_system" = "xDarwin" then AC_CHECK_HEADERS(mach/mach_init.h mach/host_priv.h mach/mach_error.h mach/mach_host.h mach/mach_port.h mach/mach_types.h mach/message.h mach/processor_set.h mach/processor.h mach/processor_info.h mach/task.h mach/thread_act.h mach/vm_region.h mach/vm_map.h mach/vm_prot.h mach/vm_statistics.h mach/kern_return.h) AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h) + # For the battery plugin + AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], +[ +#if HAVE_IOKIT_IOKITLIB_H +# include +#endif +#if HAVE_IOKIT_IOTYPES_H +# include +#endif +]) + fi + AC_CHECK_HEADERS(sys/sysctl.h, [], [], [ #if HAVE_SYS_TYPES_H @@ -298,7 +317,7 @@ else fi # For hddtemp module -AC_CHECK_HEADERS(linux/major.h libgen.h) +AC_CHECK_HEADERS(linux/major.h) # For md module (Linux only) if test "x$ac_system" = "xLinux" @@ -315,17 +334,6 @@ else have_linux_raid_md_u_h="no" fi -# For the battery plugin -AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], -[ -#if HAVE_IOKIT_IOKITLIB_H -# include -#endif -#if HAVE_IOKIT_IOTYPES_H -# include -#endif -]) - # For the swap module have_linux_wireless_h="no" if test "x$ac_system" = "xLinux" @@ -535,6 +543,22 @@ AC_CHECK_HEADERS(netinet/if_ether.h, [], [], AC_CHECK_HEADERS(netinet/ip_compat.h) +have_net_pfvar_h="no" +AC_CHECK_HEADERS(net/pfvar.h, + [have_net_pfvar_h="yes"], + [have_net_pfvar_h="no"], +[ +#if HAVE_SYS_IOCTL_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NET_IF_H +# include +#endif +]) + # For the multimeter plugin have_termios_h="no" AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"]) @@ -1403,13 +1427,12 @@ AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes") AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes") with_libiokit="no" -AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices, -[ +if test "x$ac_system" = "xDarwin" +then with_libiokit="yes" -], -[ +else with_libiokit="no" -]) +fi AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes") with_libkvm="no" @@ -1820,6 +1843,8 @@ then if test "$with_libgcrypt" != "no"; then 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 fi @@ -1983,7 +2008,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' '{}' ';' | head -n 1` + TMPVAR=`find "$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]) @@ -1993,7 +2018,7 @@ then fi AC_MSG_CHECKING([for jni_md.h]) - TMPVAR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1` + TMPVAR=`find "$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]) @@ -2003,7 +2028,7 @@ then fi AC_MSG_CHECKING([for libjvm.so]) - TMPVAR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1` + TMPVAR=`find "$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]) @@ -2015,7 +2040,7 @@ then if test "x$JAVAC" = "x" then AC_MSG_CHECKING([for javac]) - TMPVAR=`find "$with_java_home" -name javac -type f | head -n 1` + TMPVAR=`find "$with_java_home" -name javac -type f 2>/dev/null | head -n 1` if test "x$TMPVAR" != "x" then JAVAC="$TMPVAR" @@ -2027,7 +2052,7 @@ then if test "x$JAR" = "x" then AC_MSG_CHECKING([for jar]) - TMPVAR=`find "$with_java_home" -name jar -type f | head -n 1` + TMPVAR=`find "$with_java_home" -name jar -type f 2>/dev/null | head -n 1` if test "x$TMPVAR" != "x" then JAR="$TMPVAR" @@ -2987,6 +3012,25 @@ then AC_CHECK_HEADERS(pcap-bpf.h,, [with_libpcap="no (pcap-bpf.h not found)"]) fi +if test "x$with_libpcap" = "xyes" +then + AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP], + [c_cv_libpcap_have_pcap_error_iface_not_up], + AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[[ +#include +]]], +[[[ + int val = PCAP_ERROR_IFACE_NOT_UP; +]]] + )], + [c_cv_libpcap_have_pcap_error_iface_not_up="yes"], + [c_cv_libpcap_have_pcap_error_iface_not_up="no"])) +fi +if test "x$c_cv_libpcap_have_pcap_error_iface_not_up" != "xyes" +then + with_libpcap="no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)" +fi AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes") # }}} @@ -3484,6 +3528,41 @@ fi CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes") + +with_amqp_tcp_socket="no" +if test "x$with_librabbitmq" = "xyes" +then + SAVE_CPPFLAGS="$CPPFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + SAVE_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags" + LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags" + LIBS="-lrabbitmq" + + AC_CHECK_HEADERS(amqp_tcp_socket.h amqp_socket.h) + AC_CHECK_FUNC(amqp_tcp_socket_new, [with_amqp_tcp_socket="yes"], [with_amqp_tcp_socket="no"]) + if test "x$with_amqp_tcp_socket" = "xyes" + then + AC_DEFINE(HAVE_AMQP_TCP_SOCKET, 1, + [Define if librabbitmq provides the new TCP socket interface.]) + fi + + AC_CHECK_DECLS(amqp_socket_close, + [amqp_socket_close_decl="yes"], [amqp_socket_close_decl="no"], + [[ +#include +#ifdef HAVE_AMQP_TCP_SOCKET_H +# include +#endif +#ifdef HAVE_AMQP_SOCKET_H +# include +#endif + ]]) + + CPPFLAGS="$SAVE_CPPFLAGS" + LDFLAGS="$SAVE_LDFLAGS" + LIBS="$SAVE_LIBS" +fi # }}} # --with-librouteros {{{ @@ -4645,11 +4724,13 @@ fi if test "x$with_perfstat" = "xyes" then plugin_cpu="yes" + plugin_contextswitch="yes" plugin_disk="yes" plugin_memory="yes" plugin_swap="yes" plugin_interface="yes" plugin_load="yes" + plugin_uptime="yes" fi if test "x$with_procinfo" = "xyes" @@ -4859,6 +4940,7 @@ AC_ARG_ENABLE([all-plugins], m4_divert_once([HELP_ENABLE], []) +AC_PLUGIN([aggregation], [yes], [Aggregation plugin]) AC_PLUGIN([amqp], [$with_librabbitmq], [AMQP output plugin]) AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics]) AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC]) @@ -4925,6 +5007,7 @@ AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics]) AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics]) AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin]) AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter]) +AC_PLUGIN([pf], [$have_net_pfvar_h], [BSD packet filter (PF) statistics]) # FIXME: Check for libevent, too. AC_PLUGIN([pinba], [$have_protoc_c], [Pinba statistics]) AC_PLUGIN([ping], [$with_liboping], [Network latency statistics]) @@ -4944,6 +5027,7 @@ AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics]) AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin]) AC_PLUGIN([table], [yes], [Parsing of tabular data]) AC_PLUGIN([tail], [yes], [Parsing of logfiles]) +AC_PLUGIN([tail_csv], [yes], [Parsing of CSV files]) AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics]) AC_PLUGIN([target_notification], [yes], [The notification target]) AC_PLUGIN([target_replace], [yes], [The replace target]) @@ -4966,8 +5050,9 @@ AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics]) 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_redis], [$with_libcredis], [Redis output plugin]) AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin]) +AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin]) +AC_PLUGIN([write_riemann], [$have_protoc_c], [Riemann output plugin]) AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics]) AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics]) @@ -5064,6 +5149,7 @@ then fi dnl Perl bindings +PERL_BINDINGS_OPTIONS="PREFIX=${prefix}" AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])], [ if test "x$withval" != "xno" && test "x$withval" != "xyes" @@ -5071,12 +5157,10 @@ AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@ PERL_BINDINGS_OPTIONS="$withval" with_perl_bindings="yes" else - PERL_BINDINGS_OPTIONS="" with_perl_bindings="$withval" fi ], [ - PERL_BINDINGS_OPTIONS="" if test -n "$perl_interpreter" then with_perl_bindings="yes" @@ -5108,7 +5192,7 @@ AC_SUBST(LCC_VERSION_PATCH) AC_SUBST(LCC_VERSION_EXTRA) AC_SUBST(LCC_VERSION_STRING) -AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h) +AC_CONFIG_FILES(src/libcollectdclient/collectd/lcc_features.h) AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile) @@ -5191,6 +5275,7 @@ Configuration: perl . . . . . . . . $with_perl_bindings Modules: + aggregation . . . . . $enable_aggregation amqp . . . . . . . $enable_amqp apache . . . . . . . $enable_apache apcups . . . . . . . $enable_apcups @@ -5227,7 +5312,7 @@ Configuration: libvirt . . . . . . . $enable_libvirt load . . . . . . . . $enable_load logfile . . . . . . . $enable_logfile - lpar... . . . . . . . $enable_lpar + lpar . . . . . . . . $enable_lpar madwifi . . . . . . . $enable_madwifi match_empty_counter . $enable_match_empty_counter match_hashed . . . . $enable_match_hashed @@ -5257,6 +5342,7 @@ Configuration: openvpn . . . . . . . $enable_openvpn oracle . . . . . . . $enable_oracle perl . . . . . . . . $enable_perl + pf . . . . . . . . . $enable_pf pinba . . . . . . . . $enable_pinba ping . . . . . . . . $enable_ping postgresql . . . . . $enable_postgresql @@ -5275,6 +5361,7 @@ Configuration: syslog . . . . . . . $enable_syslog table . . . . . . . . $enable_table tail . . . . . . . . $enable_tail + tail_csv . . . . . . $enable_tail_csv tape . . . . . . . . $enable_tape target_notification . $enable_target_notification target_replace . . . $enable_target_replace @@ -5297,8 +5384,9 @@ Configuration: wireless . . . . . . $enable_wireless write_graphite . . . $enable_write_graphite write_http . . . . . $enable_write_http - write_redis . . . . . $enable_write_redis write_mongodb . . . . $enable_write_mongodb + write_redis . . . . . $enable_write_redis + write_riemann . . . . $enable_write_riemann xmms . . . . . . . . $enable_xmms zfs_arc . . . . . . . $enable_zfs_arc