X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=configure.in;h=f57dd18d85b770530372b6d76ab8fcf44a95b43b;hb=d93c0d699a30ca7e1d65f04aab36b33d26a05486;hp=370f5b2654875c2763a21eac2382d4261d4d568b;hpb=d080d85ee8dd61dedd223ac68856230b3483c448;p=collectd.git diff --git a/configure.in b/configure.in index 370f5b26..1b158ec7 100644 --- a/configure.in +++ b/configure.in @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT(collectd, 3.9.0) +AC_INIT(collectd, 4.0.3) AC_CONFIG_SRCDIR(src/collectd.c) AC_CONFIG_HEADERS(src/config.h) AM_INIT_AUTOMAKE(dist-bzip2) @@ -7,6 +7,8 @@ AC_LANG(C) AC_PREFIX_DEFAULT("/opt/collectd") +AC_SYS_LARGEFILE + # # Checks for programs. # @@ -24,8 +26,9 @@ AC_SUBST(LTDLINCL) AC_SUBST(LIBLTDL) AC_LIBTOOL_DLOPEN AC_PROG_LIBTOOL -#AC_PROG_RANLIB -AC_CONFIG_SUBDIRS(libltdl src/libconfig) +AC_PROG_LEX +AC_PROG_YACC +AC_CONFIG_SUBDIRS(libltdl) # # Checks for header files. @@ -44,21 +47,29 @@ AC_CHECK_HEADERS(assert.h) AC_CHECK_HEADERS(sys/types.h) AC_CHECK_HEADERS(sys/socket.h) AC_CHECK_HEADERS(sys/select.h) +AC_CHECK_HEADERS(poll.h) AC_CHECK_HEADERS(netdb.h) AC_CHECK_HEADERS(arpa/inet.h) AC_CHECK_HEADERS(sys/resource.h) AC_CHECK_HEADERS(sys/param.h) +AC_CHECK_HEADERS(kstat.h) # For ping library AC_CHECK_HEADERS(netinet/in_systm.h, [], [], [#if HAVE_STDINT_H # include #endif +#if HAVE_SYS_TYPES_H +# include +#endif ]) AC_CHECK_HEADERS(netinet/in.h, [], [], [#if HAVE_STDINT_H # include #endif +#if HAVE_SYS_TYPES_H +# include +#endif #if HAVE_NETINET_IN_SYSTM_H # include #endif @@ -67,6 +78,9 @@ AC_CHECK_HEADERS(netinet/ip.h, [], [], [#if HAVE_STDINT_H # include #endif +#if HAVE_SYS_TYPES_H +# include +#endif #if HAVE_NETINET_IN_SYSTM_H # include #endif @@ -78,6 +92,9 @@ AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [], [#if HAVE_STDINT_H # include #endif +#if HAVE_SYS_TYPES_H +# include +#endif #if HAVE_NETINET_IN_SYSTM_H # include #endif @@ -92,6 +109,9 @@ AC_CHECK_HEADERS(netinet/ip_var.h, [], [], [#if HAVE_STDINT_H # include #endif +#if HAVE_SYS_TYPES_H +# include +#endif #if HAVE_NETINET_IN_SYSTM_H # include #endif @@ -133,6 +153,40 @@ AC_CHECK_HEADERS(netinet/icmp6.h, [], [], # include #endif ]) +AC_CHECK_HEADERS(netinet/tcp.h, [], [], +[#if HAVE_STDINT_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_NETINET_IN_SYSTM_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +#if HAVE_NETINET_IP_H +# include +#endif +]) +AC_CHECK_HEADERS(netinet/udp.h, [], [], +[#if HAVE_STDINT_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_NETINET_IN_SYSTM_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +#if HAVE_NETINET_IP_H +# include +#endif +]) # For cpu modules AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h) @@ -156,6 +210,7 @@ AC_CHECK_HEADERS(mach/kern_return.h) # For hddtemp module AC_CHECK_HEADERS(linux/major.h) +AC_CHECK_HEADERS(libgen.h) # For the apple_sensors module AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h) @@ -174,14 +229,24 @@ AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [], ]) AC_CHECK_HEADERS(IOKit/ps/IOPSKeys.h) +# For the `disk' plugin +AC_CHECK_HEADERS(IOKit/IOBSD.h) +AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDriver.h) + # For load module AC_CHECK_HEADERS(sys/loadavg.h) +# For the processes plugin +AC_CHECK_HEADERS(linux/config.h) + +# For the swap module +AC_CHECK_HEADERS(sys/swap.h) + # For users module AC_CHECK_HEADERS(utmp.h) AC_CHECK_HEADERS(utmpx.h) -# For traffic plugin +# For interface plugin AC_CHECK_HEADERS(ifaddrs.h) AC_CHECK_HEADERS(net/if.h, [], [], [ @@ -218,7 +283,7 @@ AC_CHECK_HEADERS(linux/netdevice.h, [], [], AC_CHECK_HEADERS(curl/curl.h) # For quota module -AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h) +AC_CHECK_HEADERS(pwd.h sys/ucred.h) AC_CHECK_HEADERS(ctype.h) AC_CHECK_HEADERS(limits.h) AC_CHECK_HEADERS(sys/quota.h) @@ -240,10 +305,59 @@ AC_CHECK_HEADERS(sys/statvfs.h) AC_CHECK_HEADERS(sys/vfs.h) AC_CHECK_HEADERS(sys/vfstab.h) +# For the swap plugin, FreeBSD +AC_CHECK_HEADERS(kvm.h) + +# For the email plugin +AC_CHECK_HEADERS(linux/un.h, [], [], +[ +#if HAVE_SYS_SOCKET_H +# include +#endif +]) +AC_CHECK_HEADERS(sys/un.h) +AC_CHECK_HEADERS(grp.h) + # For debugging interface (variable number of arguments) AC_CHECK_HEADERS(stdarg.h) -dnl Checking for libraries +# Regular expressions for the ignorelist. +AC_CHECK_HEADERS(regex.h) + +# For the dns plugin +AC_CHECK_HEADERS(arpa/nameser.h arpa/nameser_compat.h) + +AC_CHECK_HEADERS(net/if_arp.h, [], [], +[#if HAVE_SYS_SOCKET_H +# include +#endif +]) +AC_CHECK_HEADERS(net/if_ppp.h) +AC_CHECK_HEADERS(netinet/if_ether.h, [], [], +[#if HAVE_STDINT_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NET_IF_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +]) + +# For the multimeter plugin +AC_CHECK_HEADERS(termios.h) +AC_CHECK_HEADERS(sys/ioctl.h) + +# +# Checking for libraries +# AC_CHECK_LIB(m, ext) # @@ -260,12 +374,22 @@ AC_HEADER_TIME # AC_PROG_GCC_TRADITIONAL AC_CHECK_FUNCS(gettimeofday select strdup strtol) -AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket)) AC_CHECK_FUNCS(getaddrinfo getnameinfo) AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen) AC_CHECK_FUNCS(strncasecmp strcasecmp) AC_CHECK_FUNCS(openlog syslog closelog) +socket_needs_socket="no" +AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket))) +AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes") + +nanosleep_needs_rt="no" +AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep))) +AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes") + +# Regular expressions for the ignorelist. +AC_CHECK_FUNCS(regcomp regerror regexec regfree) + # For cpu module AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"]) @@ -285,81 +409,205 @@ AC_CHECK_FUNCS(getutent getutxent) AC_CHECK_FUNCS(quotactl) AC_CHECK_FUNCS(getgrgid getpwuid) -# For traffic module +# For interface module AC_CHECK_FUNCS(getifaddrs) -# For mount interface -AC_CHECK_FUNCS(getfsent getvfsent listmntent) -AC_CHECK_FUNCS(getfsstat) +# Check for NAN +AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])], +[ + if test "x$withval" = "xno"; then + nan_type="none" + else if test "x$withval" = "xyes"; then + nan_type="zero" + else + nan_type="$withval" + fi; fi +], +[nan_type="none"]) +if test "x$nan_type" = "xnone"; then + AC_CACHE_CHECK([whether NAN is defined by default], + [have_nan_default], + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + [[ +#include +#include +static float foo = NAN; + ]], + [[ + if (isnan (foo)) + return 0; + else + return 1; + ]]), + [have_nan_default="yes"], + [have_nan_default="no"] + ) + ) + if test "x$have_nan_default" = "xyes" + then + nan_type="default" + fi +fi +if test "x$nan_type" = "xnone"; then + AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99], + [have_nan_isoc], + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM( + [[ +#include +#define __USE_ISOC99 1 +#include +static float foo = NAN; + ]], + [[ + if (isnan (foo)) + return 0; + else + return 1; + ]]), + [have_nan_isoc="yes"], + [have_nan_isoc="no"] + ) + ) + if test "x$have_nan_isoc" = "xyes" + then + nan_type="isoc99" + fi +fi +if test "x$nan_type" = "xnone"; then + AC_CACHE_CHECK([whether NAN can be defined by 0/0], + [have_nan_zero], + AC_RUN_IFELSE( + AC_LANG_PROGRAM( + [[ +#include +#include +#ifdef NAN +# undef NAN +#endif +#define NAN (0.0 / 0.0) +#ifndef isnan +# define isnan(f) ((f) != (f)) +#endif +static float foo = NAN; + ]], + [[ + if (isnan (foo)) + return 0; + else + return 1; + ]]), + [have_nan_zero="yes"], + [have_nan_zero="no"] + ) + ) + if test "x$have_nan_zero" = "xyes" + then + nan_type="zero" + fi +fi -# Check for different versions of `getmntent' here.. -AC_FUNC_GETMNTENT -if test "x$ac_cv_lib_sun_getmntent" = "xyes" -then - AC_DEFINE(HAVE_SUN_GETMNTENT, 1, - [Define if the function getmntent exists. It's the version from libsun.]) +if test "x$nan_type" = "xdefault"; then + AC_DEFINE(NAN_STATIC_DEFAULT, 1, + [Define if NAN is defined by default and can initialize static variables.]) +else if test "x$nan_type" = "xisoc99"; then + AC_DEFINE(NAN_STATIC_ISOC, 1, + [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.]) +else if test "x$nan_type" = "xzero"; then + AC_DEFINE(NAN_ZERO_ZERO, 1, + [Define if NAN can be defined as (0.0 / 0.0)]) +else + AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.]) +fi; fi; fi + +# For mount interface +#AC_CHECK_FUNCS(getfsent getvfsent) + +have_getfsstat="no" +AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"]) +have_getvfsstat="no" +AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"]) +have_listmntent="no" +AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"]) + +have_getmntent="no" +AC_CHECK_FUNCS(getmntent, [have_getmntent="c"]) +if test "x$have_getmntent" = "xno"; then + AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"]) fi -if test "x$ac_cv_lib_seq_getmntent" = "xyes" -then - AC_DEFINE(HAVE_SEQ_GETMNTENT, 1, - [Define if the function getmntent exists. It's the version from libseq.]) +if test "x$have_getmntent" = "xno"; then + AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"]) fi -if test "x$ac_cv_lib_gen_getmntent" = "xyes" -then - AC_DEFINE(HAVE_GEN_GETMNTENT, 1, - [Define if the function getmntent exists. It's the version from libgen.]) +if test "x$have_getmntent" = "xno"; then + AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"]) fi -if test "x$ac_cv_func_getmntent" = "xyes"; then - saveCFLAGS="$CFLAGS" - CFLAGS="-Wall -Werror $CFLAGS" +if test "x$have_getmntent" = "xc"; then AC_CACHE_CHECK([whether getmntent takes one argument], - [fu_cv_getmntent1], + [have_one_getmntent], AC_COMPILE_IFELSE( AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT +#include #include "$srcdir/src/utils_mount.h"]], - [[(void)getmntent((FILE *)NULL);]] + [[ + FILE *fh; + struct mntent *me; + fh = setmntent ("/etc/mtab", "r"); + me = getmntent (fh); + ]] ), - [fu_cv_getmntent1=yes], - [fu_cv_getmntent1=no] + [have_one_getmntent="yes"], + [have_one_getmntent="no"] ) ) - if test "x$fu_cv_getmntent1" = "xno"; then - AC_CACHE_CHECK([whether getmntent takes two arguments], - [fu_cv_getmntent2], - AC_COMPILE_IFELSE( - AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT + AC_CACHE_CHECK([whether getmntent takes two arguments], + [have_two_getmntent], + AC_COMPILE_IFELSE( + AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT +#include #include "$srcdir/src/utils_mount.h"]], - [[(void)getmntent((FILE *)NULL, - (struct mnttab *)NULL);]] - ), - [fu_cv_getmntent2=yes], - [fu_cv_getmntent2=no] - ) + [[ + FILE *fh; + struct mnttab mt; + int status; + fh = fopen ("/etc/mnttab", "r"); + status = getmntent (fh, &mt); + ]] + ), + [have_two_getmntent="yes"], + [have_two_getmntent="no"] ) + ) +fi + +# Check for different versions of `getmntent' here.. + +if test "x$have_getmntent" = "xc"; then + if test "x$have_one_getmntent" = "xyes"; then + AC_DEFINE(HAVE_ONE_GETMNTENT, 1, + [Define if the function getmntent exists and takes one argument.]) + fi + if test "x$have_two_getmntent" = "xyes"; then + AC_DEFINE(HAVE_TWO_GETMNTENT, 1, + [Define if the function getmntent exists and takes two arguments.]) fi - CFLAGS="$saveCFLAGS" fi -if test "x$fu_cv_getmntent1" = "xyes"; then - AC_DEFINE(HAVE_GETMNTENT1, - 1, - [Define if there is a function named getmntent - for reading the list of mounted filesystems, and - that function takes a single argument. (4.3BSD, - SunOS, HP-UX, Dynix, Irix, Linux)] - ) +if test "x$have_getmntent" = "xsun"; then + AC_DEFINE(HAVE_SUN_GETMNTENT, 1, + [Define if the function getmntent exists. It's the version from libsun.]) fi -if test "x$fu_cv_getmntent2" = "xyes"; then - AC_DEFINE(HAVE_GETMNTENT2, - 1, - [Define if there is a function named getmntent - for reading the list of mounted filesystems, and - that function takes two arguments. (SVR4)] - ) +if test "x$have_getmntent" = "xseq"; then + AC_DEFINE(HAVE_SEQ_GETMNTENT, 1, + [Define if the function getmntent exists. It's the version from libseq.]) +fi +if test "x$have_getmntent" = "xgen"; then + AC_DEFINE(HAVE_GEN_GETMNTENT, 1, + [Define if the function getmntent exists. It's the version from libgen.]) fi # Check for structures -AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_obytes], +AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors], [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])], [], [ @@ -367,7 +615,7 @@ AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_obytes], #include #include ]) -AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_bytes], +AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors], [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])], [], [ @@ -377,6 +625,56 @@ AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_b #include ]) +AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [], +[#if HAVE_STDINT_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_NETINET_IN_SYSTM_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +#if HAVE_NETINET_IP_H +# include +#endif +#if HAVE_NETINET_UDP_H +# include +#endif +]) +AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [], +[#if HAVE_STDINT_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_NETINET_IN_SYSTM_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +#if HAVE_NETINET_IP_H +# include +#endif +#if HAVE_NETINET_UDP_H +# include +#endif +]) + +AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime], + [], + [], + [ +#if HAVE_KSTAT_H +# include +#endif + ]) + AC_MSG_CHECKING([for kernel type ($host_os)]) case $host_os in *linux*) @@ -392,14 +690,6 @@ case $host_os in esac AC_MSG_RESULT([$ac_system]) -with_libsocket="yes" -AC_CHECK_LIB(socket, socket, -[ - AC_DEFINE(HAVE_LIBSOCKET, 1, [Define to 1 if you have the 'socket' library (-lsocket).]) -], -[with_libsocket="no"]) -AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$with_libsocket" = "xyes") - with_libresolv="yes" AC_CHECK_LIB(resolv, res_search, [ @@ -443,56 +733,62 @@ AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool], [Wether or not to use rrdtool library]) AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes") -#AC_ARG_WITH(pth, [AS_HELP_STRING([--with-pth=@<:@=PREFIX@:>@], [Path to pth (experimental).]), -#[ if test "x$withval" != "xno" && test "x$withval" != "xyes" -# then -# LDFLAGS="$LDFLAGS -L$withval/lib" -# CPPFLAGS="$CPPFLAGS -I$withval/include" -# with_pth="yes" -# fi -#], [with_pth="no"]) -#if test "x$with_pth" = "xyes" -#then -# AC_CHECK_LIB(pth, pth_init,, [with_pth="no (libpth not found)"], []) -#fi -#if test "x$with_pth" = "xyes" -#then -# AC_CHECK_HEADERS(pth.h,, [with_pth="no (pth.h not found)"]) -#fi -#if test "x$with_pth" = "xyes" -#then -# collect_pth=1 -#else -# collect_pth=0 -#fi -#AC_DEFINE_UNQUOTED(COLLECT_PTH, [$collect_pth], -# [Wether or not to use pth (portable threads) library]) -#AM_CONDITIONAL(BUILD_WITH_PTH, test "x$with_pth" = "xyes") +AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])], +[ if test "x$withval" != "xno" -a "x$withval" != "xyes" + then + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + with_libpthread="yes" + else + if test "x$withval" = "xno" + then + with_libpthread="no (disabled)" + fi + fi +], [with_libpthread="yes"]) +if test "x$with_libpthread" = "xyes" +then + AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], []) +fi +if test "x$with_libpthread" = "xyes" +then + AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"]) +fi +if test "x$with_libpthread" = "xyes" +then + collect_pthread=1 +else + collect_pthread=0 +fi +AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread], + [Wether or not to use pthread (POSIX threads) library]) +AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes") if test "$ac_system" = "Solaris" then with_kstat="yes" + with_devinfo="yes" else with_kstat="no (Solaris only)" + with_devinfo="no (Solaris only)" fi + if test "x$with_kstat" = "xyes" then - AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"]) + AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], []) fi if test "x$with_kstat" = "xyes" then - AC_CHECK_LIB(devinfo, di_init) + AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], []) AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"]) fi if test "x$with_kstat" = "xyes" then - collect_kstat=1 -else - collect_kstat=0 + AC_DEFINE(HAVE_LIBKSTAT, 1, + [Define to 1 if you have the 'kstat' library (-lkstat)]) fi -AC_DEFINE_UNQUOTED(COLLECT_KSTAT, [$collect_kstat], - [Wether or not to use kstat library (Solaris)]) -AM_CONDITIONAL(BUILD_WITH_KSTAT, test "x$with_kstat" = "xyes") +AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes") +AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes") ### BEGIN of check for libcurl ### with_curl_config="curl-config" @@ -577,6 +873,8 @@ AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices, AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library]) AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes") +with_libstatgrab="yes" +with_libdevstat="no" AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])], [ if test "x$withval" != "xno" -a "x$withval" != "xyes" @@ -596,9 +894,7 @@ AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [P ]) if test "x$with_libstatgrab" = "xyes" then - AC_CHECK_LIB(devstat, getdevs) - AC_CHECK_LIB(kvm, kvm_getargv) - AC_CHECK_LIB(statgrab, sg_init,, [with_libstatgrab="no (libstatgrab not found)"]) + AC_CHECK_LIB(statgrab, sg_init, [with_libstatgrab="yes"], [with_libstatgrab="no (libstatgrab not found)"]) fi if test "x$with_libstatgrab" = "xyes" then @@ -606,6 +902,10 @@ then fi if test "x$with_libstatgrab" = "xyes" then + AC_CHECK_LIB(devstat, getdevs, [with_libdevstat="yes"], [with_libdevstat="no"]) +fi +if test "x$with_libstatgrab" = "xyes" +then collect_libstatgrab=1 else collect_libstatgrab=0 @@ -613,6 +913,14 @@ fi AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab], [Wether or not to use statgrab library]) AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes") +AM_CONDITIONAL(BUILD_WITH_LIBDEVSTAT, test "x$with_libdevstat" = "xyes") + +AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"]) +if test "x$with_libkvm" = "xyes" +then + AC_DEFINE(HAVE_LIBKVM, 1, [Define to 1 if you have the 'kvm' library (-lkvm)]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes") AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])], [ @@ -693,43 +1001,266 @@ AC_DEFINE_UNQUOTED(COLLECT_LIBMYSQL, [$collect_libmysql], [Wether or not to use mysql library]) AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes") -# Define `step' and `hearbeat' values.. -declare -i collectd_step=10 -declare -i collectd_heartbeat=25 -AC_ARG_WITH(step, [AS_HELP_STRING([--with-step=SECONDS], [Interval in which plugins are queried.])], +with_own_liboconfig="no" +liboconfig_LDFLAGS="$LDFLAGS" +liboconfig_CPPFLAGS="$CPPFLAGS" +AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])], [ - if test "x$withval" != "xno" -a "x$withval" != "xyes" + if test "x$withval" != "xno" && test "x$withval" != "xyes" then - declare -i tmp_collectd_step="$withval" - if test $tmp_collectd_step -gt 0 + if test -d "$withval/lib" then - collectd_step=$tmp_collectd_step - let "collectd_heartbeat=$collectd_step*2" + liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib" fi + if test -d "$withval/include" + then + liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include" + fi + fi + if test "x$withval" = "xno" + then + AC_MSG_ERROR("liboconfig is required") fi -], []) -AC_ARG_WITH(heartbeat, [AS_HELP_STRING([--with-heartbeat=SECONDS], [Heartbeat of the DS in generated RRD files.])], +], [ - if test "x$withval" != "xno" -a "x$withval" != "xyes" + with_liboconfig="yes" +]) + +save_LDFLAGS="$LDFLAGS" +save_CPPFLAGS="$CPPFLAGS" +LDFLAGS="$liboconfig_LDFLAGS" +CPPFLAGS="$liboconfig_CPPFLAGS" +AC_CHECK_LIB(oconfig, oconfig_parse_fh, +[ + with_liboconfig="yes" + with_own_liboconfig="no" +], +[ + with_liboconfig="yes" + with_own_liboconfig="yes" + LDFLAGS="$save_LDFLAGS" + CPPFLAGS="$save_CPPFLAGS" +]) + +AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes") +if test "x$with_own_liboconfig" = "xyes" +then + with_liboconfig="yes (shipped version)" +fi + +#with_liboping="yes" +with_own_liboping="no" +liboping_LDFLAGS="$LDFLAGS" +liboping_CPPFLAGS="$CPPFLAGS" +AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" then - declare -i tmp_collectd_heartbeat="$withval" - if test $tmp_collectd_heartbeat -gt 0 + if test -d "$withval/lib" then - collectd_heartbeat=$tmp_collectd_heartbeat + liboping_LDFLAGS="$LDFLAGS -L$withval/lib" fi + if test -d "$withval/include" + then + liboping_CPPFLAGS="$CPPFLAGS -I$withval/include" + fi + fi + if test "x$withval" = "xno" + then + with_liboping="no" + with_own_liboping="no" fi -], []) +], +[ + #753 + with_liboping="yes" +]) -if test $collectd_step -ne 10 +if test "x$with_liboping" = "xyes" then - AC_DEFINE_UNQUOTED(COLLECTD_STEP, "$collectd_step", [Interval in which plugins are queried.]) + save_LDFLAGS="$LDFLAGS" + save_CPPFLAGS="$CPPFLAGS" + LDFLAGS="$liboping_LDFLAGS" + CPPFLAGS="$liboping_CPPFLAGS" + AC_CHECK_LIB(oping, ping_construct, + [ + with_liboping="yes" + with_own_liboping="no" + ], + [ + with_liboping="yes" + with_own_liboping="yes" + LDFLAGS="$save_LDFLAGS" + CPPFLAGS="$save_CPPFLAGS" + ]) fi -if test $collectd_heartbeat -ne 25 +AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes") +AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes") +if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes" then - AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.]) + with_liboping="yes (shipped version)" fi -# +AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + with_libpcap="yes" + fi +], +[ + with_libpcap="yes" +]) +if test "x$with_libpcap" = "xyes" +then + AC_CHECK_LIB(pcap, pcap_open_live, + [ + AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).]) + ], [with_libpcap="no (libpcap not found)"]) +fi +if test "x$with_libpcap" = "xyes" +then + AC_CHECK_HEADERS(pcap.h, + [ + AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the header file.]) + ], [with_libpcap="no (pcap.h not found)"]) +fi +if test "x$with_libpcap" = "xyes" +then + collect_libpcap=1 +else + collect_libpcap=0 +fi +AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap], + [Wether or not to use the pcap library]) +AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes") + +perl_interpreter="perl" +AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + perl_interpreter="$withval/bin/perl" + with_libperl="yes" + fi +], +[ + with_libperl="yes" +]) +if test "x$with_libperl" = "xyes" +then + SAVE_CFLAGS=$CFLAGS + SAVE_LDFLAGS=$LDFLAGS + PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts` + PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts` + CFLAGS="$CFLAGS $PERL_CFLAGS" + LDFLAGS="$LDFLAGS $PERL_LDFLAGS" + + AC_CACHE_CHECK([for libperl], + [have_libperl], + AC_LINK_IFELSE( + AC_LANG_PROGRAM( + [[ +#include +#include +#include + ]], + [[ + PerlInterpreter *perl = NULL; + Perl_load_module (perl, PERL_LOADMOD_NOIMPORT, + newSVpv ("Collectd::Plugin::FooBar", 24), + Nullsv); + ]]), + [have_libperl="yes"], + [have_libperl="no"] + ) + ) + + if test "x$have_libperl" = "xyes" + then + AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.]) + AC_SUBST(PERL_CFLAGS) + AC_SUBST(PERL_LDFLAGS) + else + with_libperl="no" + fi + + CFLAGS=$SAVE_CFLAGS + LDFLAGS=$SAVE_LDFLAGS +fi +AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes") + +AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + with_libiptc="yes" + fi +], +[ + if test "x$ac_system" = "xLinux" + then + with_libiptc="yes" + else + with_libiptc="no (Linux only)" + fi +]) +if test "x$with_libiptc" = "xyes" +then + AC_CHECK_LIB(iptc, iptc_init, + [ + AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).]) + ], [with_libiptc="no (libiptc not found)"]) +fi +if test "x$with_libiptc" = "xyes" +then + AC_CHECK_HEADERS(libiptc/libiptc.h, + [ + AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the header file.]) + ], [with_libiptc="no (libiptc/libiptc.h not found)"]) +fi +if test "x$with_libiptc" = "xyes" +then + collect_libiptc=1 +else + collect_libiptc=0 +fi +AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes") + +AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])], +[ + if test "x$withval" != "xno" && test "x$withval" != "xyes" + then + LDFLAGS="$LDFLAGS -L$withval/lib" + CPPFLAGS="$CPPFLAGS -I$withval/include" + with_libupsclient="yes" + fi +], +[ + with_libupsclient="yes" +]) +if test "x$with_libupsclient" = "xyes" +then + AC_CHECK_LIB(upsclient, upscli_connect, + [ + AC_DEFINE(HAVE_LIBUPSCLIENT, 1, [Define to 1 if you have the upsclient library (-lupsclient).]) + ], [with_libupsclient="no (libupsclient not found)"]) +fi +if test "x$with_libupsclient" = "xyes" +then + AC_CHECK_HEADERS(upsclient.h, + [ + AC_DEFINE(HAVE_UPSCLIENT_H, 1, [Define to 1 if you have the header file.]) + ], [with_libupsclient="no (upsclient.h not found)"]) +fi +AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes") + # Check for enabled/disabled features # @@ -797,250 +1328,58 @@ m4_divert_once([HELP_ENABLE], [ collectd features:]) AC_COLLECTD([debug], [enable], [feature], [debugging]) AC_COLLECTD([daemon], [disable], [feature], [daemon mode]) +AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux]) m4_divert_once([HELP_ENABLE], [ collectd modules:]) AC_COLLECTD([apache], [disable], [module], [Apache httpd statistics]) +AC_COLLECTD([apcups], [disable], [module], [Statistics of UPSes by APC]) AC_COLLECTD([apple_sensors], [disable], [module], [Apple's hardware sensors]) AC_COLLECTD([battery], [disable], [module], [battery statistics]) AC_COLLECTD([cpu], [disable], [module], [cpu usage statistics]) AC_COLLECTD([cpufreq], [disable], [module], [system cpu frequency statistics]) AC_COLLECTD([disk], [disable], [module], [disk/partition statistics]) +AC_COLLECTD([csv], [disable], [module], [csv output plugin]) AC_COLLECTD([df], [disable], [module], [df statistics]) -AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)]) +AC_COLLECTD([dns], [disable], [module], [dns statistics]) +AC_COLLECTD([email], [disable], [module], [email statistics]) +AC_COLLECTD([entropy], [disable], [module], [entropy statistics]) +AC_COLLECTD([exec], [disable], [module], [exec of external programs]) AC_COLLECTD([hddtemp], [disable], [module], [hdd temperature statistics]) +AC_COLLECTD([interface], [disable], [module], [interface statistics]) +AC_COLLECTD([iptables], [disable], [module], [IPtables statistics]) +AC_COLLECTD([irq], [disable], [module], [irq statistics]) AC_COLLECTD([load], [disable], [module], [system load statistics]) +AC_COLLECTD([mbmon], [disable], [module], [motherboard monitor statistics]) AC_COLLECTD([memory], [disable], [module], [memory statistics]) +AC_COLLECTD([multimeter],[disable], [module], [multimeter statistics]) AC_COLLECTD([mysql], [disable], [module], [mysql statistics]) +AC_COLLECTD([network], [disable], [module], [network functionality]) AC_COLLECTD([nfs], [disable], [module], [nfs statistics]) +AC_COLLECTD([ntpd], [disable], [module], [ntpd statistics]) +AC_COLLECTD([nut], [disable], [module], [network UPS tools statistics]) +AC_COLLECTD([perl], [disable], [module], [embedded perl interpreter]) AC_COLLECTD([ping], [disable], [module], [ping statistics]) AC_COLLECTD([processes], [disable], [module], [processes statistics]) AC_COLLECTD([sensors], [disable], [module], [lm_sensors statistics]) AC_COLLECTD([serial], [disable], [module], [serial statistics]) +AC_COLLECTD([logfile], [disable], [module], [logfile log facility]) AC_COLLECTD([swap], [disable], [module], [swap statistics]) +AC_COLLECTD([syslog], [disable], [module], [syslog log facility]) AC_COLLECTD([tape], [disable], [module], [tape statistics]) -AC_COLLECTD([traffic], [disable], [module], [system traffic statistics]) +AC_COLLECTD([unixsock], [disable], [module], [UNIX socket plugin]) AC_COLLECTD([users], [disable], [module], [user count statistics]) AC_COLLECTD([vserver], [disable], [module], [vserver statistics]) AC_COLLECTD([wireless], [disable], [module], [wireless link statistics]) -#m4_divert_once([HELP_ENABLE], [ -#collectd modules:]) -#AC_ARG_ENABLE(cpu, AC_HELP_STRING([--disable-cpu], [Disable CPU usage statistics]),, [enable_cpu="yes"]) -#if test "x$enable_cpu" != "xno" -#then -# if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$have_sysctlbyname" = "xyes" -# then -# enable_cpu="yes" -# else -# enable_cpu="no" -# fi -#fi -#if test "x$enable_cpu" = "xno" -#then -# AC_DEFINE(COLLECT_CPU, 0, [Wether or not to collect CPU usage statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_CPU, test "x$enable_cpu" = "xyes") - -#AC_ARG_ENABLE(cpufreq, AC_HELP_STRING([--disable-cpufreq], [Disable system cpu frequency statistics]),, [enable_cpufreq="yes"]) -#if test "x$enable_cpufreq" != "xno" -#then -# if test "x$ac_system" = "xLinux" -# then -# enable_cpufreq="yes" -# else -# enable_cpufreq="no" -# fi -#fi -#if test "x$enable_cpufreq" = "xno" -#then -# AC_DEFINE(COLLECT_CPUFREQ, 0, [Wether or not to collect cpu frequency statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_CPUFREQ, test "x$enable_cpufreq" = "xyes") - -#AC_ARG_ENABLE(disk, AC_HELP_STRING([--disable-disk], [Disable disk/partition statistics]),, [enable_disk="yes"]) -#if test "x$enable_disk" != "xno" -#then -# if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -# then -# enable_disk="yes" -# else -# enable_disk="no" -# fi -#fi -#if test "x$enable_disk" = "xno" -#then -# AC_DEFINE(COLLECT_DISK, 0, [Wether or not to collect diskstats]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_DISK, test "x$enable_disk" = "xyes") - -#AC_ARG_ENABLE(hddtemp, AC_HELP_STRING([--disable-hddtemp], [Disable hdd temperature statistics]),, [enable_hddtemp="yes"]) -#if test "x$enable_hddtemp" = "xno" -#then -# AC_DEFINE(COLLECT_HDDTEMP, 0, [Wether or not to collect hdd temperature statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_HDDTEMP, test "x$enable_hddtemp" = "xyes") - -#AC_ARG_ENABLE(load, AC_HELP_STRING([--disable-load], [Disable system load statistics]),, [enable_load="yes"]) -#if test "x$enable_load" != "xno" -#then -# if test "x$have_getloadavg" = "xyes" -o "x$ac_system" = "xLinux" -o "x$with_libstatgrab" = "xyes" -# then -# enable_load="yes" -# else -# enable_load="no" -# fi -#fi -#if test "x$enable_load" = "xno" -#then -# AC_DEFINE(COLLECT_LOAD, 0, [Wether or not to collect system load statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_LOAD, test "x$enable_load" = "xyes") - -#AC_ARG_ENABLE(memory, AC_HELP_STRING([--disable-memory], [Disable memory statistics]),, [enable_memory="yes"]) -#if test "x$enable_memory" != "xno" -#then -# if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes" -# then -# enable_memory="yes" -# else -# enable_memory="no" -# fi -#fi -#if test "x$enable_memory" = "xno" -#then -# AC_DEFINE(COLLECT_MEMORY, 0, [Wether or not to collect memory statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_MEMORY, test "x$enable_memory" = "xyes") - -#AC_ARG_ENABLE(nfs, AC_HELP_STRING([--disable-nfs], [Disable nfs statistics]),, [enable_nfs="yes"]) -#if test "x$enable_nfs" != "xno" -#then -# if test "x$ac_system" = "xLinux" -# then -# enable_nfs="yes" -# else -# enable_nfs="no" -# fi -#fi -#if test "x$enable_nfs" = "xno" -#then -# AC_DEFINE(COLLECT_NFS, 0, [Wether or not to collect nfs statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_NFS, test "x$enable_nfs" = "xyes") - -#AC_ARG_ENABLE(ping, AC_HELP_STRING([--disable-ping], [Disable ping statistics]),, [enable_ping="yes"]) -#if test "x$enable_ping" != "xno" -#then -# enable_ping="yes" -#fi -#if test "x$enable_ping" = "xno" -#then -# AC_DEFINE(COLLECT_PING, 0, [Wether or not to collect ping statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_PING, test "x$enable_ping" = "xyes") - -#AC_ARG_ENABLE(processes, AC_HELP_STRING([--disable-processes], [Disable processes statistics]),, [enable_processes="yes"]) -#if test "x$enable_processes" != "xno" -#then -# if test "x$ac_system" = "xLinux" -# then -# enable_processes="yes" -# else -# enable_processes="no" -# fi -#fi -#if test "x$enable_processes" = "xno" -#then -# AC_DEFINE(COLLECT_PROCESSES, 0, [Wether or not to collect processes statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_PROCESSES, test "x$enable_processes" = "xyes") - -##AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)]) - -#AC_ARG_ENABLE(sensors, AC_HELP_STRING([--disable-sensors], [Disable lm_sensors statistics]),, [enable_sensors=$with_lm_sensors]) -#if test "x$enable_sensors" != "xno" -#then -# if test "x$with_lm_sensors" = "xyes" -# then -# enable_sensors="yes" -# else -# enable_sensors="no" -# fi -#fi -#if test "x$enable_sensors" = "xno" -#then -# AC_DEFINE(COLLECT_SENSORS, 0, [Wether or not to collect lm_sensors statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_SENSORS, test "x$enable_sensors" = "xyes") - -#AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [Disable serial statistics]),, [enable_serial="yes"]) -#if test "x$enable_serial" != "xno" -#then -# if test "x$ac_system" = "xLinux" -# then -# enable_serial="yes" -# else -# enable_serial="no" -# fi -#fi -#if test "x$enable_serial" = "xno" -#then -# AC_DEFINE(COLLECT_SERIAL, 0, [Wether or not to collect serial statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_SERIAL, test "x$enable_serial" = "xyes") - -#AC_ARG_ENABLE(swap, AC_HELP_STRING([--disable-swap], [Disable swap statistics]),, [enable_swap="yes"]) -#if test "x$enable_swap" != "xno" -#then -# if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes" -# then -# enable_swap="yes" -# else -# enable_swap="no" -# fi -#fi -#if test "x$enable_swap" = "xno" -#then -# AC_DEFINE(COLLECT_SWAP, 0, [Wether or not to collect swap statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_SWAP, test "x$enable_swap" = "xyes") - -#AC_ARG_ENABLE(tape, AC_HELP_STRING([--disable-tape], [Disable tape statistics]),, [enable_tape="yes"]) -#if test "x$enable_tape" != "xno" -#then -# if test "x$with_kstat" = "xyes" -# then -# enable_tape="yes" -# else -# enable_tape="no" -# fi -#fi -#if test "x$enable_tape" = "xno" -#then -# AC_DEFINE(COLLECT_TAPE, 0, [Wether or not to collect tape statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_TAPE, test "x$enable_tape" = "xyes") - -#AC_ARG_ENABLE(traffic, AC_HELP_STRING([--disable-traffic], [Disable system traffic statistics]),, [enable_traffic="yes"]) -#if test "x$enable_traffic" != "xno" -#then -# if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes" -# then -# enable_traffic="yes" -# else -# enable_traffic="no" -# fi -#fi -#if test "x$enable_traffic" = "xno" -#then -# AC_DEFINE(COLLECT_TRAFFIC, 0, [Wether or not to collect network traffic statistics]) -#fi -#AM_CONDITIONAL(BUILD_MODULE_TRAFFIC, test "x$enable_traffic" = "xyes") - -#AC_COLLECTD([users], [disable], [module], [user count statistics]) - -AC_OUTPUT(Makefile src/libconfig/Makefile src/liboping/Makefile src/Makefile) +AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile) + +if test "x$with_libperl" = "xyes" +then + with_libperl="yes (version `perl -MConfig -e 'print $Config{version};'`)" +else + enable_perl="no (needs libperl)" +fi cat <