1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, m4_esyscmd(./version-gen.sh))
3 AC_CONFIG_SRCDIR(src/collectd.c)
4 AC_CONFIG_HEADERS(src/config.h)
5 AM_INIT_AUTOMAKE(dist-bzip2)
8 AC_PREFIX_DEFAULT("/opt/collectd")
13 # Checks for programs.
20 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
24 AC_LIBLTDL_CONVENIENCE
31 AC_CONFIG_SUBDIRS(libltdl)
33 AC_MSG_CHECKING([for kernel type ($host_os)])
36 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
40 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
49 AC_MSG_RESULT([$ac_system])
52 # Checks for header files.
58 AC_CHECK_HEADERS(stdint.h 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)
61 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
66 # include <sys/types.h>
69 AC_CHECK_HEADERS(netinet/in.h, [], [],
74 # include <sys/types.h>
76 #if HAVE_NETINET_IN_SYSTM_H
77 # include <netinet/in_systm.h>
80 AC_CHECK_HEADERS(netinet/ip.h, [], [],
85 # include <sys/types.h>
87 #if HAVE_NETINET_IN_SYSTM_H
88 # include <netinet/in_systm.h>
91 # include <netinet/in.h>
94 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
99 # include <sys/types.h>
101 #if HAVE_NETINET_IN_SYSTM_H
102 # include <netinet/in_systm.h>
104 #if HAVE_NETINET_IN_H
105 # include <netinet/in.h>
107 #if HAVE_NETINET_IP_H
108 # include <netinet/ip.h>
111 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
116 # include <sys/types.h>
118 #if HAVE_NETINET_IN_SYSTM_H
119 # include <netinet/in_systm.h>
121 #if HAVE_NETINET_IN_H
122 # include <netinet/in.h>
124 #if HAVE_NETINET_IP_H
125 # include <netinet/ip.h>
128 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
133 # include <sys/types.h>
135 #if HAVE_NETINET_IN_SYSTM_H
136 # include <netinet/in_systm.h>
138 #if HAVE_NETINET_IN_H
139 # include <netinet/in.h>
142 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
147 # include <sys/types.h>
149 #if HAVE_NETINET_IN_SYSTM_H
150 # include <netinet/in_systm.h>
152 #if HAVE_NETINET_IN_H
153 # include <netinet/in.h>
155 #if HAVE_NETINET_IP6_H
156 # include <netinet/ip6.h>
159 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
164 # include <sys/types.h>
166 #if HAVE_NETINET_IN_SYSTM_H
167 # include <netinet/in_systm.h>
169 #if HAVE_NETINET_IN_H
170 # include <netinet/in.h>
172 #if HAVE_NETINET_IP_H
173 # include <netinet/ip.h>
176 AC_CHECK_HEADERS(netinet/udp.h, [], [],
181 # include <sys/types.h>
183 #if HAVE_NETINET_IN_SYSTM_H
184 # include <netinet/in_systm.h>
186 #if HAVE_NETINET_IN_H
187 # include <netinet/in.h>
189 #if HAVE_NETINET_IP_H
190 # include <netinet/ip.h>
195 AC_CHECK_HEADERS(sys/dkstat.h)
196 if test ac_system = "Mac OS X"
198 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)
199 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
201 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
204 # include <sys/types.h>
207 # include <sys/param.h>
212 AC_CHECK_HEADERS(linux/major.h libgen.h)
214 # For the battery plugin
215 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
217 #if HAVE_IOKIT_IOKITLIB_H
218 # include <IOKit/IOKitLib.h>
220 #if HAVE_IOKIT_IOTYPES_H
221 # include <IOKit/IOTypes.h>
225 # For the swap module
226 AC_CHECK_HEADERS(sys/swap.h, [], [],
229 # include <sys/types.h>
232 # include <sys/param.h>
237 # For the processes plugin
239 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
241 # For interface plugin
242 AC_CHECK_HEADERS(ifaddrs.h)
243 AC_CHECK_HEADERS(net/if.h, [], [],
246 # include <sys/types.h>
248 #if HAVE_SYS_SOCKET_H
249 # include <sys/socket.h>
252 AC_CHECK_HEADERS(linux/if.h, [], [],
255 # include <sys/types.h>
257 #if HAVE_SYS_SOCKET_H
258 # include <sys/socket.h>
261 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
264 # include <sys/types.h>
266 #if HAVE_SYS_SOCKET_H
267 # include <sys/socket.h>
270 # include <linux/if.h>
275 AC_CHECK_HEADERS(sys/ucred.h, [], [],
278 # include <sys/types.h>
281 # include <sys/param.h>
285 # For mount interface
286 AC_CHECK_HEADERS(sys/mount.h, [], [],
289 # include <sys/types.h>
292 # include <sys/param.h>
296 # For the email plugin
297 AC_CHECK_HEADERS(linux/un.h, [], [],
299 #if HAVE_SYS_SOCKET_H
300 # include <sys/socket.h>
304 AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h sys/quota.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)
307 AC_CHECK_HEADERS(arpa/nameser.h)
308 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
310 #if HAVE_ARPA_NAMESER_H
311 # include <arpa/nameser.h>
315 AC_CHECK_HEADERS(net/if_arp.h, [], [],
316 [#if HAVE_SYS_SOCKET_H
317 # include <sys/socket.h>
320 AC_CHECK_HEADERS(net/ppp_defs.h)
321 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
322 [#if HAVE_NET_PPP_DEFS_H
323 # include <net/ppp_defs.h>
326 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
331 # include <sys/types.h>
333 #if HAVE_SYS_SOCKET_H
334 # include <sys/socket.h>
339 #if HAVE_NETINET_IN_H
340 # include <netinet/in.h>
344 # For the multimeter plugin
346 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
349 # Checking for libraries
354 # Checks for typedefs, structures, and compiler characteristics.
363 # Checks for library functions.
365 AC_PROG_GCC_TRADITIONAL
366 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog)
368 AC_CHECK_FUNCS(getpwnam_r)
369 AC_CHECK_FUNCS(getgrnam_r)
371 socket_needs_socket="no"
372 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
373 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
375 nanosleep_needs_rt="no"
376 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
377 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
379 AC_CHECK_FUNCS(regcomp regerror regexec regfree)
381 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
382 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
383 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
384 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
385 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
386 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
387 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
388 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
389 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
390 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
393 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
396 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
398 if test "x$withval" = "xno"; then
400 else if test "x$withval" = "xyes"; then
407 if test "x$nan_type" = "xnone"; then
408 AC_CACHE_CHECK([whether NAN is defined by default],
415 static float foo = NAN;
423 [have_nan_default="yes"],
424 [have_nan_default="no"]
427 if test "x$have_nan_default" = "xyes"
432 if test "x$nan_type" = "xnone"; then
433 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
439 #define __USE_ISOC99 1
441 static float foo = NAN;
449 [have_nan_isoc="yes"],
453 if test "x$have_nan_isoc" = "xyes"
458 if test "x$nan_type" = "xnone"; then
459 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
469 #define NAN (0.0 / 0.0)
471 # define isnan(f) ((f) != (f))
473 static float foo = NAN;
481 [have_nan_zero="yes"],
485 if test "x$have_nan_zero" = "xyes"
491 if test "x$nan_type" = "xdefault"; then
492 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
493 [Define if NAN is defined by default and can initialize static variables.])
494 else if test "x$nan_type" = "xisoc99"; then
495 AC_DEFINE(NAN_STATIC_ISOC, 1,
496 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
497 else if test "x$nan_type" = "xzero"; then
498 AC_DEFINE(NAN_ZERO_ZERO, 1,
499 [Define if NAN can be defined as (0.0 / 0.0)])
501 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
504 # For mount interface
505 #AC_CHECK_FUNCS(getfsent getvfsent)
508 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
510 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
512 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
515 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
516 if test "x$have_getmntent" = "xno"; then
517 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
519 if test "x$have_getmntent" = "xno"; then
520 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
522 if test "x$have_getmntent" = "xno"; then
523 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
526 if test "x$have_getmntent" = "xc"; then
527 AC_CACHE_CHECK([whether getmntent takes one argument],
528 [have_one_getmntent],
530 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
532 #include "$srcdir/src/utils_mount.h"]],
536 fh = setmntent ("/etc/mtab", "r");
540 [have_one_getmntent="yes"],
541 [have_one_getmntent="no"]
544 AC_CACHE_CHECK([whether getmntent takes two arguments],
545 [have_two_getmntent],
547 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
548 #include <sys/mnttab.h>
549 #include "$srcdir/src/utils_mount.h"]],
554 fh = fopen ("/etc/mnttab", "r");
555 status = getmntent (fh, &mt);
558 [have_two_getmntent="yes"],
559 [have_two_getmntent="no"]
564 # Check for different versions of `getmntent' here..
566 if test "x$have_getmntent" = "xc"; then
567 if test "x$have_one_getmntent" = "xyes"; then
568 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
569 [Define if the function getmntent exists and takes one argument.])
571 if test "x$have_two_getmntent" = "xyes"; then
572 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
573 [Define if the function getmntent exists and takes two arguments.])
576 if test "x$have_getmntent" = "xsun"; then
577 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
578 [Define if the function getmntent exists. It's the version from libsun.])
580 if test "x$have_getmntent" = "xseq"; then
581 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
582 [Define if the function getmntent exists. It's the version from libseq.])
584 if test "x$have_getmntent" = "xgen"; then
585 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
586 [Define if the function getmntent exists. It's the version from libgen.])
589 # Check for structures
590 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
591 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
594 #include <sys/types.h>
595 #include <sys/socket.h>
598 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
599 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
602 #include <sys/types.h>
603 #include <sys/socket.h>
604 #include <linux/if.h>
605 #include <linux/netdevice.h>
608 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
613 # include <sys/types.h>
615 #if HAVE_NETINET_IN_SYSTM_H
616 # include <netinet/in_systm.h>
618 #if HAVE_NETINET_IN_H
619 # include <netinet/in.h>
621 #if HAVE_NETINET_IP_H
622 # include <netinet/ip.h>
624 #if HAVE_NETINET_UDP_H
625 # include <netinet/udp.h>
628 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
633 # include <sys/types.h>
635 #if HAVE_NETINET_IN_SYSTM_H
636 # include <netinet/in_systm.h>
638 #if HAVE_NETINET_IN_H
639 # include <netinet/in.h>
641 #if HAVE_NETINET_IP_H
642 # include <netinet/ip.h>
644 #if HAVE_NETINET_UDP_H
645 # include <netinet/udp.h>
649 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
659 AC_CHECK_LIB(resolv, res_search,
661 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
663 [with_libresolv="no"])
664 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
667 m4_divert_once([HELP_WITH], [
668 collectd additional packages:])
670 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
671 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
672 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
674 LDFLAGS="$LDFLAGS -L$withval/lib"
675 CPPFLAGS="$CPPFLAGS -I$withval/include"
678 ], [with_rrdtool="yes"])
679 if test "x$with_rrdtool" = "xyes"
681 AC_CHECK_LIB(rrd, rrd_update,
683 AC_DEFINE(HAVE_LIBRRD, 1, [Define to 1 if you have the rrd library (-lrrd).])
685 [with_rrdtool="no (librrd not found)"], [-lm])
687 if test "x$with_rrdtool" = "xyes"
689 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
691 if test "x$with_rrdtool" = "xyes"
697 AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
698 [Wether or not to use rrdtool library])
699 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
701 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
702 [ if test "x$withval" != "xno" -a "x$withval" != "xyes"
704 LDFLAGS="$LDFLAGS -L$withval/lib"
705 CPPFLAGS="$CPPFLAGS -I$withval/include"
706 with_libpthread="yes"
708 if test "x$withval" = "xno"
710 with_libpthread="no (disabled)"
713 ], [with_libpthread="yes"])
714 if test "x$with_libpthread" = "xyes"
716 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
718 if test "x$with_libpthread" = "xyes"
720 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
722 if test "x$with_libpthread" = "xyes"
728 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
729 [Wether or not to use pthread (POSIX threads) library])
730 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
732 if test "$ac_system" = "Solaris"
737 with_kstat="no (Solaris only)"
738 with_devinfo="no (Solaris only)"
741 if test "x$with_kstat" = "xyes"
743 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
745 if test "x$with_kstat" = "xyes"
747 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
748 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
750 if test "x$with_kstat" = "xyes"
752 AC_DEFINE(HAVE_LIBKSTAT, 1,
753 [Define to 1 if you have the 'kstat' library (-lkstat)])
755 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
756 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
758 ### BEGIN of check for libcurl ###
759 with_curl_config="curl-config"
762 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
764 if test "x$withval" = "xno"
767 else if test "x$withval" = "xyes"
771 if test -x "$withval"
773 with_curl_config="$withval"
774 else if test -x "$withval/bin/curl-config"
776 with_curl_config="$withval/bin/curl-config"
783 if test "x$with_libcurl" = "xyes"
785 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
786 curl_config_status=$?
788 if test $curl_config_status -ne 0
793 CFLAGS="$CFLAGS $with_curl_cflags"
795 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
797 CFLAGS="$SAVE_CFLAGS"
800 if test "x$with_libcurl" = "xyes"
802 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
803 curl_config_status=$?
805 if test $curl_config_status -ne 0
809 AC_CHECK_LIB(curl, curl_easy_init,
811 # We need to do this to have `HAVE_LIBCURL' defined but
812 # `-lcurl' NOT added to the default LDFLAGS.
813 AC_DEFINE(HAVE_LIBCURL, 1,
814 [Define to 1 if you have the curl library.])
816 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
820 if test "x$with_libcurl" = "xyes"
822 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
823 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
824 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
825 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
827 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
828 ### END of check for libcurl ###
832 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
841 AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
842 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
844 with_libstatgrab="yes"
846 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
848 if test "x$withval" != "xno" -a "x$withval" != "xyes"
850 LDFLAGS="$LDFLAGS -L$withval/lib"
851 CPPFLAGS="$CPPFLAGS -I$withval/include"
852 with_libstatgrab="yes"
856 if test "x$ac_system" == "xunknown"
858 with_libstatgrab="yes"
860 with_libstatgrab="no"
863 if test "x$with_libstatgrab" = "xyes"
865 AC_CHECK_LIB(statgrab, sg_init, [with_libstatgrab="yes"], [with_libstatgrab="no (libstatgrab not found)"])
867 if test "x$with_libstatgrab" = "xyes"
869 AC_CHECK_HEADERS(statgrab.h,, [with_libstatgrab="no (statgrab.h not found)"])
871 if test "x$with_libstatgrab" = "xyes"
873 AC_CHECK_LIB(devstat, getdevs, [with_libdevstat="yes"], [with_libdevstat="no"])
875 if test "x$with_libstatgrab" = "xyes"
877 collect_libstatgrab=1
879 collect_libstatgrab=0
881 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
882 [Wether or not to use statgrab library])
883 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
884 AM_CONDITIONAL(BUILD_WITH_LIBDEVSTAT, test "x$with_libdevstat" = "xyes")
886 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
887 if test "x$with_libkvm" = "xyes"
889 AC_DEFINE(HAVE_LIBKVM, 1, [Define to 1 if you have the 'kvm' library (-lkvm)])
891 AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes")
893 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
895 if test "x$withval" != "xno" && test "x$withval" != "xyes"
897 LDFLAGS="$LDFLAGS -L$withval/lib"
898 CPPFLAGS="$CPPFLAGS -I$withval/include"
899 with_lm_sensors="yes"
903 if test "x$ac_system" = "xLinux"
905 with_lm_sensors="yes"
907 with_lm_sensors="no (Linux only library)"
910 if test "x$with_lm_sensors" = "xyes"
912 AC_CHECK_LIB(sensors, sensors_init,
914 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
916 [with_lm_sensors="no (libsensors not found)"])
918 if test "x$with_lm_sensors" = "xyes"
920 AC_CHECK_HEADERS(sensors/sensors.h,
922 AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
924 [with_lm_sensors="no (sensors/sensors.h not found)"])
926 if test "x$with_lm_sensors" = "xyes"
932 AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors],
933 [Wether or not to use sensors library])
934 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
936 with_mysql_config="mysql_config"
939 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
941 if test "x$withval" = "xno"
944 else if test "x$withval" = "xyes"
948 if test -x "$withval";
950 with_mysql_config="$withval"
951 else if test -x "$withval/bin/mysql_config"
953 with_mysql_config="$withval/bin/mysql_config"
960 if test "x$with_libmysql" = "xyes"
962 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
963 mysql_config_status=$?
965 if test $mysql_config_status -ne 0
970 CFLAGS="$CFLAGS $with_mysql_cflags"
972 AC_CHECK_HEADERS(mysql/mysql.h, [], [with_libmysql="no (mysql/mysql.h not found)"], [])
974 CFLAGS="$SAVE_CFLAGS"
977 if test "x$with_libmysql" = "xyes"
979 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
980 mysql_config_status=$?
982 if test $mysql_config_status -ne 0
986 AC_CHECK_LIB(mysqlclient, mysql_init,
988 # We need to do this to have `HAVE_LIBMYSQLCLIENT' defined
989 # but `-lmysqlclient' NOT added to the default LDFLAGS.
990 AC_DEFINE(HAVE_LIBMYSQLCLIENT, 1,
991 [Define to 1 if you have the mysqlclient library.])
993 [with_libmysql="no (libmysql not found)"],
997 if test "x$with_libmysql" = "xyes"
999 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1000 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1001 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1002 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1004 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1006 with_own_liboconfig="no"
1007 liboconfig_LDFLAGS="$LDFLAGS"
1008 liboconfig_CPPFLAGS="$CPPFLAGS"
1009 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1011 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1013 if test -d "$withval/lib"
1015 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1017 if test -d "$withval/include"
1019 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1022 if test "x$withval" = "xno"
1024 AC_MSG_ERROR("liboconfig is required")
1028 with_liboconfig="yes"
1031 save_LDFLAGS="$LDFLAGS"
1032 save_CPPFLAGS="$CPPFLAGS"
1033 LDFLAGS="$liboconfig_LDFLAGS"
1034 CPPFLAGS="$liboconfig_CPPFLAGS"
1035 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1037 with_liboconfig="yes"
1038 with_own_liboconfig="no"
1041 with_liboconfig="yes"
1042 with_own_liboconfig="yes"
1043 LDFLAGS="$save_LDFLAGS"
1044 CPPFLAGS="$save_CPPFLAGS"
1047 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1048 if test "x$with_own_liboconfig" = "xyes"
1050 with_liboconfig="yes (shipped version)"
1053 #with_liboping="yes"
1054 with_own_liboping="no"
1055 liboping_LDFLAGS="$LDFLAGS"
1056 liboping_CPPFLAGS="$CPPFLAGS"
1057 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1059 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1061 if test -d "$withval/lib"
1063 liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
1065 if test -d "$withval/include"
1067 liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
1070 if test "x$withval" = "xno"
1073 with_own_liboping="no"
1081 if test "x$with_liboping" = "xyes"
1083 save_LDFLAGS="$LDFLAGS"
1084 save_CPPFLAGS="$CPPFLAGS"
1085 LDFLAGS="$liboping_LDFLAGS"
1086 CPPFLAGS="$liboping_CPPFLAGS"
1087 AC_CHECK_LIB(oping, ping_construct,
1090 with_own_liboping="no"
1094 with_own_liboping="yes"
1095 LDFLAGS="$save_LDFLAGS"
1096 CPPFLAGS="$save_CPPFLAGS"
1099 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1100 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
1102 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
1104 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1106 LDFLAGS="$LDFLAGS -L$withval/lib"
1107 CPPFLAGS="$CPPFLAGS -I$withval/include"
1114 if test "x$with_libpcap" = "xyes"
1116 AC_CHECK_LIB(pcap, pcap_open_live,
1118 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
1119 ], [with_libpcap="no (libpcap not found)"])
1121 if test "x$with_libpcap" = "xyes"
1123 AC_CHECK_HEADERS(pcap.h,
1125 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
1126 ], [with_libpcap="no (pcap.h not found)"])
1128 if test "x$with_libpcap" = "xyes"
1134 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
1135 [Wether or not to use the pcap library])
1136 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
1138 perl_interpreter="perl"
1139 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
1141 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1143 LDFLAGS="$LDFLAGS -L$withval/lib"
1144 CPPFLAGS="$CPPFLAGS -I$withval/include"
1145 perl_interpreter="$withval/bin/perl"
1152 if test "x$with_libperl" = "xyes"
1155 SAVE_LDFLAGS=$LDFLAGS
1156 PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts`
1157 PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts`
1158 CFLAGS="$CFLAGS $PERL_CFLAGS"
1159 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1161 AC_CACHE_CHECK([for libperl],
1171 PerlInterpreter *perl = NULL;
1172 Perl_load_module (perl, PERL_LOADMOD_NOIMPORT,
1173 newSVpv ("Collectd::Plugin::FooBar", 24),
1176 [have_libperl="yes"],
1181 if test "x$have_libperl" = "xyes"
1183 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
1184 AC_SUBST(PERL_CFLAGS)
1185 AC_SUBST(PERL_LDFLAGS)
1191 LDFLAGS=$SAVE_LDFLAGS
1193 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1195 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1197 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1199 LDFLAGS="$LDFLAGS -L$withval/lib"
1200 CPPFLAGS="$CPPFLAGS -I$withval/include"
1205 if test "x$ac_system" = "xLinux"
1209 with_libiptc="no (Linux only)"
1212 if test "x$with_libiptc" = "xyes"
1214 AC_CHECK_LIB(iptc, iptc_init,
1216 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1217 ], [with_libiptc="no (libiptc not found)"])
1219 if test "x$with_libiptc" = "xyes"
1221 AC_CHECK_HEADERS(libiptc/libiptc.h,
1223 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1224 ], [with_libiptc="no (libiptc/libiptc.h not found)"])
1226 if test "x$with_libiptc" = "xyes"
1232 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1234 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1236 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1238 LDFLAGS="$LDFLAGS -L$withval/lib"
1239 CPPFLAGS="$CPPFLAGS -I$withval/include"
1240 with_libnetsnmp="yes"
1243 [with_libnetsnmp="yes"])
1244 if test "x$with_libnetsnmp" = "xyes"
1246 AC_CHECK_LIB(netsnmp, init_snmp,
1248 AC_DEFINE(HAVE_LIBSNMP, 1, [Define to 1 if you have the Net-SNMP library (-lnetsnmp).])
1249 ], [with_libnetsnmp="no (libnetsnmp not found)"])
1251 if test "x$with_libnetsnmp" = "xyes"
1253 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h,
1255 AC_DEFINE(HAVE_NET_SNMP_NET_SNMP_CONFIG_H, 1, [Define to 1 if you have the <net-snmp/net-snmp-config.h> header file.])
1256 ], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1258 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1260 with_upsclient_config="libupsclient-config"
1261 with_upsclient_cflags=""
1262 with_upsclient_libs=""
1263 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])],
1265 if test "x$withval" = "xno"
1267 with_libupsclient="no"
1269 with_libupsclient="yes"
1270 if "x$withval" != "xyes"
1272 with_upsclient_config="$withval/bin/libupsclient-config"
1277 with_libupsclient="yes"
1279 if test "x$with_libupsclient" = "xyes"
1281 with_upsclient_cflags=`$with_upsclient_config --cflags 2>/dev/null`
1282 upsclient_config_status=$?
1284 if test $upsclient_config_status -ne 0
1286 with_libupsclient="no"
1289 if test "x$with_libupsclient" = "xyes"
1291 with_upsclient_libs=`$with_upsclient_config --libs 2>/dev/null`
1292 upsclient_config_status=$?
1294 if test $upsclient_config_status -ne 0
1296 with_libupsclient="no"
1299 if test "x$with_libupsclient" = "xyes"
1302 CFLAGS="$CFLAGS $with_upsclient_cflags"
1303 LDFLAGS_ORIG=$LDFLAGS
1304 LDFLAGS="$LDFLAGS $with_upsclient_libs"
1305 AC_CHECK_LIB(upsclient, upscli_connect,
1307 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_upsclient_cflags"
1308 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_upsclient_libs"
1309 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1310 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
1313 with_libupsclient="no"
1316 LDFLAGS=$LDFLAGS_ORIG
1318 if test "x$with_libupsclient" = "xyes"
1320 AC_DEFINE(HAVE_LIBUPSCLIENT, 1, [Define to 1 if you have the upsclient library (-lupsclient).])
1322 if test "x$with_libupsclient" = "xyes"
1324 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
1325 [#include <stdlib.h>
1327 #include <upsclient.h>])
1329 AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
1331 ### BEGIN of check for libxmms ###
1332 with_xmms_config="xmms-config"
1335 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
1337 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1339 if test -x "$withval/bin/xmms-config"
1341 with_xmms_config="$withval/bin/xmms-config"
1344 if test "x$withval" = "xno"
1354 if test "x$with_libxmms" = "xyes"
1356 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
1357 xmms_config_status=$?
1359 if test $xmms_config_status -ne 0
1364 if test "x$with_libxmms" = "xyes"
1366 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
1367 xmms_config_status=$?
1369 if test $xmms_config_status -ne 0
1374 if test "x$with_libxmms" = "xyes"
1376 AC_CHECK_LIB(xmms, xmms_remote_get_info,
1378 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
1379 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
1380 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
1381 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
1388 with_libxmms_numeric=0
1389 if test "x$with_libxmms" = "xyes"
1391 with_libxmms_numeric=1
1393 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
1394 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
1395 ### END of check for libxmms ###
1397 with_libnetlink_cflags=""
1398 with_libnetlink_libs="-lnetlink"
1399 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1401 echo "libnetlink: withval = $withval"
1402 if test "x$withval" = "xyes"
1404 with_libnetlink="yes"
1405 else if test "x$withval" = "xno"
1407 with_libnetlink="no"
1409 if test -d "$withval/include"
1411 with_libnetlink_cflags="-I$withval/include"
1412 with_libnetlink_libs="-L$withval/lib -lnetlink"
1413 with_libnetlink="yes"
1415 AC_MSG_ERROR("no such directory: $withval/include")
1420 if test "x$ac_system" = "xLinux"
1422 with_libnetlink="yes"
1424 with_libnetlink="no (Linux only library)"
1427 if test "x$with_libnetlink" = "xyes"
1430 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1432 AC_CHECK_HEADERS(iproute/libnetlink.h, [], [with_libnetlink="no (iproute/libnetlink.h not found)"],
1434 #include <sys/types.h>
1435 #include <sys/socket.h>
1436 #include <linux/netlink.h>
1437 #include <linux/rtnetlink.h>])
1439 CFLAGS="$SAVE_CFLAGS"
1441 if test "x$with_libnetlink" = "xyes"
1443 AC_CHECK_LIB(netlink, rtnl_open,
1444 [with_libnetlink="yes"],
1445 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1446 [$with_libnetlink_libs])
1448 if test "x$with_libnetlink" = "xyes"
1450 BUILD_WITH_LIBNETLINK_CFLAGS="$with_curl_cflags"
1451 BUILD_WITH_LIBNETLINK_LIBS="$with_curl_libs"
1452 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1453 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1455 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1457 # Check for enabled/disabled features
1460 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
1461 # ------------------------------------------------------------
1463 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
1468 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
1473 m4_define([EnDis],[disabled])dnl
1474 m4_define([YesNo],[no])dnl
1480 m4_define([EnDis],[enabled])dnl
1481 m4_define([YesNo],[yes])dnl
1484 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
1488 m4_if([$3], [feature], [],
1492 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
1498 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
1500 enable_$1='[YesNo]'dnl
1502 if test "x$enable_$1" = "xno"
1506 if test "x$enable_$1" = "xyes"
1510 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
1515 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
1516 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
1518 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
1520 # AC_PLUGIN(name, default, info)
1521 # ------------------------------------------------------------
1527 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
1529 if test "x$enableval" = "xyes"
1537 if test "x$2" = "xyes"
1544 if test "x$enable_plugin" = "xyes"
1546 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
1548 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
1549 enable_$1="$enable_plugin"
1551 )# AC_PLUGIN(name, default, info)
1553 m4_divert_once([HELP_ENABLE], [
1554 collectd features:])
1555 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
1556 AC_COLLECTD([debug], [enable], [feature], [debugging])
1557 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
1558 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
1566 plugin_interface="no"
1570 plugin_multimeter="no"
1572 plugin_processes="no"
1578 plugin_wireless="no"
1581 if test "x$ac_system" = "xLinux"
1583 plugin_battery="yes"
1585 plugin_cpufreq="yes"
1587 plugin_entropy="yes"
1588 plugin_interface="yes"
1593 plugin_processes="yes"
1596 plugin_vserver="yes"
1597 plugin_wireless="yes"
1601 if test "x$with_libiokit" = "xyes"
1603 plugin_battery="yes"
1608 if test "x$with_devinfo$with_kstat" = "xyesyes"
1612 plugin_interface="yes"
1619 if test "x$with_libstatgrab" = "xyes"
1621 plugin_interface="yes"
1627 if test "x$have_processor_info" = "xyes"
1631 if test "x$have_sysctlbyname" = "xyes"
1637 if test "x$have_statfs" = "xyes"
1641 if test "x$have_statvfs" = "xyes"
1646 if test "x$have_getifaddrs" = "xyes"
1648 plugin_interface="yes"
1651 if test "x$have_getloadavg" = "xyes"
1656 # Mac OS X memory interface
1657 if test "x$have_host_statistics" = "xyes"
1662 if test "x$have_termios_h" = "xyes"
1664 plugin_multimeter="yes"
1667 if test "x$have_thread_info" = "xyes"
1669 plugin_processes="yes"
1672 if test "x$with_libkvm" = "xyes"
1677 if test "x$have_getutent" = "xyes"
1681 if test "x$have_getutxent" = "xyes"
1686 # FIXME: sysctl for swap plugin
1688 m4_divert_once([HELP_ENABLE], [
1691 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
1692 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
1693 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
1694 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
1695 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
1696 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
1697 AC_PLUGIN([csv], [yes], [CSV output plugin])
1698 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
1699 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
1700 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
1701 AC_PLUGIN([email], [yes], [EMail statistics])
1702 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
1703 AC_PLUGIN([exec], [yes], [Execution of external programs])
1704 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
1705 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
1706 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
1707 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
1708 AC_PLUGIN([load], [$plugin_load], [System load])
1709 AC_PLUGIN([logfile], [yes], [File logging plugin])
1710 AC_PLUGIN([mbmon], [yes], [Query mbmond])
1711 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
1712 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
1713 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
1714 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
1715 AC_PLUGIN([network], [yes], [Network communication plugin])
1716 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
1717 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
1718 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
1719 AC_PLUGIN([perl], [$with_libperl], [Embed a Perl interpreter])
1720 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
1721 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
1722 AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
1723 AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
1724 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
1725 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
1726 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
1727 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
1728 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
1729 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
1730 AC_PLUGIN([users], [$plugin_users], [User statistics])
1731 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
1732 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
1733 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
1735 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile)
1737 if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
1739 with_liboping="yes (shipped version)"
1742 if test "x$with_libperl" = "xyes"
1744 with_libperl="yes (version `perl -MConfig -e 'print $Config{version};'`)"
1746 enable_perl="no (needs libperl)"
1753 libcurl . . . . . . $with_libcurl
1754 libiokit . . . . . $with_libiokit
1755 libiptc . . . . . . $with_libiptc
1756 libkstat . . . . . $with_kstat
1757 libkvm . . . . . . $with_libkvm
1758 libmysql . . . . . $with_libmysql
1759 libnetlink . . . . $with_libnetlink
1760 libnetsnmp . . . . $with_libnetsnmp
1761 liboconfig . . . . $with_liboconfig
1762 liboping . . . . . $with_liboping
1763 libpcap . . . . . . $with_libpcap
1764 libperl . . . . . . $with_libperl
1765 libpthread . . . . $with_libpthread
1766 librrd . . . . . . $with_rrdtool
1767 libsensors . . . . $with_lm_sensors
1768 libstatgrab . . . . $with_libstatgrab
1769 libupsclient . . . $with_libupsclient
1770 libxmms . . . . . . $with_libxmms
1773 daemon mode . . . . $enable_daemon
1774 debug . . . . . . . $enable_debug
1777 apache . . . . . . $enable_apache
1778 apcups . . . . . . $enable_apcups
1779 apple_sensors . . . $enable_apple_sensors
1780 battery . . . . . . $enable_battery
1781 cpu . . . . . . . . $enable_cpu
1782 cpufreq . . . . . . $enable_cpufreq
1783 csv . . . . . . . . $enable_csv
1784 df . . . . . . . . $enable_df
1785 disk . . . . . . . $enable_disk
1786 dns . . . . . . . . $enable_dns
1787 email . . . . . . . $enable_email
1788 entropy . . . . . . $enable_entropy
1789 exec . . . . . . . $enable_exec
1790 hddtemp . . . . . . $enable_hddtemp
1791 interface . . . . . $enable_interface
1792 iptables . . . . . $enable_iptables
1793 irq . . . . . . . . $enable_irq
1794 load . . . . . . . $enable_load
1795 logfile . . . . . . $enable_logfile
1796 mbmon . . . . . . . $enable_mbmon
1797 memory . . . . . . $enable_memory
1798 multimeter . . . . $enable_multimeter
1799 mysql . . . . . . . $enable_mysql
1800 netlink . . . . . . $enable_netlink
1801 network . . . . . . $enable_network
1802 nfs . . . . . . . . $enable_nfs
1803 ntpd . . . . . . . $enable_ntpd
1804 nut . . . . . . . . $enable_nut
1805 perl . . . . . . . $enable_perl
1806 ping . . . . . . . $enable_ping
1807 processes . . . . . $enable_processes
1808 sensors . . . . . . $enable_sensors
1809 serial . . . . . . $enable_serial
1810 snmp . . . . . . . $enable_snmp
1811 swap . . . . . . . $enable_swap
1812 syslog . . . . . . $enable_syslog
1813 tape . . . . . . . $enable_tape
1814 unixsock . . . . . $enable_unixsock
1815 users . . . . . . . $enable_users
1816 vserver . . . . . . $enable_vserver
1817 wireless . . . . . $enable_wireless
1818 xmms . . . . . . . $enable_xmms