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])
54 AC_MSG_RESULT([$ac_system])
56 if test "x$ac_system" = "xLinux"
58 AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
59 if test -z "$KERNEL_DIR"
61 KERNEL_DIR="/lib/modules/`uname -r`/source"
64 KERNEL_CFLAGS="-I$KERNEL_DIR/include"
65 AC_SUBST(KERNEL_CFLAGS)
68 if test "x$ac_system" = "xSolaris"
70 CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
74 # Checks for header files.
81 AC_CHECK_HEADERS(stdio.h stdint.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h)
84 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
89 # include <sys/types.h>
92 AC_CHECK_HEADERS(netinet/in.h, [], [],
97 # include <sys/types.h>
99 #if HAVE_NETINET_IN_SYSTM_H
100 # include <netinet/in_systm.h>
103 AC_CHECK_HEADERS(netinet/ip.h, [], [],
108 # include <sys/types.h>
110 #if HAVE_NETINET_IN_SYSTM_H
111 # include <netinet/in_systm.h>
113 #if HAVE_NETINET_IN_H
114 # include <netinet/in.h>
117 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
122 # include <sys/types.h>
124 #if HAVE_NETINET_IN_SYSTM_H
125 # include <netinet/in_systm.h>
127 #if HAVE_NETINET_IN_H
128 # include <netinet/in.h>
130 #if HAVE_NETINET_IP_H
131 # include <netinet/ip.h>
134 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
139 # include <sys/types.h>
141 #if HAVE_NETINET_IN_SYSTM_H
142 # include <netinet/in_systm.h>
144 #if HAVE_NETINET_IN_H
145 # include <netinet/in.h>
147 #if HAVE_NETINET_IP_H
148 # include <netinet/ip.h>
151 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
156 # include <sys/types.h>
158 #if HAVE_NETINET_IN_SYSTM_H
159 # include <netinet/in_systm.h>
161 #if HAVE_NETINET_IN_H
162 # include <netinet/in.h>
165 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
170 # include <sys/types.h>
172 #if HAVE_NETINET_IN_SYSTM_H
173 # include <netinet/in_systm.h>
175 #if HAVE_NETINET_IN_H
176 # include <netinet/in.h>
178 #if HAVE_NETINET_IP6_H
179 # include <netinet/ip6.h>
182 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
187 # include <sys/types.h>
189 #if HAVE_NETINET_IN_SYSTM_H
190 # include <netinet/in_systm.h>
192 #if HAVE_NETINET_IN_H
193 # include <netinet/in.h>
195 #if HAVE_NETINET_IP_H
196 # include <netinet/ip.h>
199 AC_CHECK_HEADERS(netinet/udp.h, [], [],
204 # include <sys/types.h>
206 #if HAVE_NETINET_IN_SYSTM_H
207 # include <netinet/in_systm.h>
209 #if HAVE_NETINET_IN_H
210 # include <netinet/in.h>
212 #if HAVE_NETINET_IP_H
213 # include <netinet/ip.h>
218 AC_CHECK_HEADERS(sys/dkstat.h)
219 if test "x$ac_system" = "xDarwin"
221 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)
222 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
224 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
227 # include <sys/types.h>
230 # include <sys/param.h>
235 AC_CHECK_HEADERS(linux/major.h libgen.h)
237 # For the battery plugin
238 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
240 #if HAVE_IOKIT_IOKITLIB_H
241 # include <IOKit/IOKitLib.h>
243 #if HAVE_IOKIT_IOTYPES_H
244 # include <IOKit/IOTypes.h>
248 # For the swap module
249 have_sys_swap_h="yes"
250 AC_CHECK_HEADERS(sys/swap.h, [], [have_sys_swap_h="no"],
253 # include <sys/types.h>
256 # include <sys/param.h>
260 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
262 AC_MSG_NOTICE([Solaris detected and sys/swap.h not found: Try building a 64bit binary.])
266 # For the processes plugin
268 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
270 # For interface plugin
271 AC_CHECK_HEADERS(ifaddrs.h)
272 AC_CHECK_HEADERS(net/if.h, [], [],
275 # include <sys/types.h>
277 #if HAVE_SYS_SOCKET_H
278 # include <sys/socket.h>
281 AC_CHECK_HEADERS(linux/if.h, [], [],
284 # include <sys/types.h>
286 #if HAVE_SYS_SOCKET_H
287 # include <sys/socket.h>
290 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
293 # include <sys/types.h>
295 #if HAVE_SYS_SOCKET_H
296 # include <sys/socket.h>
299 # include <linux/if.h>
304 have_net_ip_vs_h="no"
306 if test "x$ac_system" = "xLinux"
309 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
311 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
312 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
318 AC_CHECK_HEADERS(sys/ucred.h, [], [],
321 # include <sys/types.h>
324 # include <sys/param.h>
328 # For mount interface
329 AC_CHECK_HEADERS(sys/mount.h, [], [],
332 # include <sys/types.h>
335 # include <sys/param.h>
339 # For the email plugin
340 AC_CHECK_HEADERS(linux/un.h, [], [],
342 #if HAVE_SYS_SOCKET_H
343 # include <sys/socket.h>
347 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)
350 AC_CHECK_HEADERS(arpa/nameser.h)
351 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
353 #if HAVE_ARPA_NAMESER_H
354 # include <arpa/nameser.h>
358 AC_CHECK_HEADERS(net/if_arp.h, [], [],
359 [#if HAVE_SYS_SOCKET_H
360 # include <sys/socket.h>
363 AC_CHECK_HEADERS(net/ppp_defs.h)
364 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
365 [#if HAVE_NET_PPP_DEFS_H
366 # include <net/ppp_defs.h>
369 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
374 # include <sys/types.h>
376 #if HAVE_SYS_SOCKET_H
377 # include <sys/socket.h>
382 #if HAVE_NETINET_IN_H
383 # include <netinet/in.h>
387 # For the multimeter plugin
389 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
392 # Checks for typedefs, structures, and compiler characteristics.
401 # Checks for library functions.
403 AC_PROG_GCC_TRADITIONAL
404 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog)
408 AC_CACHE_CHECK([for strtok_r],
409 [c_cv_have_strtok_r_default],
418 char buffer[] = "foo,bar,baz";
425 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
428 printf ("token = %s;\n", token);
431 [c_cv_have_strtok_r_default="yes"],
432 [c_cv_have_strtok_r_default="no"]
436 if test "x$c_cv_have_strtok_r_default" = "xno"
438 SAVE_CFLAGS="$CFLAGS"
439 CFLAGS="$CFLAGS -D_REENTRANT=1"
441 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
442 [c_cv_have_strtok_r_reentrant],
451 char buffer[] = "foo,bar,baz";
458 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
461 printf ("token = %s;\n", token);
464 [c_cv_have_strtok_r_reentrant="yes"],
465 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
470 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
472 socket_needs_socket="no"
473 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
474 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
476 nanosleep_needs_rt="no"
477 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
478 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
480 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
481 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
482 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
483 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
484 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
485 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
486 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
487 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
488 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
489 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
492 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
495 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
497 if test "x$withval" = "xno"; then
499 else if test "x$withval" = "xyes"; then
506 if test "x$nan_type" = "xnone"; then
507 AC_CACHE_CHECK([whether NAN is defined by default],
508 [c_cv_have_nan_default],
514 static float foo = NAN;
522 [c_cv_have_nan_default="yes"],
523 [c_cv_have_nan_default="no"]
526 if test "x$c_cv_have_nan_default" = "xyes"
531 if test "x$nan_type" = "xnone"; then
532 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
533 [c_cv_have_nan_isoc],
538 #define __USE_ISOC99 1
540 static float foo = NAN;
548 [c_cv_have_nan_isoc="yes"],
549 [c_cv_have_nan_isoc="no"]
552 if test "x$c_cv_have_nan_isoc" = "xyes"
557 if test "x$nan_type" = "xnone"; then
558 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
559 [c_cv_have_nan_zero],
568 #define NAN (0.0 / 0.0)
570 # define isnan(f) ((f) != (f))
572 static float foo = NAN;
580 [c_cv_have_nan_zero="yes"],
581 [c_cv_have_nan_zero="no"]
584 if test "x$c_cv_have_nan_zero" = "xyes"
590 if test "x$nan_type" = "xdefault"; then
591 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
592 [Define if NAN is defined by default and can initialize static variables.])
593 else if test "x$nan_type" = "xisoc99"; then
594 AC_DEFINE(NAN_STATIC_ISOC, 1,
595 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
596 else if test "x$nan_type" = "xzero"; then
597 AC_DEFINE(NAN_ZERO_ZERO, 1,
598 [Define if NAN can be defined as (0.0 / 0.0)])
600 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
603 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
605 if test "x$withval" = "xnothing"; then
606 fp_layout_type="nothing"
607 else if test "x$withval" = "xendianflip"; then
608 fp_layout_type="endianflip"
609 else if test "x$withval" = "xintswap"; then
610 fp_layout_type="intswap"
612 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
615 [fp_layout_type="unknown"])
617 if test "x$fp_layout_type" = "xunknown"; then
618 AC_CACHE_CHECK([if doubles are stored in x86 representation],
619 [c_cv_fp_layout_need_nothing],
635 memcpy ((void *) &i0, (void *) &d, 8);
638 memcpy ((void *) c, (void *) &i1, 8);
640 if ((c[0] == 0x2f) && (c[1] == 0x25)
641 && (c[2] == 0xc0) && (c[3] == 0xc7)
642 && (c[4] == 0x43) && (c[5] == 0x2b)
643 && (c[6] == 0x1f) && (c[7] == 0x5b))
648 [c_cv_fp_layout_need_nothing="yes"],
649 [c_cv_fp_layout_need_nothing="no"]
652 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
653 fp_layout_type="nothing"
656 if test "x$fp_layout_type" = "xunknown"; then
657 AC_CACHE_CHECK([if endianflip converts to x86 representation],
658 [c_cv_fp_layout_need_endianflip],
666 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
667 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
668 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
669 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
670 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
671 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
672 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
673 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
682 memcpy ((void *) &i0, (void *) &d, 8);
684 i1 = endianflip (i0);
685 memcpy ((void *) c, (void *) &i1, 8);
687 if ((c[0] == 0x2f) && (c[1] == 0x25)
688 && (c[2] == 0xc0) && (c[3] == 0xc7)
689 && (c[4] == 0x43) && (c[5] == 0x2b)
690 && (c[6] == 0x1f) && (c[7] == 0x5b))
695 [c_cv_fp_layout_need_endianflip="yes"],
696 [c_cv_fp_layout_need_endianflip="no"]
699 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
700 fp_layout_type="endianflip"
703 if test "x$fp_layout_type" = "xunknown"; then
704 AC_CACHE_CHECK([if intswap converts to x86 representation],
705 [c_cv_fp_layout_need_intswap],
713 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
714 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
723 memcpy ((void *) &i0, (void *) &d, 8);
726 memcpy ((void *) c, (void *) &i1, 8);
728 if ((c[0] == 0x2f) && (c[1] == 0x25)
729 && (c[2] == 0xc0) && (c[3] == 0xc7)
730 && (c[4] == 0x43) && (c[5] == 0x2b)
731 && (c[6] == 0x1f) && (c[7] == 0x5b))
736 [c_cv_fp_layout_need_intswap="yes"],
737 [c_cv_fp_layout_need_intswap="no"]
740 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
741 fp_layout_type="intswap"
745 if test "x$fp_layout_type" = "xnothing"; then
746 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
747 [Define if doubles are stored in x86 representation.])
748 else if test "x$fp_layout_type" = "xendianflip"; then
749 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
750 [Define if endianflip is needed to convert to x86 representation.])
751 else if test "x$fp_layout_type" = "xintswap"; then
752 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
753 [Define if intswap is needed to convert to x86 representation.])
755 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
759 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
761 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
763 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
766 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
767 if test "x$have_getmntent" = "xno"; then
768 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
770 if test "x$have_getmntent" = "xno"; then
771 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
773 if test "x$have_getmntent" = "xno"; then
774 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
777 if test "x$have_getmntent" = "xc"; then
778 AC_CACHE_CHECK([whether getmntent takes one argument],
779 [c_cv_have_one_getmntent],
781 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
782 #include "$srcdir/src/utils_mount.h"]],
786 fh = setmntent ("/etc/mtab", "r");
790 [c_cv_have_one_getmntent="yes"],
791 [c_cv_have_one_getmntent="no"]
794 AC_CACHE_CHECK([whether getmntent takes two arguments],
795 [c_cv_have_two_getmntent],
797 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
798 #include "$srcdir/src/utils_mount.h"]],
803 fh = fopen ("/etc/mnttab", "r");
804 status = getmntent (fh, &mt);
807 [c_cv_have_two_getmntent="yes"],
808 [c_cv_have_two_getmntent="no"]
813 # Check for different versions of `getmntent' here..
815 if test "x$have_getmntent" = "xc"; then
816 if test "x$c_cv_have_one_getmntent" = "xyes"; then
817 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
818 [Define if the function getmntent exists and takes one argument.])
820 if test "x$c_cv_have_two_getmntent" = "xyes"; then
821 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
822 [Define if the function getmntent exists and takes two arguments.])
825 if test "x$have_getmntent" = "xsun"; then
826 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
827 [Define if the function getmntent exists. It's the version from libsun.])
829 if test "x$have_getmntent" = "xseq"; then
830 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
831 [Define if the function getmntent exists. It's the version from libseq.])
833 if test "x$have_getmntent" = "xgen"; then
834 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
835 [Define if the function getmntent exists. It's the version from libgen.])
838 # Check for structures
839 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
840 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
843 #include <sys/types.h>
844 #include <sys/socket.h>
847 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
848 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
851 #include <sys/types.h>
852 #include <sys/socket.h>
853 #include <linux/if.h>
854 #include <linux/netdevice.h>
857 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
859 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
860 [Define if struct kinfo_proc exists in the FreeBSD variant.])
861 have_struct_kinfo_proc_freebsd="yes"
864 have_struct_kinfo_proc_freebsd="no"
868 #include <sys/param.h>
869 #include <sys/sysctl.h>
870 #include <sys/user.h>
873 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
875 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
876 [Define if struct kinfo_proc exists in the OpenBSD variant.])
877 have_struct_kinfo_proc_openbsd="yes"
880 have_struct_kinfo_proc_openbsd="no"
883 #include <sys/param.h>
884 #include <sys/sysctl.h>
888 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
893 # include <sys/types.h>
895 #if HAVE_NETINET_IN_SYSTM_H
896 # include <netinet/in_systm.h>
898 #if HAVE_NETINET_IN_H
899 # include <netinet/in.h>
901 #if HAVE_NETINET_IP_H
902 # include <netinet/ip.h>
904 #if HAVE_NETINET_UDP_H
905 # include <netinet/udp.h>
908 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
913 # include <sys/types.h>
915 #if HAVE_NETINET_IN_SYSTM_H
916 # include <netinet/in_systm.h>
918 #if HAVE_NETINET_IN_H
919 # include <netinet/in.h>
921 #if HAVE_NETINET_IP_H
922 # include <netinet/ip.h>
924 #if HAVE_NETINET_UDP_H
925 # include <netinet/udp.h>
929 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
939 # Checks for libraries begin here
942 AC_CHECK_LIB(resolv, res_search,
944 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
946 [with_libresolv="no"])
947 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
949 dnl Check for HAL (hardware abstraction library)
951 AC_CHECK_LIB(hal,libhal_device_property_exists,
952 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
954 if test "x$with_libhal" = "xyes"; then
955 if test "x$PKG_CONFIG" != "x"; then
956 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
957 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
958 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
959 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
963 m4_divert_once([HELP_WITH], [
964 collectd additional packages:])
966 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
969 librrd_threadsafe="yes"
970 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
971 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
973 librrd_cflags="-I$withval/include"
974 librrd_ldflags="-L$withval/lib"
977 with_rrdtool="$withval"
979 ], [with_rrdtool="yes"])
980 if test "x$with_rrdtool" = "xyes"
982 SAVE_CPPFLAGS="$CPPFLAGS"
983 SAVE_LDFLAGS="$LDFLAGS"
985 CPPFLAGS="$CPPFLAGS $librrd_cflags"
986 LDFLAGS="$LDFLAGS $librrd_ldflags"
988 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
990 CPPFLAGS="$SAVE_CPPFLAGS"
991 LDFLAGS="$SAVE_LDFLAGS"
993 if test "x$with_rrdtool" = "xyes"
995 SAVE_CPPFLAGS="$CPPFLAGS"
996 SAVE_LDFLAGS="$LDFLAGS"
998 CPPFLAGS="$CPPFLAGS $librrd_cflags"
999 LDFLAGS="$LDFLAGS $librrd_ldflags"
1001 AC_CHECK_LIB(rrd_th, rrd_update_r,
1003 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
1005 [librrd_threadsafe="no"
1006 AC_CHECK_LIB(rrd, rrd_update,
1008 librrd_ldflags="$librrd_ldflags -lrrd -lm"
1010 [with_rrdtool="no (symbol 'rrd_update' not found)"],
1015 CPPFLAGS="$SAVE_CPPFLAGS"
1016 LDFLAGS="$SAVE_LDFLAGS"
1018 if test "x$with_rrdtool" = "xyes"
1020 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
1021 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
1022 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
1023 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
1025 if test "x$librrd_threadsafe" = "xyes"
1027 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
1030 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
1031 [ if test "x$withval" != "xno" \
1032 && test "x$withval" != "xyes"
1034 LDFLAGS="$LDFLAGS -L$withval/lib"
1035 CPPFLAGS="$CPPFLAGS -I$withval/include"
1036 with_libpthread="yes"
1038 if test "x$withval" = "xno"
1040 with_libpthread="no (disabled)"
1043 ], [with_libpthread="yes"])
1044 if test "x$with_libpthread" = "xyes"
1046 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
1048 if test "x$with_libpthread" = "xyes"
1050 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
1052 if test "x$with_libpthread" = "xyes"
1058 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
1059 [Wether or not to use pthread (POSIX threads) library])
1060 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
1062 if test "x$ac_system" = "xSolaris"
1067 with_kstat="no (Solaris only)"
1068 with_devinfo="no (Solaris only)"
1071 if test "x$with_kstat" = "xyes"
1073 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1075 if test "x$with_kstat" = "xyes"
1077 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1078 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1080 if test "x$with_kstat" = "xyes"
1082 AC_DEFINE(HAVE_LIBKSTAT, 1,
1083 [Define to 1 if you have the 'kstat' library (-lkstat)])
1085 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1086 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1088 ### BEGIN of check for libcurl ###
1089 with_curl_config="curl-config"
1092 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1094 if test "x$withval" = "xno"
1097 else if test "x$withval" = "xyes"
1101 if test -f "$withval" && test -x "$withval"
1103 with_curl_config="$withval"
1105 else if test -x "$withval/bin/curl-config"
1107 with_curl_config="$withval/bin/curl-config"
1116 if test "x$with_libcurl" = "xyes"
1118 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1119 curl_config_status=$?
1121 if test $curl_config_status -ne 0
1123 with_libcurl="no ($with_curl_config failed)"
1125 SAVE_CPPFLAGS="$CPPFLAGS"
1126 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1128 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1130 CPPFLAGS="$SAVE_CPPFLAGS"
1133 if test "x$with_libcurl" = "xyes"
1135 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1136 curl_config_status=$?
1138 if test $curl_config_status -ne 0
1140 with_libcurl="no ($with_curl_config failed)"
1142 AC_CHECK_LIB(curl, curl_easy_init,
1143 [with_libcurl="yes"],
1144 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1148 if test "x$with_libcurl" = "xyes"
1150 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1151 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1152 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1153 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1155 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1156 ### END of check for libcurl ###
1159 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1166 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1168 with_libstatgrab_cflags=""
1169 with_libstatgrab_ldflags=""
1170 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
1172 if test "x$withval" != "xno" \
1173 && test "x$withval" != "xyes"
1175 with_libstatgrab_cflags="-I$withval/include"
1176 with_libstatgrab_ldflags="-L$withval/lib"
1177 with_libstatgrab="yes"
1179 with_libstatgrab="$withval"
1183 if test "x$ac_system" = "xunknown"
1185 with_libstatgrab="yes"
1187 with_libstatgrab="no"
1190 with_libstatgrab_pkg_config="yes"
1191 if test "x$with_libstatgrab" = "xyes" \
1192 && test "x$PKG_CONFIG" != "x"
1194 AC_MSG_CHECKING([pkg-config for libstatgrab])
1196 $PKG_CONFIG --exists libstatgrab 2>/dev/null
1199 with_libstatgrab_pkg_config="no"
1200 temp_result="not found"
1202 AC_MSG_RESULT([$temp_result])
1204 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
1205 with_libstatgrab_pkg_config="no"
1206 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
1209 if test "x$with_libstatgrab" = "xyes" \
1210 && test "x$with_libstatgrab_pkg_config" = "xyes" \
1211 && test "x$with_libstatgrab_cflags" = "x"
1213 AC_MSG_CHECKING([for libstatgrab CFLAGS])
1214 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
1217 with_libstatgrab_cflags="$temp_result"
1219 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
1220 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
1222 AC_MSG_RESULT([$temp_result])
1225 if test "x$with_libstatgrab" = "xyes" \
1226 && test "x$with_libstatgrab_pkg_config" = "xyes" \
1227 && test "x$with_libstatgrab_ldflags" = "x"
1229 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
1230 temp_result="`$PKG_CONFIG --libs libstatgrab`"
1233 with_libstatgrab_ldflags="$temp_result"
1235 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
1236 temp_result="$PKG_CONFIG --libs libstatgrab failed"
1238 AC_MSG_RESULT([$temp_result])
1241 if test "x$with_libstatgrab" = "xyes"
1243 SAVE_CPPFLAGS="$CPPFLAGS"
1244 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
1246 AC_CHECK_HEADERS(statgrab.h,
1247 [with_libstatgrab="yes"],
1248 [with_libstatgrab="no (statgrab.h not found)"])
1250 CPPFLAGS="$SAVE_CPPFLAGS"
1253 if test "x$with_libstatgrab" = "xyes"
1255 SAVE_CFLAGS="$CFLAGS"
1256 SAVE_LDFLAGS="$LDFLAGS"
1258 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
1259 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
1261 AC_CHECK_LIB(statgrab, sg_init,
1262 [with_libstatgrab="yes"],
1263 [with_libstatgrab="no (symbol sg_init not found)"])
1265 CFLAGS="$SAVE_CFLAGS"
1266 LDFLAGS="$SAVE_LDFLAGS"
1269 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
1270 if test "x$with_libstatgrab" = "xyes"
1272 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
1273 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
1274 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
1275 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1276 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1280 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1281 if test "x$with_kvm_getprocs" = "xyes"
1283 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1284 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1287 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1289 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1290 if test "x$with_kvm_getswapinfo" = "xyes"
1292 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1293 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1296 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1298 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1299 if test "x$with_kvm_nlist" = "xyes"
1301 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1302 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1305 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1307 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1308 if test "x$with_kvm_openfiles" = "xyes"
1310 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1311 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1314 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1316 with_sensors_cflags=""
1317 with_sensors_ldflags=""
1318 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
1320 if test "x$withval" = "xno"
1322 with_lm_sensors="no"
1324 with_lm_sensors="yes"
1325 if test "x$withval" != "xyes"
1327 with_sensors_cflags="-I$withval/include"
1328 with_sensors_ldflags="-L$withval/lib"
1329 with_lm_sensors="yes"
1334 if test "x$ac_system" = "xLinux"
1336 with_lm_sensors="yes"
1338 with_lm_sensors="no (Linux only library)"
1341 if test "x$with_lm_sensors" = "xyes"
1343 SAVE_CPPFLAGS="$CPPFLAGS"
1344 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1346 # AC_CHECK_HEADERS(sensors/sensors.h,
1348 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
1350 # [with_lm_sensors="no (sensors/sensors.h not found)"])
1351 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_lm_sensors="no (sensors/sensors.h not found)"])
1353 CPPFLAGS="$SAVE_CPPFLAGS"
1355 if test "x$with_lm_sensors" = "xyes"
1357 SAVE_CPPFLAGS="$CPPFLAGS"
1358 SAVE_LDFLAGS="$LDFLAGS"
1359 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1360 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
1362 AC_CHECK_LIB(sensors, sensors_init,
1364 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
1366 [with_lm_sensors="no (libsensors not found)"])
1368 CPPFLAGS="$SAVE_CPPFLAGS"
1369 LDFLAGS="$SAVE_LDFLAGS"
1371 if test "x$with_lm_sensors" = "xyes"
1373 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
1374 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
1375 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
1376 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
1378 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
1380 with_mysql_config="mysql_config"
1381 with_mysql_cflags=""
1383 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1385 if test "x$withval" = "xno"
1388 else if test "x$withval" = "xyes"
1392 if test -f "$withval" && test -x "$withval";
1394 with_mysql_config="$withval"
1395 else if test -x "$withval/bin/mysql_config"
1397 with_mysql_config="$withval/bin/mysql_config"
1405 if test "x$with_libmysql" = "xyes"
1407 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1408 mysql_config_status=$?
1410 if test $mysql_config_status -ne 0
1412 with_libmysql="no ($with_mysql_config failed)"
1414 SAVE_CPPFLAGS="$CPPFLAGS"
1415 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1418 have_mysql_mysql_h="no"
1419 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
1421 if test "x$have_mysql_h" = "xno"
1423 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
1426 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
1428 with_libmysql="no (mysql.h not found)"
1431 CPPFLAGS="$SAVE_CPPFLAGS"
1434 if test "x$with_libmysql" = "xyes"
1436 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1437 mysql_config_status=$?
1439 if test $mysql_config_status -ne 0
1441 with_libmysql="no ($with_mysql_config failed)"
1443 AC_CHECK_LIB(mysqlclient, mysql_init,
1444 [with_libmysql="yes"],
1445 [with_libmysql="no (symbol 'mysql_init' not found)"],
1449 if test "x$with_libmysql" = "xyes"
1451 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1452 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1453 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1454 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1456 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1458 with_own_liboconfig="no"
1459 liboconfig_LDFLAGS="$LDFLAGS"
1460 liboconfig_CPPFLAGS="$CPPFLAGS"
1461 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1463 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1465 if test -d "$withval/lib"
1467 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1469 if test -d "$withval/include"
1471 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1474 if test "x$withval" = "xno"
1476 AC_MSG_ERROR("liboconfig is required")
1480 with_liboconfig="yes"
1483 save_LDFLAGS="$LDFLAGS"
1484 save_CPPFLAGS="$CPPFLAGS"
1485 LDFLAGS="$liboconfig_LDFLAGS"
1486 CPPFLAGS="$liboconfig_CPPFLAGS"
1487 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1489 with_liboconfig="yes"
1490 with_own_liboconfig="no"
1493 with_liboconfig="yes"
1494 with_own_liboconfig="yes"
1495 LDFLAGS="$save_LDFLAGS"
1496 CPPFLAGS="$save_CPPFLAGS"
1499 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1500 if test "x$with_own_liboconfig" = "xyes"
1502 with_liboconfig="yes (shipped version)"
1505 #with_liboping="yes"
1506 with_own_liboping="no"
1507 liboping_LDFLAGS="$LDFLAGS"
1508 liboping_CPPFLAGS="$CPPFLAGS"
1509 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1511 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1513 if test -d "$withval/lib"
1515 liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
1517 if test -d "$withval/include"
1519 liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
1522 if test "x$withval" = "xno"
1525 with_own_liboping="no"
1526 else if test "x$withval" = "xyes"
1535 if test "x$with_liboping" = "xyes"
1537 save_LDFLAGS="$LDFLAGS"
1538 save_CPPFLAGS="$CPPFLAGS"
1539 LDFLAGS="$liboping_LDFLAGS"
1540 CPPFLAGS="$liboping_CPPFLAGS"
1541 AC_CHECK_LIB(oping, ping_construct,
1544 with_own_liboping="no"
1548 with_own_liboping="yes"
1549 LDFLAGS="$save_LDFLAGS"
1550 CPPFLAGS="$save_CPPFLAGS"
1553 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1554 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
1556 with_libowcapi_cppflags=""
1557 with_libowcapi_libs="-lowcapi"
1558 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
1560 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1562 with_libowcapi_cppflags="-I$withval/include"
1563 with_libowcapi_libs="-L$withval/lib -lowcapi"
1564 with_libowcapi="yes"
1566 with_libowcapi="$withval"
1570 with_libowcapi="yes"
1572 if test "x$with_libowcapi" = "xyes"
1574 SAVE_CPPFLAGS="$CPPFLAGS"
1575 CPPFLAGS="$with_libowcapi_cppflags"
1577 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
1579 CPPFLAGS="$SAVE_CPPFLAGS"
1581 if test "x$with_libowcapi" = "xyes"
1583 SAVE_LDFLAGS="$LDFLAGS"
1584 SAVE_CPPFLAGS="$CPPFLAGS"
1585 LDFLAGS="$with_libowcapi_libs"
1586 CPPFLAGS="$with_libowcapi_cppflags"
1588 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
1590 LDFLAGS="$SAVE_LDFLAGS"
1591 CPPFLAGS="$SAVE_CPPFLAGS"
1593 if test "x$with_libowcapi" = "xyes"
1595 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
1596 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
1597 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
1598 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
1602 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
1604 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1606 LDFLAGS="$LDFLAGS -L$withval/lib"
1607 CPPFLAGS="$CPPFLAGS -I$withval/include"
1610 with_libpcap="$withval"
1616 if test "x$with_libpcap" = "xyes"
1618 AC_CHECK_LIB(pcap, pcap_open_live,
1620 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
1621 ], [with_libpcap="no (libpcap not found)"])
1623 if test "x$with_libpcap" = "xyes"
1625 AC_CHECK_HEADERS(pcap.h,
1627 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
1628 ], [with_libpcap="no (pcap.h not found)"])
1630 if test "x$with_libpcap" = "xyes"
1636 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
1637 [Wether or not to use the pcap library])
1638 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
1640 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1642 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1644 LDFLAGS="$LDFLAGS -L$withval/lib"
1645 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1648 with_libesmtp="$withval"
1654 if test "x$with_libesmtp" = "xyes"
1656 AC_CHECK_LIB(esmtp, smtp_create_session,
1658 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1659 ], [with_libesmtp="no (libesmtp not found)"])
1661 if test "x$with_libesmtp" = "xyes"
1663 AC_CHECK_HEADERS(libesmtp.h,
1665 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1666 ], [with_libesmtp="no (libesmtp.h not found)"])
1668 if test "x$with_libesmtp" = "xyes"
1674 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1675 [Wether or not to use the esmtp library])
1676 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1678 perl_interpreter="perl"
1679 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
1681 if test -x "$withval"
1683 perl_interpreter="$withval"
1685 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1687 LDFLAGS="$LDFLAGS -L$withval/lib"
1688 CPPFLAGS="$CPPFLAGS -I$withval/include"
1689 perl_interpreter="$withval/bin/perl"
1692 with_libperl="$withval"
1699 AC_MSG_CHECKING([for perl])
1700 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
1701 if test -x "$perl_interpreter"
1703 AC_MSG_RESULT([yes ($perl_interpreter)])
1709 AC_SUBST(PERL, "$perl_interpreter")
1711 if test "x$with_libperl" = "xyes" \
1712 && test -n "$perl_interpreter"
1715 SAVE_LDFLAGS=$LDFLAGS
1716 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
1717 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
1718 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
1719 CFLAGS="$CFLAGS $PERL_CFLAGS"
1720 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1722 AC_CACHE_CHECK([for libperl],
1723 [c_cv_have_libperl],
1727 #define PERL_NO_GET_CONTEXT
1734 load_module (PERL_LOADMOD_NOIMPORT,
1735 newSVpv ("Collectd::Plugin::FooBar", 24),
1738 [c_cv_have_libperl="yes"],
1739 [c_cv_have_libperl="no"]
1743 if test "x$c_cv_have_libperl" = "xyes"
1745 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
1746 AC_SUBST(PERL_CFLAGS)
1747 AC_SUBST(PERL_LDFLAGS)
1753 LDFLAGS=$SAVE_LDFLAGS
1754 else if test -z "$perl_interpreter"; then
1755 with_libperl="no (no perl interpreter found)"
1756 c_cv_have_libperl="no"
1758 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1760 if test "x$with_libperl" = "xyes"
1763 SAVE_LDFLAGS=$LDFLAGS
1764 CFLAGS="$CFLAGS $PERL_CFLAGS"
1765 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1767 AC_CACHE_CHECK([if perl supports ithreads],
1768 [c_cv_have_perl_ithreads],
1776 #if !defined(USE_ITHREADS)
1777 # error "Perl does not support ithreads!"
1778 #endif /* !defined(USE_ITHREADS) */
1781 [c_cv_have_perl_ithreads="yes"],
1782 [c_cv_have_perl_ithreads="no"]
1786 if test "x$c_cv_have_perl_ithreads" = "xyes"
1788 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
1792 LDFLAGS=$SAVE_LDFLAGS
1795 with_own_libiptc="no"
1796 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1798 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1800 LDFLAGS="$LDFLAGS -L$withval/lib"
1801 CPPFLAGS="$CPPFLAGS -I$withval/include"
1804 with_libiptc="$withval"
1808 if test "x$ac_system" = "xLinux"
1812 with_libiptc="no (Linux only)"
1815 if test "x$with_libiptc" = "xyes"
1817 AC_CHECK_LIB(iptc, iptc_init,
1819 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1823 with_own_libiptc="yes"
1826 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" != "xyes"
1828 AC_CHECK_HEADERS(libiptc/libiptc.h,
1830 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1834 with_own_libiptc="yes"
1837 if test "x$with_libiptc" = "xyes"
1840 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
1842 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
1844 with_libiptc="no (Linux iptables headers not found - check KERNEL_DIR)"
1845 with_own_libiptc="no"
1848 #include "$srcdir/src/libiptc/ipt_kernel_headers.h"
1853 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1854 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1855 if test "x$with_own_libiptc" = "xyes"
1857 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1860 with_snmp_config="net-snmp-config"
1863 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1865 if test "x$withval" = "xno"
1867 with_libnetsnmp="no"
1868 else if test "x$withval" = "xyes"
1870 with_libnetsnmp="yes"
1872 if test -x "$withval"
1874 with_snmp_config="$withval"
1875 with_libnetsnmp="yes"
1877 with_snmp_config="$withval/bin/net-snmp-config"
1878 with_libnetsnmp="yes"
1882 [with_libnetsnmp="yes"])
1883 if test "x$with_libnetsnmp" = "xyes"
1885 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
1886 snmp_config_status=$?
1888 if test $snmp_config_status -ne 0
1890 with_libnetsnmp="no ($with_snmp_config failed)"
1892 SAVE_CPPFLAGS="$CPPFLAGS"
1893 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
1895 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1897 CPPFLAGS="$SAVE_CPPFLAGS"
1900 if test "x$with_libnetsnmp" = "xyes"
1902 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
1903 snmp_config_status=$?
1905 if test $snmp_config_status -ne 0
1907 with_libnetsnmp="no ($with_snmp_config failed)"
1909 AC_CHECK_LIB(netsnmp, init_snmp,
1910 [with_libnetsnmp="yes"],
1911 [with_libnetsnmp="no (libnetsnmp not found)"],
1915 if test "x$with_libnetsnmp" = "xyes"
1917 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
1918 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
1919 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
1920 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
1922 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1924 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
1925 [with_libnotify="yes"],
1926 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
1928 with_libupsclient_config=""
1929 with_libupsclient_cflags=""
1930 with_libupsclient_libs=""
1931 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1933 if test "x$withval" = "xno"
1935 with_libupsclient="no"
1936 else if test "x$withval" = "xyes"
1938 with_libupsclient="use_pkgconfig"
1940 if test -x "$withval"
1942 with_libupsclient_config="$withval"
1943 with_libupsclient="use_libupsclient_config"
1944 else if test -x "$withval/bin/libupsclient-config"
1946 with_libupsclient_config="$withval/bin/net-snmp-config"
1947 with_libupsclient="use_libupsclient_config"
1949 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
1950 with_libupsclient_cflags="-I$withval/include"
1951 with_libupsclient_libs="-L$withval/lib -lupsclient"
1952 with_libupsclient="yes"
1956 [with_libupsclient="use_pkgconfig"])
1958 # configure using libupsclient-config
1959 if test "x$with_libupsclient" = "xuse_libupsclient_config"
1961 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
1962 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
1965 with_libupsclient="no ($with_libupsclient_config failed)"
1967 with_libupsclient_libs="`$with_libupsclient_config --libs`"
1970 with_libupsclient="no ($with_libupsclient_config failed)"
1973 if test "x$with_libupsclient" = "xuse_libupsclient_config"
1975 with_libupsclient="yes"
1978 # configure using pkg-config
1979 if test "x$with_libupsclient" = "xuse_pkgconfig"
1981 if test "x$PKG_CONFIG" = "x"
1983 with_libupsclient="no (Don't have pkg-config)"
1986 if test "x$with_libupsclient" = "xuse_pkgconfig"
1988 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
1989 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
1992 with_libupsclient="no (pkg-config doesn't know library)"
1995 if test "x$with_libupsclient" = "xuse_pkgconfig"
1997 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
2000 with_libupsclient="no ($PKG_CONFIG failed)"
2002 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
2005 with_libupsclient="no ($PKG_CONFIG failed)"
2008 if test "x$with_libupsclient" = "xuse_pkgconfig"
2010 with_libupsclient="yes"
2013 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
2014 # the actual checks.
2015 if test "x$with_libupsclient" = "xyes"
2017 SAVE_CPPFLAGS="$CPPFLAGS"
2018 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2020 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
2022 CPPFLAGS="$SAVE_CPPFLAGS"
2024 if test "x$with_libupsclient" = "xyes"
2026 SAVE_CPPFLAGS="$CPPFLAGS"
2027 SAVE_LDFLAGS="$LDFLAGS"
2029 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2030 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
2032 AC_CHECK_LIB(upsclient, upscli_connect,
2033 [with_libupsclient="yes"],
2034 [with_libupsclient="no (symbol upscli_connect not found)"])
2036 CPPFLAGS="$SAVE_CPPFLAGS"
2037 LDFLAGS="$SAVE_LDFLAGS"
2039 if test "x$with_libupsclient" = "xyes"
2041 SAVE_CPPFLAGS="$CPPFLAGS"
2042 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2044 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
2045 [#include <stdlib.h>
2047 #include <upsclient.h>])
2049 CPPFLAGS="$SAVE_CPPFLAGS"
2051 if test "x$with_libupsclient" = "xyes"
2053 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
2054 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
2055 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
2056 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
2059 ### BEGIN of check for libxmms ###
2060 with_xmms_config="xmms-config"
2063 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
2065 if test "x$withval" != "xno" \
2066 && test "x$withval" != "xyes"
2068 if test -f "$withval" && test -x "$withval";
2070 with_xmms_config="$withval"
2071 else if test -x "$withval/bin/xmms-config"
2073 with_xmms_config="$withval/bin/xmms-config"
2076 else if test "x$withval" = "xno"
2086 if test "x$with_libxmms" = "xyes"
2088 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
2089 xmms_config_status=$?
2091 if test $xmms_config_status -ne 0
2096 if test "x$with_libxmms" = "xyes"
2098 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
2099 xmms_config_status=$?
2101 if test $xmms_config_status -ne 0
2106 if test "x$with_libxmms" = "xyes"
2108 AC_CHECK_LIB(xmms, xmms_remote_get_info,
2110 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
2111 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
2112 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
2113 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
2120 with_libxmms_numeric=0
2121 if test "x$with_libxmms" = "xyes"
2123 with_libxmms_numeric=1
2125 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
2126 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
2127 ### END of check for libxmms ###
2129 with_libnetlink_cflags=""
2130 with_libnetlink_libs="-lnetlink"
2131 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
2133 echo "libnetlink: withval = $withval"
2134 if test "x$withval" = "xyes"
2136 with_libnetlink="yes"
2137 else if test "x$withval" = "xno"
2139 with_libnetlink="no"
2141 if test -d "$withval/include"
2143 with_libnetlink_cflags="-I$withval/include"
2144 with_libnetlink_libs="-L$withval/lib -lnetlink"
2145 with_libnetlink="yes"
2147 AC_MSG_ERROR("no such directory: $withval/include")
2152 if test "x$ac_system" = "xLinux"
2154 with_libnetlink="yes"
2156 with_libnetlink="no (Linux only library)"
2159 if test "x$with_libnetlink" = "xyes"
2162 CFLAGS="$CFLAGS $with_libnetlink_cflags"
2164 with_libnetlink="no (libnetlink.h not found)"
2166 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
2168 with_libnetlink="yes"
2172 #include <sys/types.h>
2173 #include <asm/types.h>
2174 #include <sys/socket.h>
2175 #include <linux/netlink.h>
2176 #include <linux/rtnetlink.h>])
2177 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
2179 #include <sys/types.h>
2180 #include <asm/types.h>
2181 #include <sys/socket.h>])
2185 #include <sys/types.h>
2186 #include <asm/types.h>
2187 #include <sys/socket.h>
2188 #include <linux/netlink.h>
2189 #include <linux/rtnetlink.h>
2193 int retval = TCA_STATS2;
2196 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
2201 #include <sys/types.h>
2202 #include <asm/types.h>
2203 #include <sys/socket.h>
2204 #include <linux/netlink.h>
2205 #include <linux/rtnetlink.h>
2209 int retval = TCA_STATS;
2212 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
2215 CFLAGS="$SAVE_CFLAGS"
2217 if test "x$with_libnetlink" = "xyes"
2219 AC_CHECK_LIB(netlink, rtnl_open,
2220 [with_libnetlink="yes"],
2221 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
2222 [$with_libnetlink_libs])
2224 if test "x$with_libnetlink" = "xyes"
2226 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
2227 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
2228 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
2229 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
2231 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
2233 with_libopenipmipthread="yes"
2234 with_libopenipmipthread_cflags=""
2235 with_libopenipmipthread_libs=""
2237 AC_MSG_CHECKING([for pkg-config])
2239 if test "x$PKG_CONFIG" = "x"
2241 with_libopenipmipthread="no"
2244 temp_result="$PKG_CONFIG"
2246 AC_MSG_RESULT([$temp_result])
2248 if test "x$with_libopenipmipthread" = "xyes"
2250 AC_MSG_CHECKING([for libOpenIPMIpthread])
2251 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
2254 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
2256 AC_MSG_RESULT([$with_libopenipmipthread])
2259 if test "x$with_libopenipmipthread" = "xyes"
2261 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
2262 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
2265 with_libopenipmipthread_cflags="$temp_result"
2267 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
2268 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
2270 AC_MSG_RESULT([$temp_result])
2273 if test "x$with_libopenipmipthread" = "xyes"
2275 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
2276 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
2279 with_libopenipmipthread_ldflags="$temp_result"
2281 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
2282 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
2284 AC_MSG_RESULT([$temp_result])
2287 if test "x$with_libopenipmipthread" = "xyes"
2289 SAVE_CPPFLAGS="$CPPFLAGS"
2290 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
2292 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
2293 [with_libopenipmipthread="yes"],
2294 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
2295 [#include <OpenIPMI/ipmiif.h>
2296 #include <OpenIPMI/ipmi_err.h>
2297 #include <OpenIPMI/ipmi_posix.h>
2298 #include <OpenIPMI/ipmi_conn.h>
2301 CPPFLAGS="$SAVE_CPPFLAGS"
2304 if test "x$with_libopenipmipthread" = "xyes"
2306 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
2307 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
2308 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
2309 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
2312 dnl Check for libpq.
2313 with_pg_config="pg_config"
2314 with_libpq_includedir=""
2315 with_libpq_libdir=""
2316 with_libpq_cppflags=""
2317 with_libpq_ldflags=""
2318 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2321 if test "x$withval" = "xno"
2324 else if test "x$withval" = "xyes"
2328 if test -f "$withval" && test -x "$withval";
2330 with_pg_config="$withval"
2331 else if test -x "$withval/bin/pg_config"
2333 with_pg_config="$withval/bin/pg_config"
2341 if test "x$with_libpq" = "xyes"
2343 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2346 if test $pg_config_status -eq 0
2348 if test -n "$with_libpq_includedir"; then
2349 for dir in $with_libpq_includedir; do
2350 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2354 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2357 SAVE_CPPFLAGS="$CPPFLAGS"
2358 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2360 AC_CHECK_HEADERS(libpq-fe.h, [],
2361 [with_libpq="no (libpq-fe.h not found)"], [])
2363 CPPFLAGS="$SAVE_CPPFLAGS"
2365 if test "x$with_libpq" = "xyes"
2367 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2370 if test $pg_config_status -eq 0
2372 if test -n "$with_libpq_libdir"; then
2373 for dir in $with_libpq_libdir; do
2374 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2378 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2381 SAVE_LDFLAGS="$LDFLAGS"
2382 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2384 AC_CHECK_LIB(pq, PQconnectdb,
2386 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2388 LDFLAGS="$SAVE_LDFLAGS"
2390 if test "x$with_libpq" = "xyes"
2392 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2393 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2394 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2395 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2397 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2399 dnl Check for libvirt and libxml2 libraries.
2400 with_libxml2="no (pkg-config isn't available)"
2401 with_libxml2_cflags=""
2402 with_libxml2_ldflags=""
2403 with_libvirt="no (pkg-config isn't available)"
2404 with_libvirt_cflags=""
2405 with_libvirt_ldflags=""
2406 if test "x$PKG_CONFIG" != "x"
2408 pkg-config --exists 'libxml-2.0' 2>/dev/null
2413 with_libxml2="no (pkg-config doesn't know library)"
2416 pkg-config --exists libvirt 2>/dev/null
2421 with_libvirt="no (pkg-config doesn't know library)"
2424 if test "x$with_libxml2" = "xyes"
2426 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
2431 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
2437 if test "x$with_libxml2" = "xyes"
2439 SAVE_CPPFLAGS="$CPPFLAGS"
2440 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
2442 AC_CHECK_HEADERS(libxml/parser.h, [],
2443 [with_libxml2="no (libxml/parser.h not found)"])
2445 CPPFLAGS="$SAVE_CPPFLAGS"
2447 if test "x$with_libxml2" = "xyes"
2449 SAVE_CFLAGS="$CFLAGS"
2450 SAVE_LDFLAGS="$LDFLAGS"
2452 CFLAGS="$CFLAGS $with_libxml2_cflags"
2453 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
2455 AC_CHECK_LIB(xml2, xmlXPathEval,
2456 [with_libxml2="yes"],
2457 [with_libxml2="no (symbol xmlXPathEval not found)"])
2459 CFLAGS="$SAVE_CFLAGS"
2460 LDFLAGS="$SAVE_LDFLAGS"
2462 dnl Add the right compiler flags and libraries.
2463 if test "x$with_libxml2" = "xyes"; then
2464 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
2465 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
2466 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
2467 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
2469 if test "x$with_libvirt" = "xyes"
2471 with_libvirt_cflags="`pkg-config --cflags libvirt`"
2476 with_libvirt_ldflags="`pkg-config --libs libvirt`"
2482 if test "x$with_libvirt" = "xyes"
2484 SAVE_CPPFLAGS="$CPPFLAGS"
2485 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
2487 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
2488 [with_libvirt="no (libvirt/libvirt.h not found)"])
2490 CPPFLAGS="$SAVE_CPPFLAGS"
2492 if test "x$with_libvirt" = "xyes"
2494 SAVE_CFLAGS="$CFLAGS"
2495 SAVE_LDFLAGS="$LDFLAGS"
2497 CFLAGS="$CFLAGS $with_libvirt_cflags"
2498 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
2500 AC_CHECK_LIB(virt, virDomainBlockStats,
2501 [with_libvirt="yes"],
2502 [with_libvirt="no (symbol virDomainBlockStats not found)"])
2504 CFLAGS="$SAVE_CFLAGS"
2505 LDFLAGS="$SAVE_LDFLAGS"
2507 dnl Add the right compiler flags and libraries.
2508 if test "x$with_libvirt" = "xyes"; then
2509 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
2510 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
2511 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
2512 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
2515 dnl End of check for libvirt and libxml2 libraries.
2517 # Check for enabled/disabled features
2520 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
2521 # ------------------------------------------------------------
2523 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
2528 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
2533 m4_define([EnDis],[disabled])dnl
2534 m4_define([YesNo],[no])dnl
2540 m4_define([EnDis],[enabled])dnl
2541 m4_define([YesNo],[yes])dnl
2544 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
2548 m4_if([$3], [feature], [],
2552 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
2558 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
2560 enable_$1='[YesNo]'dnl
2562 if test "x$enable_$1" = "xno"
2566 if test "x$enable_$1" = "xyes"
2570 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
2575 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
2576 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
2578 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
2580 # AC_PLUGIN(name, default, info)
2581 # ------------------------------------------------------------
2587 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
2589 if test "x$enableval" = "xyes"
2597 if test "x$2" = "xyes"
2604 if test "x$enable_plugin" = "xyes"
2606 if test "x$2" = "xyes"
2608 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
2609 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
2610 dependency_error="yes"
2611 enable_plugin="no (dependency error)"
2614 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
2615 enable_$1="$enable_plugin"
2617 )# AC_PLUGIN(name, default, info)
2619 m4_divert_once([HELP_ENABLE], [
2620 collectd features:])
2621 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
2622 AC_COLLECTD([debug], [enable], [feature], [debugging])
2623 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
2624 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
2626 dependency_error="no"
2634 plugin_interface="no"
2641 plugin_multimeter="no"
2644 plugin_processes="no"
2648 plugin_tcpconns="no"
2653 plugin_wireless="no"
2656 if test "x$ac_system" = "xLinux"
2658 plugin_battery="yes"
2660 plugin_cpufreq="yes"
2662 plugin_entropy="yes"
2663 plugin_interface="yes"
2668 plugin_processes="yes"
2671 plugin_tcpconns="yes"
2672 plugin_thermal="yes"
2674 plugin_vserver="yes"
2675 plugin_wireless="yes"
2677 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
2683 if test "x$ac_system" = "xOpenBSD"
2685 plugin_tcpconns="yes"
2689 if test "x$with_libiokit" = "xyes"
2691 plugin_battery="yes"
2696 if test "x$with_devinfo$with_kstat" = "xyesyes"
2700 plugin_interface="yes"
2705 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
2711 if test "x$with_libstatgrab" = "xyes"
2715 plugin_interface="yes"
2722 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
2727 if test "x$with_libopenipmipthread" = "xyes"
2732 if test "x$have_processor_info" = "xyes"
2736 if test "x$have_sysctlbyname" = "xyes"
2740 plugin_tcpconns="yes"
2743 # Df plugin: Check if we know how to determine mount points first.
2744 #if test "x$have_listmntent" = "xyes"; then
2747 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
2751 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
2755 #if test "x$have_getmntent" = "xseq"
2759 if test "x$c_cv_have_one_getmntent" = "xyes"
2764 # Df plugin: Check if we have either `statfs' or `statvfs' second.
2765 if test "x$plugin_df" = "xyes"
2768 if test "x$have_statfs" = "xyes"
2772 if test "x$have_statvfs" = "xyes"
2778 if test "x$have_getifaddrs" = "xyes"
2780 plugin_interface="yes"
2783 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
2785 plugin_libvirt="yes"
2788 if test "x$have_getloadavg" = "xyes"
2793 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
2798 # Mac OS X memory interface
2799 if test "x$have_host_statistics" = "xyes"
2804 if test "x$have_termios_h" = "xyes"
2806 plugin_multimeter="yes"
2809 if test "x$have_thread_info" = "xyes"
2811 plugin_processes="yes"
2814 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
2816 plugin_processes="yes"
2819 if test "x$with_kvm_getswapinfo" = "xyes"
2824 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
2826 plugin_tcpconns="yes"
2829 if test "x$have_getutent" = "xyes"
2833 if test "x$have_getutxent" = "xyes"
2838 # FIXME: sysctl for swap plugin
2840 m4_divert_once([HELP_ENABLE], [
2843 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
2844 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
2845 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
2846 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
2847 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
2848 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
2849 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
2850 AC_PLUGIN([csv], [yes], [CSV output plugin])
2851 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
2852 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
2853 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
2854 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
2855 AC_PLUGIN([email], [yes], [EMail statistics])
2856 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
2857 AC_PLUGIN([exec], [yes], [Execution of external programs])
2858 AC_PLUGIN([filecount], [yes], [Count files in directories])
2859 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
2860 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
2861 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
2862 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
2863 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
2864 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
2865 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
2866 AC_PLUGIN([load], [$plugin_load], [System load])
2867 AC_PLUGIN([logfile], [yes], [File logging plugin])
2868 AC_PLUGIN([mbmon], [yes], [Query mbmond])
2869 AC_PLUGIN([memcached], [yes], [memcached statistics])
2870 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
2871 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
2872 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
2873 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
2874 AC_PLUGIN([network], [yes], [Network communication plugin])
2875 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
2876 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
2877 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
2878 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
2879 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
2880 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
2881 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
2882 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
2883 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
2884 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
2885 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
2886 AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
2887 AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
2888 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
2889 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
2890 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
2891 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
2892 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
2893 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
2894 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
2895 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
2896 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
2897 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
2898 AC_PLUGIN([users], [$plugin_users], [User statistics])
2899 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
2900 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
2901 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
2902 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
2903 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
2906 if test "x$ac_system" = "xLinux" \
2907 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
2909 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
2913 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
2915 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2917 PERL_BINDINGS_OPTIONS="$withval"
2918 with_perl_bindings="yes"
2920 PERL_BINDINGS_OPTIONS=""
2921 with_perl_bindings="$withval"
2925 PERL_BINDINGS_OPTIONS=""
2926 if test -n "$perl_interpreter"
2928 with_perl_bindings="yes"
2930 with_perl_bindings="no (no perl interpreter found)"
2933 if test "x$with_perl_bindings" = "xyes"
2935 PERL_BINDINGS="perl"
2939 AC_SUBST(PERL_BINDINGS)
2940 AC_SUBST(PERL_BINDINGS_OPTIONS)
2942 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
2944 if test "x$with_rrdtool" = "xyes" \
2945 && test "x$librrd_threadsafe" != "xyes"
2947 with_rrdtool="yes (warning: librrd is not thread-safe)"
2950 if test "x$with_liboping" = "xyes" \
2951 && test "x$with_own_liboping" = "xyes"
2953 with_liboping="yes (shipped version)"
2956 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes"
2958 with_libiptc="yes (shipped version)"
2961 if test "x$with_libperl" = "xyes"
2963 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
2965 enable_perl="no (needs libperl)"
2968 if test "x$with_perl_bindings" = "xyes" \
2969 && test "x$PERL_BINDINGS_OPTIONS" != "x"
2971 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
2978 libcurl . . . . . . . $with_libcurl
2979 libesmtp . . . . . . $with_libesmtp
2980 libiokit . . . . . . $with_libiokit
2981 libiptc . . . . . . . $with_libiptc
2982 libkstat . . . . . . $with_kstat
2983 libkvm . . . . . . . $with_libkvm
2984 libmysql . . . . . . $with_libmysql
2985 libnetlink . . . . . $with_libnetlink
2986 libnetsnmp . . . . . $with_libnetsnmp
2987 libnotify . . . . . . $with_libnotify
2988 liboconfig . . . . . $with_liboconfig
2989 libopenipmi . . . . . $with_libopenipmipthread
2990 liboping . . . . . . $with_liboping
2991 libpcap . . . . . . . $with_libpcap
2992 libperl . . . . . . . $with_libperl
2993 libpthread . . . . . $with_libpthread
2994 libpq . . . . . . . . $with_libpq
2995 librrd . . . . . . . $with_rrdtool
2996 libsensors . . . . . $with_lm_sensors
2997 libstatgrab . . . . . $with_libstatgrab
2998 libupsclient . . . . $with_libupsclient
2999 libvirt . . . . . . . $with_libvirt
3000 libxml2 . . . . . . . $with_libxml2
3001 libxmms . . . . . . . $with_libxmms
3004 daemon mode . . . . . $enable_daemon
3005 debug . . . . . . . . $enable_debug
3008 perl . . . . . . . . $with_perl_bindings
3011 apache . . . . . . . $enable_apache
3012 apcups . . . . . . . $enable_apcups
3013 apple_sensors . . . . $enable_apple_sensors
3014 ascent . . . . . . . $enable_ascent
3015 battery . . . . . . . $enable_battery
3016 cpu . . . . . . . . . $enable_cpu
3017 cpufreq . . . . . . . $enable_cpufreq
3018 csv . . . . . . . . . $enable_csv
3019 df . . . . . . . . . $enable_df
3020 disk . . . . . . . . $enable_disk
3021 dns . . . . . . . . . $enable_dns
3022 email . . . . . . . . $enable_email
3023 entropy . . . . . . . $enable_entropy
3024 exec . . . . . . . . $enable_exec
3025 filecount . . . . . . $enable_filecount
3026 hddtemp . . . . . . . $enable_hddtemp
3027 interface . . . . . . $enable_interface
3028 iptables . . . . . . $enable_iptables
3029 ipmi . . . . . . . . $enable_ipmi
3030 ipvs . . . . . . . . $enable_ipvs
3031 irq . . . . . . . . . $enable_irq
3032 libvirt . . . . . . . $enable_libvirt
3033 load . . . . . . . . $enable_load
3034 logfile . . . . . . . $enable_logfile
3035 mbmon . . . . . . . . $enable_mbmon
3036 memcached . . . . . . $enable_memcached
3037 memory . . . . . . . $enable_memory
3038 multimeter . . . . . $enable_multimeter
3039 mysql . . . . . . . . $enable_mysql
3040 netlink . . . . . . . $enable_netlink
3041 network . . . . . . . $enable_network
3042 nfs . . . . . . . . . $enable_nfs
3043 nginx . . . . . . . . $enable_nginx
3044 notify_desktop . . . $enable_notify_desktop
3045 notify_email . . . . $enable_notify_email
3046 ntpd . . . . . . . . $enable_ntpd
3047 nut . . . . . . . . . $enable_nut
3048 onewire . . . . . . . $enable_onewire
3049 perl . . . . . . . . $enable_perl
3050 ping . . . . . . . . $enable_ping
3051 postgresql . . . . . $enable_postgresql
3052 powerdns . . . . . . $enable_powerdns
3053 processes . . . . . . $enable_processes
3054 rrdtool . . . . . . . $enable_rrdtool
3055 sensors . . . . . . . $enable_sensors
3056 serial . . . . . . . $enable_serial
3057 snmp . . . . . . . . $enable_snmp
3058 swap . . . . . . . . $enable_swap
3059 syslog . . . . . . . $enable_syslog
3060 tail . . . . . . . . $enable_tail
3061 tape . . . . . . . . $enable_tape
3062 tcpconns . . . . . . $enable_tcpconns
3063 teamspeak2 . . . . . $enable_teamspeak2
3064 thermal . . . . . . . $enable_thermal
3065 unixsock . . . . . . $enable_unixsock
3066 users . . . . . . . . $enable_users
3067 uuid . . . . . . . . $enable_uuid
3068 vmem . . . . . . . . $enable_vmem
3069 vserver . . . . . . . $enable_vserver
3070 wireless . . . . . . $enable_wireless
3071 xmms . . . . . . . . $enable_xmms
3075 if test "x$dependency_error" = "xyes"; then
3076 AC_MSG_ERROR("Some plugins are missing dependencies - see above summary for details")