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.
21 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
25 AC_LIBLTDL_CONVENIENCE
33 AC_CONFIG_SUBDIRS(libltdl)
35 AC_MSG_CHECKING([for kernel type ($host_os)])
38 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
42 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
51 AC_MSG_RESULT([$ac_system])
54 # Checks for header files.
60 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 endian.h)
63 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
68 # include <sys/types.h>
71 AC_CHECK_HEADERS(netinet/in.h, [], [],
76 # include <sys/types.h>
78 #if HAVE_NETINET_IN_SYSTM_H
79 # include <netinet/in_systm.h>
82 AC_CHECK_HEADERS(netinet/ip.h, [], [],
87 # include <sys/types.h>
89 #if HAVE_NETINET_IN_SYSTM_H
90 # include <netinet/in_systm.h>
93 # include <netinet/in.h>
96 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
101 # include <sys/types.h>
103 #if HAVE_NETINET_IN_SYSTM_H
104 # include <netinet/in_systm.h>
106 #if HAVE_NETINET_IN_H
107 # include <netinet/in.h>
109 #if HAVE_NETINET_IP_H
110 # include <netinet/ip.h>
113 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
118 # include <sys/types.h>
120 #if HAVE_NETINET_IN_SYSTM_H
121 # include <netinet/in_systm.h>
123 #if HAVE_NETINET_IN_H
124 # include <netinet/in.h>
126 #if HAVE_NETINET_IP_H
127 # include <netinet/ip.h>
130 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
135 # include <sys/types.h>
137 #if HAVE_NETINET_IN_SYSTM_H
138 # include <netinet/in_systm.h>
140 #if HAVE_NETINET_IN_H
141 # include <netinet/in.h>
144 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
149 # include <sys/types.h>
151 #if HAVE_NETINET_IN_SYSTM_H
152 # include <netinet/in_systm.h>
154 #if HAVE_NETINET_IN_H
155 # include <netinet/in.h>
157 #if HAVE_NETINET_IP6_H
158 # include <netinet/ip6.h>
161 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
166 # include <sys/types.h>
168 #if HAVE_NETINET_IN_SYSTM_H
169 # include <netinet/in_systm.h>
171 #if HAVE_NETINET_IN_H
172 # include <netinet/in.h>
174 #if HAVE_NETINET_IP_H
175 # include <netinet/ip.h>
178 AC_CHECK_HEADERS(netinet/udp.h, [], [],
183 # include <sys/types.h>
185 #if HAVE_NETINET_IN_SYSTM_H
186 # include <netinet/in_systm.h>
188 #if HAVE_NETINET_IN_H
189 # include <netinet/in.h>
191 #if HAVE_NETINET_IP_H
192 # include <netinet/ip.h>
197 AC_CHECK_HEADERS(sys/dkstat.h)
198 if test "x$ac_system" = "xDarwin"
200 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)
201 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
203 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
206 # include <sys/types.h>
209 # include <sys/param.h>
214 AC_CHECK_HEADERS(linux/major.h libgen.h)
216 # For the battery plugin
217 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
219 #if HAVE_IOKIT_IOKITLIB_H
220 # include <IOKit/IOKitLib.h>
222 #if HAVE_IOKIT_IOTYPES_H
223 # include <IOKit/IOTypes.h>
227 # For the swap module
228 AC_CHECK_HEADERS(sys/swap.h, [], [],
231 # include <sys/types.h>
234 # include <sys/param.h>
239 # For the processes plugin
241 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
243 # For interface plugin
244 AC_CHECK_HEADERS(ifaddrs.h)
245 AC_CHECK_HEADERS(net/if.h, [], [],
248 # include <sys/types.h>
250 #if HAVE_SYS_SOCKET_H
251 # include <sys/socket.h>
254 AC_CHECK_HEADERS(linux/if.h, [], [],
257 # include <sys/types.h>
259 #if HAVE_SYS_SOCKET_H
260 # include <sys/socket.h>
263 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
266 # include <sys/types.h>
268 #if HAVE_SYS_SOCKET_H
269 # include <sys/socket.h>
272 # include <linux/if.h>
277 have_net_ip_vs_h="no"
279 if test "x$ac_system" = "xLinux"
281 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
282 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
286 AC_CHECK_HEADERS(sys/ucred.h, [], [],
289 # include <sys/types.h>
292 # include <sys/param.h>
296 # For mount interface
297 AC_CHECK_HEADERS(sys/mount.h, [], [],
300 # include <sys/types.h>
303 # include <sys/param.h>
307 # For the email plugin
308 AC_CHECK_HEADERS(linux/un.h, [], [],
310 #if HAVE_SYS_SOCKET_H
311 # include <sys/socket.h>
315 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 wordexp.h)
318 AC_CHECK_HEADERS(arpa/nameser.h)
319 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
321 #if HAVE_ARPA_NAMESER_H
322 # include <arpa/nameser.h>
326 AC_CHECK_HEADERS(net/if_arp.h, [], [],
327 [#if HAVE_SYS_SOCKET_H
328 # include <sys/socket.h>
331 AC_CHECK_HEADERS(net/ppp_defs.h)
332 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
333 [#if HAVE_NET_PPP_DEFS_H
334 # include <net/ppp_defs.h>
337 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
342 # include <sys/types.h>
344 #if HAVE_SYS_SOCKET_H
345 # include <sys/socket.h>
350 #if HAVE_NETINET_IN_H
351 # include <netinet/in.h>
355 # For the multimeter plugin
357 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
360 # Checks for typedefs, structures, and compiler characteristics.
369 # Checks for library functions.
371 AC_PROG_GCC_TRADITIONAL
372 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog)
376 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
378 socket_needs_socket="no"
379 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
380 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
382 nanosleep_needs_rt="no"
383 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
384 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
386 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
387 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
388 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
389 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
390 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
391 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
392 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
393 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
394 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
395 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
398 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
401 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
403 if test "x$withval" = "xno"; then
405 else if test "x$withval" = "xyes"; then
412 if test "x$nan_type" = "xnone"; then
413 AC_CACHE_CHECK([whether NAN is defined by default],
420 static float foo = NAN;
428 [have_nan_default="yes"],
429 [have_nan_default="no"]
432 if test "x$have_nan_default" = "xyes"
437 if test "x$nan_type" = "xnone"; then
438 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
444 #define __USE_ISOC99 1
446 static float foo = NAN;
454 [have_nan_isoc="yes"],
458 if test "x$have_nan_isoc" = "xyes"
463 if test "x$nan_type" = "xnone"; then
464 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
474 #define NAN (0.0 / 0.0)
476 # define isnan(f) ((f) != (f))
478 static float foo = NAN;
486 [have_nan_zero="yes"],
490 if test "x$have_nan_zero" = "xyes"
496 if test "x$nan_type" = "xdefault"; then
497 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
498 [Define if NAN is defined by default and can initialize static variables.])
499 else if test "x$nan_type" = "xisoc99"; then
500 AC_DEFINE(NAN_STATIC_ISOC, 1,
501 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
502 else if test "x$nan_type" = "xzero"; then
503 AC_DEFINE(NAN_ZERO_ZERO, 1,
504 [Define if NAN can be defined as (0.0 / 0.0)])
506 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
509 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
511 if test "x$withval" = "xnothing"; then
512 fp_layout_type="nothing"
513 else if test "x$withval" = "xendianflip"; then
514 fp_layout_type="endianflip"
515 else if test "x$withval" = "xintswap"; then
516 fp_layout_type="intswap"
518 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
521 [fp_layout_type="unknown"])
523 if test "x$fp_layout_type" = "xunknown"; then
524 AC_CACHE_CHECK([if doubles are stored in x86 representation],
525 [fp_layout_need_nothing],
541 memcpy ((void *) &i0, (void *) &d, 8);
544 memcpy ((void *) c, (void *) &i1, 8);
546 if ((c[0] == 0x2f) && (c[1] == 0x25)
547 && (c[2] == 0xc0) && (c[3] == 0xc7)
548 && (c[4] == 0x43) && (c[5] == 0x2b)
549 && (c[6] == 0x1f) && (c[7] == 0x5b))
554 [fp_layout_need_nothing="yes"],
555 [fp_layout_need_nothing="no"]
558 if test "x$fp_layout_need_nothing" = "xyes"; then
559 fp_layout_type="nothing"
562 if test "x$fp_layout_type" = "xunknown"; then
563 AC_CACHE_CHECK([if endianflip converts to x86 representation],
564 [fp_layout_need_endianflip],
572 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
573 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
574 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
575 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
576 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
577 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
578 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
579 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
588 memcpy ((void *) &i0, (void *) &d, 8);
590 i1 = endianflip (i0);
591 memcpy ((void *) c, (void *) &i1, 8);
593 if ((c[0] == 0x2f) && (c[1] == 0x25)
594 && (c[2] == 0xc0) && (c[3] == 0xc7)
595 && (c[4] == 0x43) && (c[5] == 0x2b)
596 && (c[6] == 0x1f) && (c[7] == 0x5b))
601 [fp_layout_need_endianflip="yes"],
602 [fp_layout_need_endianflip="no"]
605 if test "x$fp_layout_need_endianflip" = "xyes"; then
606 fp_layout_type="endianflip"
609 if test "x$fp_layout_type" = "xunknown"; then
610 AC_CACHE_CHECK([if intswap converts to x86 representation],
611 [fp_layout_need_intswap],
619 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
620 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
629 memcpy ((void *) &i0, (void *) &d, 8);
632 memcpy ((void *) c, (void *) &i1, 8);
634 if ((c[0] == 0x2f) && (c[1] == 0x25)
635 && (c[2] == 0xc0) && (c[3] == 0xc7)
636 && (c[4] == 0x43) && (c[5] == 0x2b)
637 && (c[6] == 0x1f) && (c[7] == 0x5b))
642 [fp_layout_need_intswap="yes"],
643 [fp_layout_need_intswap="no"]
646 if test "x$fp_layout_need_intswap" = "xyes"; then
647 fp_layout_type="intswap"
651 if test "x$fp_layout_type" = "xnothing"; then
652 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
653 [Define if doubles are stored in x86 representation.])
654 else if test "x$fp_layout_type" = "xendianflip"; then
655 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
656 [Define if endianflip is needed to convert to x86 representation.])
657 else if test "x$fp_layout_type" = "xintswap"; then
658 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
659 [Define if intswap is needed to convert to x86 representation.])
661 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
665 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
667 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
669 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
672 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
673 if test "x$have_getmntent" = "xno"; then
674 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
676 if test "x$have_getmntent" = "xno"; then
677 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
679 if test "x$have_getmntent" = "xno"; then
680 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
683 if test "x$have_getmntent" = "xc"; then
684 AC_CACHE_CHECK([whether getmntent takes one argument],
685 [have_one_getmntent],
687 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
689 #include "$srcdir/src/utils_mount.h"]],
693 fh = setmntent ("/etc/mtab", "r");
697 [have_one_getmntent="yes"],
698 [have_one_getmntent="no"]
701 AC_CACHE_CHECK([whether getmntent takes two arguments],
702 [have_two_getmntent],
704 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
705 #include <sys/mnttab.h>
706 #include "$srcdir/src/utils_mount.h"]],
711 fh = fopen ("/etc/mnttab", "r");
712 status = getmntent (fh, &mt);
715 [have_two_getmntent="yes"],
716 [have_two_getmntent="no"]
721 # Check for different versions of `getmntent' here..
723 if test "x$have_getmntent" = "xc"; then
724 if test "x$have_one_getmntent" = "xyes"; then
725 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
726 [Define if the function getmntent exists and takes one argument.])
728 if test "x$have_two_getmntent" = "xyes"; then
729 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
730 [Define if the function getmntent exists and takes two arguments.])
733 if test "x$have_getmntent" = "xsun"; then
734 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
735 [Define if the function getmntent exists. It's the version from libsun.])
737 if test "x$have_getmntent" = "xseq"; then
738 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
739 [Define if the function getmntent exists. It's the version from libseq.])
741 if test "x$have_getmntent" = "xgen"; then
742 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
743 [Define if the function getmntent exists. It's the version from libgen.])
746 # Check for structures
747 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
748 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
751 #include <sys/types.h>
752 #include <sys/socket.h>
755 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
756 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
759 #include <sys/types.h>
760 #include <sys/socket.h>
761 #include <linux/if.h>
762 #include <linux/netdevice.h>
765 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
770 # include <sys/types.h>
772 #if HAVE_NETINET_IN_SYSTM_H
773 # include <netinet/in_systm.h>
775 #if HAVE_NETINET_IN_H
776 # include <netinet/in.h>
778 #if HAVE_NETINET_IP_H
779 # include <netinet/ip.h>
781 #if HAVE_NETINET_UDP_H
782 # include <netinet/udp.h>
785 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
790 # include <sys/types.h>
792 #if HAVE_NETINET_IN_SYSTM_H
793 # include <netinet/in_systm.h>
795 #if HAVE_NETINET_IN_H
796 # include <netinet/in.h>
798 #if HAVE_NETINET_IP_H
799 # include <netinet/ip.h>
801 #if HAVE_NETINET_UDP_H
802 # include <netinet/udp.h>
806 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
816 # Checks for libraries begin here
819 AC_CHECK_LIB(resolv, res_search,
821 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
823 [with_libresolv="no"])
824 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
826 dnl Check for HAL (hardware abstraction library)
828 AC_CHECK_LIB(hal,libhal_device_property_exists,
829 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
831 if test "x$with_libhal" = "xyes"; then
833 if test "x$PKG_CONFIG" != "x"; then
834 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
835 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
836 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
837 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
841 m4_divert_once([HELP_WITH], [
842 collectd additional packages:])
844 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
847 librrd_threadsafe="yes"
848 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
849 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
851 librrd_cflags="-I$withval/include"
852 librrd_ldflags="-L$withval/lib"
855 with_rrdtool="$withval"
857 ], [with_rrdtool="yes"])
858 if test "x$with_rrdtool" = "xyes"
860 SAVE_CPPFLAGS="$CPPFLAGS"
861 SAVE_LDFLAGS="$LDFLAGS"
863 CPPFLAGS="$CPPFLAGS $librrd_cflags"
864 LDFLAGS="$LDFLAGS $librrd_ldflags"
866 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
868 CPPFLAGS="$SAVE_CPPFLAGS"
869 LDFLAGS="$SAVE_LDFLAGS"
871 if test "x$with_rrdtool" = "xyes"
873 SAVE_CPPFLAGS="$CPPFLAGS"
874 SAVE_LDFLAGS="$LDFLAGS"
876 CPPFLAGS="$CPPFLAGS $librrd_cflags"
877 LDFLAGS="$LDFLAGS $librrd_ldflags"
879 AC_CHECK_LIB(rrd_th, rrd_update_r,
881 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
883 [librrd_threadsafe="no"
884 AC_CHECK_LIB(rrd, rrd_update,
886 librrd_ldflags="$librrd_ldflags -lrrd -lm"
888 [with_rrdtool="no (symbol 'rrd_update' not found)"],
893 CPPFLAGS="$SAVE_CPPFLAGS"
894 LDFLAGS="$SAVE_LDFLAGS"
896 if test "x$with_rrdtool" = "xyes"
898 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
899 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
900 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
901 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
903 if test "x$librrd_threadsafe" = "xyes"
905 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
908 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
909 [ if test "x$withval" != "xno" -a "x$withval" != "xyes"
911 LDFLAGS="$LDFLAGS -L$withval/lib"
912 CPPFLAGS="$CPPFLAGS -I$withval/include"
913 with_libpthread="yes"
915 if test "x$withval" = "xno"
917 with_libpthread="no (disabled)"
920 ], [with_libpthread="yes"])
921 if test "x$with_libpthread" = "xyes"
923 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
925 if test "x$with_libpthread" = "xyes"
927 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
929 if test "x$with_libpthread" = "xyes"
935 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
936 [Wether or not to use pthread (POSIX threads) library])
937 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
939 if test "x$ac_system" = "xSolaris"
944 with_kstat="no (Solaris only)"
945 with_devinfo="no (Solaris only)"
948 if test "x$with_kstat" = "xyes"
950 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
952 if test "x$with_kstat" = "xyes"
954 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
955 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
957 if test "x$with_kstat" = "xyes"
959 AC_DEFINE(HAVE_LIBKSTAT, 1,
960 [Define to 1 if you have the 'kstat' library (-lkstat)])
962 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
963 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
965 ### BEGIN of check for libcurl ###
966 with_curl_config="curl-config"
969 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
971 if test "x$withval" = "xno"
974 else if test "x$withval" = "xyes"
978 if test -f "$withval" && test -x "$withval"
980 with_curl_config="$withval"
982 else if test -x "$withval/bin/curl-config"
984 with_curl_config="$withval/bin/curl-config"
993 if test "x$with_libcurl" = "xyes"
995 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
996 curl_config_status=$?
998 if test $curl_config_status -ne 0
1000 with_libcurl="no ($with_curl_config failed)"
1002 SAVE_CPPFLAGS="$CPPFLAGS"
1003 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1005 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1007 CPPFLAGS="$SAVE_CPPFLAGS"
1010 if test "x$with_libcurl" = "xyes"
1012 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1013 curl_config_status=$?
1015 if test $curl_config_status -ne 0
1017 with_libcurl="no ($with_curl_config failed)"
1019 AC_CHECK_LIB(curl, curl_easy_init,
1020 [with_libcurl="yes"],
1021 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1025 if test "x$with_libcurl" = "xyes"
1027 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1028 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1029 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1030 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1032 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1033 ### END of check for libcurl ###
1037 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1046 AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
1047 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1049 with_libstatgrab_cflags=""
1050 with_libstatgrab_ldflags=""
1051 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
1053 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1055 with_libstatgrab_cflags="-I$withval/include"
1056 with_libstatgrab_ldflags="-L$withval/lib"
1057 with_libstatgrab="yes"
1059 with_libstatgrab="$withval"
1063 if test "x$ac_system" == "xunknown"
1065 with_libstatgrab="yes"
1067 with_libstatgrab="no"
1070 with_libstatgrab_pkg_config="yes"
1071 if test "x$with_libstatgrab" = "xyes" \
1072 && test "x$PKG_CONFIG" != "x"
1074 AC_MSG_CHECKING([pkg-config for libstatgrab])
1076 $PKG_CONFIG --exists libstatgrab 2>/dev/null
1079 with_libstatgrab_pkg_config="no"
1080 temp_result="not found"
1082 AC_MSG_RESULT([$temp_result])
1084 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
1085 with_libstatgrab_pkg_config="no"
1086 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
1089 if test "x$with_libstatgrab" = "xyes" \
1090 && test "x$with_libstatgrab_pkg_config" = "xyes" \
1091 && test "x$with_libstatgrab_cflags" = "x"
1093 AC_MSG_CHECKING([for libstatgrab CFLAGS])
1094 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
1097 with_libstatgrab_cflags="$temp_result"
1099 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
1100 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
1102 AC_MSG_RESULT([$temp_result])
1105 if test "x$with_libstatgrab" = "xyes" \
1106 && test "x$with_libstatgrab_pkg_config" = "xyes" \
1107 && test "x$with_libstatgrab_ldflags" = "x"
1109 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
1110 temp_result="`$PKG_CONFIG --libs libstatgrab`"
1113 with_libstatgrab_ldflags="$temp_result"
1115 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
1116 temp_result="$PKG_CONFIG --libs libstatgrab failed"
1118 AC_MSG_RESULT([$temp_result])
1121 if test "x$with_libstatgrab" = "xyes"
1123 SAVE_CPPFLAGS="$CPPFLAGS"
1124 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
1126 AC_CHECK_HEADERS(statgrab.h,
1127 [with_libstatgrab="yes"],
1128 [with_libstatgrab="no (statgrab.h not found)"])
1130 CPPFLAGS="$SAVE_CPPFLAGS"
1133 if test "x$with_libstatgrab" = "xyes"
1135 SAVE_CFLAGS="$CFLAGS"
1136 SAVE_LDFLAGS="$LDFLAGS"
1138 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
1139 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
1141 AC_CHECK_LIB(statgrab, sg_init,
1142 [with_libstatgrab="yes"],
1143 [with_libstatgrab="no (symbol sg_init not found)"])
1145 CFLAGS="$SAVE_CFLAGS"
1146 LDFLAGS="$SAVE_LDFLAGS"
1149 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
1150 if test "x$with_libstatgrab" = "xyes"
1152 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
1153 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
1154 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1155 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1158 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
1159 if test "x$with_libkvm" = "xyes"
1161 AC_DEFINE(HAVE_LIBKVM, 1, [Define to 1 if you have the 'kvm' library (-lkvm)])
1163 AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes")
1165 with_sensors_cflags=""
1166 with_sensors_ldflags=""
1167 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
1169 if test "x$withval" = "xno"
1171 with_lm_sensors="no"
1173 with_lm_sensors="yes"
1174 if test "x$withval" != "xyes"
1176 with_sensors_cflags="-I$withval/include"
1177 with_sensors_ldflags="-L$withval/lib"
1178 with_lm_sensors="yes"
1183 if test "x$ac_system" = "xLinux"
1185 with_lm_sensors="yes"
1187 with_lm_sensors="no (Linux only library)"
1190 if test "x$with_lm_sensors" = "xyes"
1192 SAVE_CPPFLAGS="$CPPFLAGS"
1193 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1195 # AC_CHECK_HEADERS(sensors/sensors.h,
1197 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
1199 # [with_lm_sensors="no (sensors/sensors.h not found)"])
1200 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_lm_sensors="no (sensors/sensors.h not found)"])
1202 CPPFLAGS="$SAVE_CPPFLAGS"
1204 if test "x$with_lm_sensors" = "xyes"
1206 SAVE_CPPFLAGS="$CPPFLAGS"
1207 SAVE_LDFLAGS="$LDFLAGS"
1208 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1209 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
1211 AC_CHECK_LIB(sensors, sensors_init,
1213 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
1215 [with_lm_sensors="no (libsensors not found)"])
1217 CPPFLAGS="$SAVE_CPPFLAGS"
1218 LDFLAGS="$SAVE_LDFLAGS"
1220 if test "x$with_lm_sensors" = "xyes"
1222 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
1223 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
1224 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
1225 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
1227 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
1229 with_mysql_config="mysql_config"
1230 with_mysql_cflags=""
1232 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1234 if test "x$withval" = "xno"
1237 else if test "x$withval" = "xyes"
1241 if test -f "$withval" && test -x "$withval";
1243 with_mysql_config="$withval"
1244 else if test -x "$withval/bin/mysql_config"
1246 with_mysql_config="$withval/bin/mysql_config"
1254 if test "x$with_libmysql" = "xyes"
1256 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1257 mysql_config_status=$?
1259 if test $mysql_config_status -ne 0
1263 SAVE_CPPFLAGS="$CPPFLAGS"
1264 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1266 AC_CHECK_HEADERS(mysql/mysql.h, [], [with_libmysql="no (mysql/mysql.h not found)"], [])
1268 CPPFLAGS="$SAVE_CPPFLAGS"
1271 if test "x$with_libmysql" = "xyes"
1273 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1274 mysql_config_status=$?
1276 if test $mysql_config_status -ne 0
1280 AC_CHECK_LIB(mysqlclient, mysql_init,
1281 [with_libmysql="yes"],
1282 [with_libmysql="no (symbol 'mysql_init' not found)"],
1286 if test "x$with_libmysql" = "xyes"
1288 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1289 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1290 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1291 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1293 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1295 with_own_liboconfig="no"
1296 liboconfig_LDFLAGS="$LDFLAGS"
1297 liboconfig_CPPFLAGS="$CPPFLAGS"
1298 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1300 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1302 if test -d "$withval/lib"
1304 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1306 if test -d "$withval/include"
1308 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1311 if test "x$withval" = "xno"
1313 AC_MSG_ERROR("liboconfig is required")
1317 with_liboconfig="yes"
1320 save_LDFLAGS="$LDFLAGS"
1321 save_CPPFLAGS="$CPPFLAGS"
1322 LDFLAGS="$liboconfig_LDFLAGS"
1323 CPPFLAGS="$liboconfig_CPPFLAGS"
1324 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1326 with_liboconfig="yes"
1327 with_own_liboconfig="no"
1330 with_liboconfig="yes"
1331 with_own_liboconfig="yes"
1332 LDFLAGS="$save_LDFLAGS"
1333 CPPFLAGS="$save_CPPFLAGS"
1336 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1337 if test "x$with_own_liboconfig" = "xyes"
1339 with_liboconfig="yes (shipped version)"
1342 #with_liboping="yes"
1343 with_own_liboping="no"
1344 liboping_LDFLAGS="$LDFLAGS"
1345 liboping_CPPFLAGS="$CPPFLAGS"
1346 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1348 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1350 if test -d "$withval/lib"
1352 liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
1354 if test -d "$withval/include"
1356 liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
1359 if test "x$withval" = "xno"
1362 with_own_liboping="no"
1363 else if test "x$withval" = "xyes"
1372 if test "x$with_liboping" = "xyes"
1374 save_LDFLAGS="$LDFLAGS"
1375 save_CPPFLAGS="$CPPFLAGS"
1376 LDFLAGS="$liboping_LDFLAGS"
1377 CPPFLAGS="$liboping_CPPFLAGS"
1378 AC_CHECK_LIB(oping, ping_construct,
1381 with_own_liboping="no"
1385 with_own_liboping="yes"
1386 LDFLAGS="$save_LDFLAGS"
1387 CPPFLAGS="$save_CPPFLAGS"
1390 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1391 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
1393 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
1395 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1397 LDFLAGS="$LDFLAGS -L$withval/lib"
1398 CPPFLAGS="$CPPFLAGS -I$withval/include"
1401 with_libpcap="$withval"
1407 if test "x$with_libpcap" = "xyes"
1409 AC_CHECK_LIB(pcap, pcap_open_live,
1411 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
1412 ], [with_libpcap="no (libpcap not found)"])
1414 if test "x$with_libpcap" = "xyes"
1416 AC_CHECK_HEADERS(pcap.h,
1418 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
1419 ], [with_libpcap="no (pcap.h not found)"])
1421 if test "x$with_libpcap" = "xyes"
1427 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
1428 [Wether or not to use the pcap library])
1429 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
1431 perl_interpreter="perl"
1432 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
1434 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1436 LDFLAGS="$LDFLAGS -L$withval/lib"
1437 CPPFLAGS="$CPPFLAGS -I$withval/include"
1438 perl_interpreter="$withval/bin/perl"
1441 with_libperl="$withval"
1448 AC_SUBST(PERL, "$perl_interpreter")
1450 if test "x$with_libperl" = "xyes"
1453 SAVE_LDFLAGS=$LDFLAGS
1454 PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts`
1455 PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts`
1456 CFLAGS="$CFLAGS $PERL_CFLAGS"
1457 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1459 AC_CACHE_CHECK([for libperl],
1469 PerlInterpreter *perl = NULL;
1470 Perl_load_module (perl, PERL_LOADMOD_NOIMPORT,
1471 newSVpv ("Collectd::Plugin::FooBar", 24),
1474 [have_libperl="yes"],
1479 if test "x$have_libperl" = "xyes"
1481 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
1482 AC_SUBST(PERL_CFLAGS)
1483 AC_SUBST(PERL_LDFLAGS)
1489 LDFLAGS=$SAVE_LDFLAGS
1491 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1493 if test "x$with_libperl" = "xyes"
1496 SAVE_LDFLAGS=$LDFLAGS
1497 CFLAGS="$CFLAGS $PERL_CFLAGS"
1498 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1500 AC_CACHE_CHECK([if perl supports ithreads],
1501 [have_perl_ithreads],
1509 #if !defined(USE_ITHREADS)
1510 # error "Perl does not support ithreads!"
1511 #endif /* !defined(USE_ITHREADS) */
1514 [have_perl_ithreads="yes"],
1515 [have_perl_ithreads="no"]
1519 if test "x$have_perl_ithreads" = "xyes"
1521 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
1525 LDFLAGS=$SAVE_LDFLAGS
1528 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1530 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1532 LDFLAGS="$LDFLAGS -L$withval/lib"
1533 CPPFLAGS="$CPPFLAGS -I$withval/include"
1536 with_libiptc="$withval"
1540 if test "x$ac_system" = "xLinux"
1544 with_libiptc="no (Linux only)"
1547 if test "x$with_libiptc" = "xyes"
1549 AC_CHECK_LIB(iptc, iptc_init,
1551 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1552 ], [with_libiptc="no (libiptc not found)"])
1554 if test "x$with_libiptc" = "xyes"
1556 AC_CHECK_HEADERS(libiptc/libiptc.h,
1558 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1559 ], [with_libiptc="no (libiptc/libiptc.h not found)"])
1561 if test "x$with_libiptc" = "xyes"
1567 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1569 with_snmp_config="net-snmp-config"
1572 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1574 if test "x$withval" = "xno"
1576 with_libnetsnmp="no"
1577 else if test "x$withval" = "xyes"
1579 with_libnetsnmp="yes"
1581 if test -x "$withval"
1583 with_snmp_config="$withval"
1584 with_libnetsnmp="yes"
1586 with_snmp_config="$withval/bin/net-snmp-config"
1587 with_libnetsnmp="yes"
1591 [with_libnetsnmp="yes"])
1592 if test "x$with_libnetsnmp" = "xyes"
1594 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
1595 snmp_config_status=$?
1597 if test $snmp_config_status -ne 0
1599 with_libnetsnmp="no ($with_snmp_config failed)"
1601 SAVE_CPPFLAGS="$CPPFLAGS"
1602 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
1604 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1606 CPPFLAGS="$SAVE_CPPFLAGS"
1609 if test "x$with_libnetsnmp" = "xyes"
1611 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
1612 snmp_config_status=$?
1614 if test $snmp_config_status -ne 0
1616 with_libnetsnmp="no ($with_snmp_config failed)"
1618 AC_CHECK_LIB(netsnmp, init_snmp,
1619 [with_libnetsnmp="yes"],
1620 [with_libnetsnmp="no (libnetsnmp not found)"],
1624 if test "x$with_libnetsnmp" = "xyes"
1626 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
1627 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
1628 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
1629 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
1631 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1633 with_upsclient_config="libupsclient-config"
1634 with_upsclient_cflags=""
1635 with_upsclient_libs=""
1636 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])],
1638 if test "x$withval" = "xno"
1640 with_libupsclient="no"
1642 if test "x$withval" != "xyes"
1644 if test -f "$withval" && test -x "$withval";
1646 with_upsclient_config="$withval"
1648 with_upsclient_config="$withval/bin/libupsclient-config"
1651 with_libupsclient="yes"
1655 with_libupsclient="yes"
1657 if test "x$with_libupsclient" = "xyes"
1659 with_upsclient_cflags=`$with_upsclient_config --cflags 2>/dev/null`
1660 upsclient_config_status=$?
1662 if test $upsclient_config_status -ne 0
1664 with_libupsclient="no ($with_upsclient_config failed)"
1667 if test "x$with_libupsclient" = "xyes"
1669 SAVE_CPPFLAGS="$CPPFLAGS"
1670 CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
1672 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
1674 CPPFLAGS="$SAVE_CPPFLAGS"
1676 if test "x$with_libupsclient" = "xyes"
1678 with_upsclient_libs=`$with_upsclient_config --libs 2>/dev/null`
1679 upsclient_config_status=$?
1681 if test $upsclient_config_status -ne 0
1683 with_libupsclient="no ($with_upsclient_config failed)"
1686 if test "x$with_libupsclient" = "xyes"
1688 AC_CHECK_LIB(upsclient, upscli_connect,
1690 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_upsclient_cflags"
1691 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_upsclient_libs"
1692 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1693 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
1696 with_libupsclient="no (symbol 'upscli_connect' not found)"
1697 ], [$with_upsclient_libs])
1699 if test "x$with_libupsclient" = "xyes"
1701 SAVE_CPPFLAGS="$CPPFLAGS"
1702 CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
1704 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
1705 [#include <stdlib.h>
1707 #include <upsclient.h>])
1709 CPPFLAGS="$SAVE_CPPFLAGS"
1711 AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
1713 ### BEGIN of check for libxmms ###
1714 with_xmms_config="xmms-config"
1717 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
1719 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1721 if test -f "$withval" && test -x "$withval";
1723 with_xmms_config="$withval"
1724 else if test -x "$withval/bin/xmms-config"
1726 with_xmms_config="$withval/bin/xmms-config"
1729 else if test "x$withval" = "xno"
1739 if test "x$with_libxmms" = "xyes"
1741 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
1742 xmms_config_status=$?
1744 if test $xmms_config_status -ne 0
1749 if test "x$with_libxmms" = "xyes"
1751 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
1752 xmms_config_status=$?
1754 if test $xmms_config_status -ne 0
1759 if test "x$with_libxmms" = "xyes"
1761 AC_CHECK_LIB(xmms, xmms_remote_get_info,
1763 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
1764 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
1765 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
1766 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
1773 with_libxmms_numeric=0
1774 if test "x$with_libxmms" = "xyes"
1776 with_libxmms_numeric=1
1778 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
1779 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
1780 ### END of check for libxmms ###
1782 with_libnetlink_cflags=""
1783 with_libnetlink_libs="-lnetlink"
1784 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1786 echo "libnetlink: withval = $withval"
1787 if test "x$withval" = "xyes"
1789 with_libnetlink="yes"
1790 else if test "x$withval" = "xno"
1792 with_libnetlink="no"
1794 if test -d "$withval/include"
1796 with_libnetlink_cflags="-I$withval/include"
1797 with_libnetlink_libs="-L$withval/lib -lnetlink"
1798 with_libnetlink="yes"
1800 AC_MSG_ERROR("no such directory: $withval/include")
1805 if test "x$ac_system" = "xLinux"
1807 with_libnetlink="yes"
1809 with_libnetlink="no (Linux only library)"
1812 if test "x$with_libnetlink" = "xyes"
1815 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1817 with_libnetlink="no (libnetlink.h not found)"
1819 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1821 with_libnetlink="yes"
1825 #include <sys/types.h>
1826 #include <asm/types.h>
1827 #include <sys/socket.h>
1828 #include <linux/netlink.h>
1829 #include <linux/rtnetlink.h>])
1830 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1832 #include <sys/types.h>
1833 #include <asm/types.h>
1834 #include <sys/socket.h>])
1838 #include <sys/types.h>
1839 #include <asm/types.h>
1840 #include <sys/socket.h>
1841 #include <linux/netlink.h>
1842 #include <linux/rtnetlink.h>
1846 int retval = TCA_STATS2;
1849 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1854 #include <sys/types.h>
1855 #include <asm/types.h>
1856 #include <sys/socket.h>
1857 #include <linux/netlink.h>
1858 #include <linux/rtnetlink.h>
1862 int retval = TCA_STATS;
1865 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1868 CFLAGS="$SAVE_CFLAGS"
1870 if test "x$with_libnetlink" = "xyes"
1872 AC_CHECK_LIB(netlink, rtnl_open,
1873 [with_libnetlink="yes"],
1874 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1875 [$with_libnetlink_libs])
1877 if test "x$with_libnetlink" = "xyes"
1879 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1880 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1881 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1882 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1884 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1886 dnl Check for libvirt and libxml2 libraries.
1887 with_libxml2="no (pkg-config isn't available)"
1888 with_libxml2_cflags=""
1889 with_libxml2_ldflags=""
1890 with_libvirt="no (pkg-config isn't available)"
1891 with_libvirt_cflags=""
1892 with_libvirt_ldflags=""
1894 if test "x$PKG_CONFIG" != "x"
1896 pkg-config --exists 'libxml-2.0' 2>/dev/null
1901 with_libxml2="no (pkg-config doesn't know library)"
1904 pkg-config --exists libvirt 2>/dev/null
1909 with_libvirt="no (pkg-config doesn't know library)"
1912 if test "x$with_libxml2" = "xyes"
1914 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
1919 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
1925 if test "x$with_libxml2" = "xyes"
1927 SAVE_CPPFLAGS="$CPPFLAGS"
1928 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
1930 AC_CHECK_HEADERS(libxml/parser.h, [],
1931 [with_libxml2="no (libxml/parser.h not found)"])
1933 CPPFLAGS="$SAVE_CPPFLAGS"
1935 if test "x$with_libxml2" = "xyes"
1937 SAVE_CFLAGS="$CFLAGS"
1938 SAVE_LDFLAGS="$LDFLAGS"
1940 CFLAGS="$CFLAGS $with_libxml2_cflags"
1941 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
1943 AC_CHECK_LIB(xml2, xmlXPathEval,
1944 [with_libxml2="yes"],
1945 [with_libxml2="no (symbol xmlXPathEval not found)"])
1947 CFLAGS="$SAVE_CFLAGS"
1948 LDFLAGS="$SAVE_LDFLAGS"
1950 dnl Add the right compiler flags and libraries.
1951 if test "x$with_libxml2" = "xyes"; then
1952 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
1953 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
1954 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
1955 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
1957 if test "x$with_libvirt" = "xyes"
1959 with_libvirt_cflags="`pkg-config --cflags libvirt`"
1964 with_libvirt_ldflags="`pkg-config --libs libvirt`"
1970 if test "x$with_libvirt" = "xyes"
1972 SAVE_CPPFLAGS="$CPPFLAGS"
1973 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
1975 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
1976 [with_libvirt="no (libvirt/libvirt.h not found)"])
1978 CPPFLAGS="$SAVE_CPPFLAGS"
1980 if test "x$with_libvirt" = "xyes"
1982 SAVE_CFLAGS="$CFLAGS"
1983 SAVE_LDFLAGS="$LDFLAGS"
1985 CFLAGS="$CFLAGS $with_libvirt_cflags"
1986 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
1988 AC_CHECK_LIB(virt, virDomainBlockStats,
1989 [with_libvirt="yes"],
1990 [with_libvirt="no (symbol virDomainBlockStats not found)"])
1992 CFLAGS="$SAVE_CFLAGS"
1993 LDFLAGS="$SAVE_LDFLAGS"
1995 dnl Add the right compiler flags and libraries.
1996 if test "x$with_libvirt" = "xyes"; then
1997 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
1998 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
1999 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
2000 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
2003 dnl End of check for libvirt and libxml2 libraries.
2005 # Check for enabled/disabled features
2008 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
2009 # ------------------------------------------------------------
2011 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
2016 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
2021 m4_define([EnDis],[disabled])dnl
2022 m4_define([YesNo],[no])dnl
2028 m4_define([EnDis],[enabled])dnl
2029 m4_define([YesNo],[yes])dnl
2032 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
2036 m4_if([$3], [feature], [],
2040 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
2046 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
2048 enable_$1='[YesNo]'dnl
2050 if test "x$enable_$1" = "xno"
2054 if test "x$enable_$1" = "xyes"
2058 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
2063 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
2064 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
2066 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
2068 # AC_PLUGIN(name, default, info)
2069 # ------------------------------------------------------------
2075 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
2077 if test "x$enableval" = "xyes"
2085 if test "x$2" = "xyes"
2092 if test "x$enable_plugin" = "xyes"
2094 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
2096 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
2097 enable_$1="$enable_plugin"
2099 )# AC_PLUGIN(name, default, info)
2101 m4_divert_once([HELP_ENABLE], [
2102 collectd features:])
2103 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
2104 AC_COLLECTD([debug], [enable], [feature], [debugging])
2105 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
2106 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
2114 plugin_interface="no"
2120 plugin_multimeter="no"
2123 plugin_processes="no"
2127 plugin_tcpconns="no"
2130 plugin_wireless="no"
2133 if test "x$ac_system" = "xLinux"
2135 plugin_battery="yes"
2137 plugin_cpufreq="yes"
2139 plugin_entropy="yes"
2140 plugin_interface="yes"
2145 plugin_processes="yes"
2148 plugin_tcpconns="yes"
2149 plugin_vserver="yes"
2150 plugin_wireless="yes"
2152 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
2159 if test "x$with_libiokit" = "xyes"
2161 plugin_battery="yes"
2166 if test "x$with_devinfo$with_kstat" = "xyesyes"
2170 plugin_interface="yes"
2177 if test "x$with_libstatgrab" = "xyes"
2179 plugin_interface="yes"
2185 if test "x$have_processor_info" = "xyes"
2189 if test "x$have_sysctlbyname" = "xyes"
2193 plugin_tcpconns="yes"
2196 if test "x$have_statfs" = "xyes"
2200 if test "x$have_statvfs" = "xyes"
2205 if test "x$have_getifaddrs" = "xyes"
2207 plugin_interface="yes"
2210 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
2212 plugin_libvirt="yes"
2215 if test "x$have_getloadavg" = "xyes"
2220 if test "x$have_libperl$have_perl_ithreads" = "xyesyes"
2225 # Mac OS X memory interface
2226 if test "x$have_host_statistics" = "xyes"
2231 if test "x$have_termios_h" = "xyes"
2233 plugin_multimeter="yes"
2236 if test "x$have_thread_info" = "xyes"
2238 plugin_processes="yes"
2241 if test "x$with_libkvm" = "xyes"
2246 if test "x$have_getutent" = "xyes"
2250 if test "x$have_getutxent" = "xyes"
2255 # FIXME: sysctl for swap plugin
2257 m4_divert_once([HELP_ENABLE], [
2260 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
2261 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
2262 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
2263 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
2264 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
2265 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
2266 AC_PLUGIN([csv], [yes], [CSV output plugin])
2267 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
2268 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
2269 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
2270 AC_PLUGIN([email], [yes], [EMail statistics])
2271 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
2272 AC_PLUGIN([exec], [yes], [Execution of external programs])
2273 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
2274 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
2275 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
2276 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
2277 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
2278 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
2279 AC_PLUGIN([load], [$plugin_load], [System load])
2280 AC_PLUGIN([logfile], [yes], [File logging plugin])
2281 AC_PLUGIN([mbmon], [yes], [Query mbmond])
2282 AC_PLUGIN([memcached], [yes], [memcached statistics])
2283 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
2284 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
2285 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
2286 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
2287 AC_PLUGIN([network], [yes], [Network communication plugin])
2288 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
2289 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
2290 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
2291 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
2292 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
2293 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
2294 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
2295 AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
2296 AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
2297 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
2298 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
2299 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
2300 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
2301 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
2302 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
2303 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
2304 AC_PLUGIN([users], [$plugin_users], [User statistics])
2305 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
2306 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
2307 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
2308 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
2311 if test "x$ac_system" = "xLinux" -a "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
2313 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
2317 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
2319 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2321 PERL_BINDINGS_OPTIONS="$withval"
2322 with_perl_bindings="yes"
2324 PERL_BINDINGS_OPTIONS=""
2325 with_perl_bindings="$withval"
2329 PERL_BINDINGS_OPTIONS=""
2330 with_perl_bindings="yes"
2332 if test "x$with_perl_bindings" = "xyes"
2334 PERL_BINDINGS="perl"
2338 AC_SUBST(PERL_BINDINGS)
2339 AC_SUBST(PERL_BINDINGS_OPTIONS)
2341 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
2343 if test "x$with_rrdtool" = "xyes" -a "x$librrd_threadsafe" != "xyes"
2345 with_rrdtool="yes (warning: librrd is not thread-safe)"
2348 if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
2350 with_liboping="yes (shipped version)"
2353 if test "x$with_libperl" = "xyes"
2355 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
2357 enable_perl="no (needs libperl)"
2360 if test "x$with_perl_bindings" = "xyes" -a "x$PERL_BINDINGS_OPTIONS" != "x"
2362 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
2369 libcurl . . . . . . $with_libcurl
2370 libiokit . . . . . $with_libiokit
2371 libiptc . . . . . . $with_libiptc
2372 libkstat . . . . . $with_kstat
2373 libkvm . . . . . . $with_libkvm
2374 libmysql . . . . . $with_libmysql
2375 libnetlink . . . . $with_libnetlink
2376 libnetsnmp . . . . $with_libnetsnmp
2377 liboconfig . . . . $with_liboconfig
2378 liboping . . . . . $with_liboping
2379 libpcap . . . . . . $with_libpcap
2380 libperl . . . . . . $with_libperl
2381 libpthread . . . . $with_libpthread
2382 librrd . . . . . . $with_rrdtool
2383 libsensors . . . . $with_lm_sensors
2384 libstatgrab . . . . $with_libstatgrab
2385 libupsclient . . . $with_libupsclient
2386 libvirt . . . . . . $with_libvirt
2387 libxml2 . . . . . . $with_libxml2
2388 libxmms . . . . . . $with_libxmms
2391 daemon mode . . . . $enable_daemon
2392 debug . . . . . . . $enable_debug
2395 perl . . . . . . . $with_perl_bindings
2398 apache . . . . . . $enable_apache
2399 apcups . . . . . . $enable_apcups
2400 apple_sensors . . . $enable_apple_sensors
2401 battery . . . . . . $enable_battery
2402 cpu . . . . . . . . $enable_cpu
2403 cpufreq . . . . . . $enable_cpufreq
2404 csv . . . . . . . . $enable_csv
2405 df . . . . . . . . $enable_df
2406 disk . . . . . . . $enable_disk
2407 dns . . . . . . . . $enable_dns
2408 email . . . . . . . $enable_email
2409 entropy . . . . . . $enable_entropy
2410 exec . . . . . . . $enable_exec
2411 hddtemp . . . . . . $enable_hddtemp
2412 interface . . . . . $enable_interface
2413 iptables . . . . . $enable_iptables
2414 ipvs . . . . . . . $enable_ipvs
2415 irq . . . . . . . . $enable_irq
2416 libvirt . . . . . . $enable_libvirt
2417 load . . . . . . . $enable_load
2418 logfile . . . . . . $enable_logfile
2419 mbmon . . . . . . . $enable_mbmon
2420 memcached . . . . . $enable_memcached
2421 memory . . . . . . $enable_memory
2422 multimeter . . . . $enable_multimeter
2423 mysql . . . . . . . $enable_mysql
2424 netlink . . . . . . $enable_netlink
2425 network . . . . . . $enable_network
2426 nfs . . . . . . . . $enable_nfs
2427 nginx . . . . . . . $enable_nginx
2428 ntpd . . . . . . . $enable_ntpd
2429 nut . . . . . . . . $enable_nut
2430 perl . . . . . . . $enable_perl
2431 ping . . . . . . . $enable_ping
2432 processes . . . . . $enable_processes
2433 rrdtool . . . . . . $enable_rrdtool
2434 sensors . . . . . . $enable_sensors
2435 serial . . . . . . $enable_serial
2436 snmp . . . . . . . $enable_snmp
2437 swap . . . . . . . $enable_swap
2438 syslog . . . . . . $enable_syslog
2439 tape . . . . . . . $enable_tape
2440 tcpconns . . . . . $enable_tcpconns
2441 unixsock . . . . . $enable_unixsock
2442 users . . . . . . . $enable_users
2443 uuid . . . . . . . $enable_uuid
2444 vserver . . . . . . $enable_vserver
2445 wireless . . . . . $enable_wireless
2446 xmms . . . . . . . $enable_xmms