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 vm/anon.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"
263 if test "x$GCC" = "xyes"
265 hint_64="CFLAGS='-m64'"
267 hint_64="CFLAGS='-xarch=v9'"
269 AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
273 # For the processes plugin
275 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
277 # For interface plugin
278 AC_CHECK_HEADERS(ifaddrs.h)
279 AC_CHECK_HEADERS(net/if.h, [], [],
282 # include <sys/types.h>
284 #if HAVE_SYS_SOCKET_H
285 # include <sys/socket.h>
288 AC_CHECK_HEADERS(linux/if.h, [], [],
291 # include <sys/types.h>
293 #if HAVE_SYS_SOCKET_H
294 # include <sys/socket.h>
297 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
300 # include <sys/types.h>
302 #if HAVE_SYS_SOCKET_H
303 # include <sys/socket.h>
306 # include <linux/if.h>
311 have_net_ip_vs_h="no"
313 if test "x$ac_system" = "xLinux"
316 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
318 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
319 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
325 AC_CHECK_HEADERS(sys/ucred.h, [], [],
328 # include <sys/types.h>
331 # include <sys/param.h>
335 # For mount interface
336 AC_CHECK_HEADERS(sys/mount.h, [], [],
339 # include <sys/types.h>
342 # include <sys/param.h>
346 # For the email plugin
347 AC_CHECK_HEADERS(linux/un.h, [], [],
349 #if HAVE_SYS_SOCKET_H
350 # include <sys/socket.h>
354 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)
357 AC_CHECK_HEADERS(arpa/nameser.h)
358 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
360 #if HAVE_ARPA_NAMESER_H
361 # include <arpa/nameser.h>
365 AC_CHECK_HEADERS(net/if_arp.h, [], [],
366 [#if HAVE_SYS_SOCKET_H
367 # include <sys/socket.h>
370 AC_CHECK_HEADERS(net/ppp_defs.h)
371 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
372 [#if HAVE_NET_PPP_DEFS_H
373 # include <net/ppp_defs.h>
376 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
381 # include <sys/types.h>
383 #if HAVE_SYS_SOCKET_H
384 # include <sys/socket.h>
389 #if HAVE_NETINET_IN_H
390 # include <netinet/in.h>
394 # For the multimeter plugin
396 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
399 # Checks for typedefs, structures, and compiler characteristics.
408 # Checks for library functions.
410 AC_PROG_GCC_TRADITIONAL
411 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog)
415 AC_CACHE_CHECK([for strtok_r],
416 [c_cv_have_strtok_r_default],
425 char buffer[] = "foo,bar,baz";
432 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
435 printf ("token = %s;\n", token);
438 [c_cv_have_strtok_r_default="yes"],
439 [c_cv_have_strtok_r_default="no"]
443 if test "x$c_cv_have_strtok_r_default" = "xno"
445 SAVE_CFLAGS="$CFLAGS"
446 CFLAGS="$CFLAGS -D_REENTRANT=1"
448 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
449 [c_cv_have_strtok_r_reentrant],
458 char buffer[] = "foo,bar,baz";
465 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
468 printf ("token = %s;\n", token);
471 [c_cv_have_strtok_r_reentrant="yes"],
472 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
477 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
479 socket_needs_socket="no"
480 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
481 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
483 nanosleep_needs_rt="no"
484 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
485 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
487 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
488 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
489 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
490 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
491 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
492 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
493 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
494 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
495 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
496 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
499 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
502 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
504 if test "x$withval" = "xno"; then
506 else if test "x$withval" = "xyes"; then
513 if test "x$nan_type" = "xnone"; then
514 AC_CACHE_CHECK([whether NAN is defined by default],
515 [c_cv_have_nan_default],
521 static float foo = NAN;
529 [c_cv_have_nan_default="yes"],
530 [c_cv_have_nan_default="no"]
533 if test "x$c_cv_have_nan_default" = "xyes"
538 if test "x$nan_type" = "xnone"; then
539 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
540 [c_cv_have_nan_isoc],
545 #define __USE_ISOC99 1
547 static float foo = NAN;
555 [c_cv_have_nan_isoc="yes"],
556 [c_cv_have_nan_isoc="no"]
559 if test "x$c_cv_have_nan_isoc" = "xyes"
564 if test "x$nan_type" = "xnone"; then
565 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
566 [c_cv_have_nan_zero],
575 #define NAN (0.0 / 0.0)
577 # define isnan(f) ((f) != (f))
579 static float foo = NAN;
587 [c_cv_have_nan_zero="yes"],
588 [c_cv_have_nan_zero="no"]
591 if test "x$c_cv_have_nan_zero" = "xyes"
597 if test "x$nan_type" = "xdefault"; then
598 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
599 [Define if NAN is defined by default and can initialize static variables.])
600 else if test "x$nan_type" = "xisoc99"; then
601 AC_DEFINE(NAN_STATIC_ISOC, 1,
602 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
603 else if test "x$nan_type" = "xzero"; then
604 AC_DEFINE(NAN_ZERO_ZERO, 1,
605 [Define if NAN can be defined as (0.0 / 0.0)])
607 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
610 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
612 if test "x$withval" = "xnothing"; then
613 fp_layout_type="nothing"
614 else if test "x$withval" = "xendianflip"; then
615 fp_layout_type="endianflip"
616 else if test "x$withval" = "xintswap"; then
617 fp_layout_type="intswap"
619 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
622 [fp_layout_type="unknown"])
624 if test "x$fp_layout_type" = "xunknown"; then
625 AC_CACHE_CHECK([if doubles are stored in x86 representation],
626 [c_cv_fp_layout_need_nothing],
642 memcpy ((void *) &i0, (void *) &d, 8);
645 memcpy ((void *) c, (void *) &i1, 8);
647 if ((c[0] == 0x2f) && (c[1] == 0x25)
648 && (c[2] == 0xc0) && (c[3] == 0xc7)
649 && (c[4] == 0x43) && (c[5] == 0x2b)
650 && (c[6] == 0x1f) && (c[7] == 0x5b))
655 [c_cv_fp_layout_need_nothing="yes"],
656 [c_cv_fp_layout_need_nothing="no"]
659 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
660 fp_layout_type="nothing"
663 if test "x$fp_layout_type" = "xunknown"; then
664 AC_CACHE_CHECK([if endianflip converts to x86 representation],
665 [c_cv_fp_layout_need_endianflip],
673 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
674 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
675 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
676 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
677 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
678 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
679 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
680 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
689 memcpy ((void *) &i0, (void *) &d, 8);
691 i1 = endianflip (i0);
692 memcpy ((void *) c, (void *) &i1, 8);
694 if ((c[0] == 0x2f) && (c[1] == 0x25)
695 && (c[2] == 0xc0) && (c[3] == 0xc7)
696 && (c[4] == 0x43) && (c[5] == 0x2b)
697 && (c[6] == 0x1f) && (c[7] == 0x5b))
702 [c_cv_fp_layout_need_endianflip="yes"],
703 [c_cv_fp_layout_need_endianflip="no"]
706 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
707 fp_layout_type="endianflip"
710 if test "x$fp_layout_type" = "xunknown"; then
711 AC_CACHE_CHECK([if intswap converts to x86 representation],
712 [c_cv_fp_layout_need_intswap],
720 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
721 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
730 memcpy ((void *) &i0, (void *) &d, 8);
733 memcpy ((void *) c, (void *) &i1, 8);
735 if ((c[0] == 0x2f) && (c[1] == 0x25)
736 && (c[2] == 0xc0) && (c[3] == 0xc7)
737 && (c[4] == 0x43) && (c[5] == 0x2b)
738 && (c[6] == 0x1f) && (c[7] == 0x5b))
743 [c_cv_fp_layout_need_intswap="yes"],
744 [c_cv_fp_layout_need_intswap="no"]
747 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
748 fp_layout_type="intswap"
752 if test "x$fp_layout_type" = "xnothing"; then
753 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
754 [Define if doubles are stored in x86 representation.])
755 else if test "x$fp_layout_type" = "xendianflip"; then
756 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
757 [Define if endianflip is needed to convert to x86 representation.])
758 else if test "x$fp_layout_type" = "xintswap"; then
759 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
760 [Define if intswap is needed to convert to x86 representation.])
762 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
766 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
768 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
770 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
773 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
774 if test "x$have_getmntent" = "xno"; then
775 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
777 if test "x$have_getmntent" = "xno"; then
778 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
780 if test "x$have_getmntent" = "xno"; then
781 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
784 if test "x$have_getmntent" = "xc"; then
785 AC_CACHE_CHECK([whether getmntent takes one argument],
786 [c_cv_have_one_getmntent],
788 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
789 #include "$srcdir/src/utils_mount.h"]],
793 fh = setmntent ("/etc/mtab", "r");
797 [c_cv_have_one_getmntent="yes"],
798 [c_cv_have_one_getmntent="no"]
801 AC_CACHE_CHECK([whether getmntent takes two arguments],
802 [c_cv_have_two_getmntent],
804 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
805 #include "$srcdir/src/utils_mount.h"]],
810 fh = fopen ("/etc/mnttab", "r");
811 status = getmntent (fh, &mt);
814 [c_cv_have_two_getmntent="yes"],
815 [c_cv_have_two_getmntent="no"]
820 # Check for different versions of `getmntent' here..
822 if test "x$have_getmntent" = "xc"; then
823 if test "x$c_cv_have_one_getmntent" = "xyes"; then
824 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
825 [Define if the function getmntent exists and takes one argument.])
827 if test "x$c_cv_have_two_getmntent" = "xyes"; then
828 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
829 [Define if the function getmntent exists and takes two arguments.])
832 if test "x$have_getmntent" = "xsun"; then
833 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
834 [Define if the function getmntent exists. It's the version from libsun.])
836 if test "x$have_getmntent" = "xseq"; then
837 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
838 [Define if the function getmntent exists. It's the version from libseq.])
840 if test "x$have_getmntent" = "xgen"; then
841 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
842 [Define if the function getmntent exists. It's the version from libgen.])
845 # Check for structures
846 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
847 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
850 #include <sys/types.h>
851 #include <sys/socket.h>
854 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
855 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
858 #include <sys/types.h>
859 #include <sys/socket.h>
860 #include <linux/if.h>
861 #include <linux/netdevice.h>
864 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
866 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
867 [Define if struct kinfo_proc exists in the FreeBSD variant.])
868 have_struct_kinfo_proc_freebsd="yes"
871 have_struct_kinfo_proc_freebsd="no"
875 #include <sys/param.h>
876 #include <sys/sysctl.h>
877 #include <sys/user.h>
880 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
882 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
883 [Define if struct kinfo_proc exists in the OpenBSD variant.])
884 have_struct_kinfo_proc_openbsd="yes"
887 have_struct_kinfo_proc_openbsd="no"
890 #include <sys/param.h>
891 #include <sys/sysctl.h>
895 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
900 # include <sys/types.h>
902 #if HAVE_NETINET_IN_SYSTM_H
903 # include <netinet/in_systm.h>
905 #if HAVE_NETINET_IN_H
906 # include <netinet/in.h>
908 #if HAVE_NETINET_IP_H
909 # include <netinet/ip.h>
911 #if HAVE_NETINET_UDP_H
912 # include <netinet/udp.h>
915 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
920 # include <sys/types.h>
922 #if HAVE_NETINET_IN_SYSTM_H
923 # include <netinet/in_systm.h>
925 #if HAVE_NETINET_IN_H
926 # include <netinet/in.h>
928 #if HAVE_NETINET_IP_H
929 # include <netinet/ip.h>
931 #if HAVE_NETINET_UDP_H
932 # include <netinet/udp.h>
936 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
946 # Checks for libraries begin here
949 AC_CHECK_LIB(resolv, res_search,
951 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
953 [with_libresolv="no"])
954 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
956 dnl Check for HAL (hardware abstraction library)
958 AC_CHECK_LIB(hal,libhal_device_property_exists,
959 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
961 if test "x$with_libhal" = "xyes"; then
962 if test "x$PKG_CONFIG" != "x"; then
963 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
964 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
965 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
966 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
970 m4_divert_once([HELP_WITH], [
971 collectd additional packages:])
973 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
976 librrd_threadsafe="yes"
977 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
978 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
980 librrd_cflags="-I$withval/include"
981 librrd_ldflags="-L$withval/lib"
984 with_rrdtool="$withval"
986 ], [with_rrdtool="yes"])
987 if test "x$with_rrdtool" = "xyes"
989 SAVE_CPPFLAGS="$CPPFLAGS"
990 SAVE_LDFLAGS="$LDFLAGS"
992 CPPFLAGS="$CPPFLAGS $librrd_cflags"
993 LDFLAGS="$LDFLAGS $librrd_ldflags"
995 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
997 CPPFLAGS="$SAVE_CPPFLAGS"
998 LDFLAGS="$SAVE_LDFLAGS"
1000 if test "x$with_rrdtool" = "xyes"
1002 SAVE_CPPFLAGS="$CPPFLAGS"
1003 SAVE_LDFLAGS="$LDFLAGS"
1005 CPPFLAGS="$CPPFLAGS $librrd_cflags"
1006 LDFLAGS="$LDFLAGS $librrd_ldflags"
1008 AC_CHECK_LIB(rrd_th, rrd_update_r,
1010 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
1012 [librrd_threadsafe="no"
1013 AC_CHECK_LIB(rrd, rrd_update,
1015 librrd_ldflags="$librrd_ldflags -lrrd -lm"
1017 [with_rrdtool="no (symbol 'rrd_update' not found)"],
1022 CPPFLAGS="$SAVE_CPPFLAGS"
1023 LDFLAGS="$SAVE_LDFLAGS"
1025 if test "x$with_rrdtool" = "xyes"
1027 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
1028 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
1029 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
1030 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
1032 if test "x$librrd_threadsafe" = "xyes"
1034 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
1037 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
1038 [ if test "x$withval" != "xno" \
1039 && test "x$withval" != "xyes"
1041 LDFLAGS="$LDFLAGS -L$withval/lib"
1042 CPPFLAGS="$CPPFLAGS -I$withval/include"
1043 with_libpthread="yes"
1045 if test "x$withval" = "xno"
1047 with_libpthread="no (disabled)"
1050 ], [with_libpthread="yes"])
1051 if test "x$with_libpthread" = "xyes"
1053 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
1055 if test "x$with_libpthread" = "xyes"
1057 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
1059 if test "x$with_libpthread" = "xyes"
1065 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
1066 [Wether or not to use pthread (POSIX threads) library])
1067 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
1069 if test "x$ac_system" = "xSolaris"
1074 with_kstat="no (Solaris only)"
1075 with_devinfo="no (Solaris only)"
1078 if test "x$with_kstat" = "xyes"
1080 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1082 if test "x$with_kstat" = "xyes"
1084 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1085 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1087 if test "x$with_kstat" = "xyes"
1089 AC_DEFINE(HAVE_LIBKSTAT, 1,
1090 [Define to 1 if you have the 'kstat' library (-lkstat)])
1092 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1093 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1095 ### BEGIN of check for libcurl ###
1096 with_curl_config="curl-config"
1099 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1101 if test "x$withval" = "xno"
1104 else if test "x$withval" = "xyes"
1108 if test -f "$withval" && test -x "$withval"
1110 with_curl_config="$withval"
1112 else if test -x "$withval/bin/curl-config"
1114 with_curl_config="$withval/bin/curl-config"
1123 if test "x$with_libcurl" = "xyes"
1125 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1126 curl_config_status=$?
1128 if test $curl_config_status -ne 0
1130 with_libcurl="no ($with_curl_config failed)"
1132 SAVE_CPPFLAGS="$CPPFLAGS"
1133 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1135 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1137 CPPFLAGS="$SAVE_CPPFLAGS"
1140 if test "x$with_libcurl" = "xyes"
1142 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1143 curl_config_status=$?
1145 if test $curl_config_status -ne 0
1147 with_libcurl="no ($with_curl_config failed)"
1149 AC_CHECK_LIB(curl, curl_easy_init,
1150 [with_libcurl="yes"],
1151 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1155 if test "x$with_libcurl" = "xyes"
1157 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1158 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1159 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1160 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1162 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1163 ### END of check for libcurl ###
1166 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1173 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1175 with_libstatgrab_cflags=""
1176 with_libstatgrab_ldflags=""
1177 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
1179 if test "x$withval" != "xno" \
1180 && test "x$withval" != "xyes"
1182 with_libstatgrab_cflags="-I$withval/include"
1183 with_libstatgrab_ldflags="-L$withval/lib"
1184 with_libstatgrab="yes"
1186 with_libstatgrab="$withval"
1190 if test "x$ac_system" = "xunknown"
1192 with_libstatgrab="yes"
1194 with_libstatgrab="no"
1197 with_libstatgrab_pkg_config="yes"
1198 if test "x$with_libstatgrab" = "xyes" \
1199 && test "x$PKG_CONFIG" != "x"
1201 AC_MSG_CHECKING([pkg-config for libstatgrab])
1203 $PKG_CONFIG --exists libstatgrab 2>/dev/null
1206 with_libstatgrab_pkg_config="no"
1207 temp_result="not found"
1209 AC_MSG_RESULT([$temp_result])
1211 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
1212 with_libstatgrab_pkg_config="no"
1213 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
1216 if test "x$with_libstatgrab" = "xyes" \
1217 && test "x$with_libstatgrab_pkg_config" = "xyes" \
1218 && test "x$with_libstatgrab_cflags" = "x"
1220 AC_MSG_CHECKING([for libstatgrab CFLAGS])
1221 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
1224 with_libstatgrab_cflags="$temp_result"
1226 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
1227 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
1229 AC_MSG_RESULT([$temp_result])
1232 if test "x$with_libstatgrab" = "xyes" \
1233 && test "x$with_libstatgrab_pkg_config" = "xyes" \
1234 && test "x$with_libstatgrab_ldflags" = "x"
1236 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
1237 temp_result="`$PKG_CONFIG --libs libstatgrab`"
1240 with_libstatgrab_ldflags="$temp_result"
1242 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
1243 temp_result="$PKG_CONFIG --libs libstatgrab failed"
1245 AC_MSG_RESULT([$temp_result])
1248 if test "x$with_libstatgrab" = "xyes"
1250 SAVE_CPPFLAGS="$CPPFLAGS"
1251 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
1253 AC_CHECK_HEADERS(statgrab.h,
1254 [with_libstatgrab="yes"],
1255 [with_libstatgrab="no (statgrab.h not found)"])
1257 CPPFLAGS="$SAVE_CPPFLAGS"
1260 if test "x$with_libstatgrab" = "xyes"
1262 SAVE_CFLAGS="$CFLAGS"
1263 SAVE_LDFLAGS="$LDFLAGS"
1265 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
1266 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
1268 AC_CHECK_LIB(statgrab, sg_init,
1269 [with_libstatgrab="yes"],
1270 [with_libstatgrab="no (symbol sg_init not found)"])
1272 CFLAGS="$SAVE_CFLAGS"
1273 LDFLAGS="$SAVE_LDFLAGS"
1276 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
1277 if test "x$with_libstatgrab" = "xyes"
1279 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
1280 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
1281 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
1282 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1283 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1287 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1288 if test "x$with_kvm_getprocs" = "xyes"
1290 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1291 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1294 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1296 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1297 if test "x$with_kvm_getswapinfo" = "xyes"
1299 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1300 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1303 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1305 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1306 if test "x$with_kvm_nlist" = "xyes"
1308 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1309 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1312 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1314 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1315 if test "x$with_kvm_openfiles" = "xyes"
1317 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1318 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1321 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1323 with_sensors_cflags=""
1324 with_sensors_ldflags=""
1325 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
1327 if test "x$withval" = "xno"
1329 with_lm_sensors="no"
1331 with_lm_sensors="yes"
1332 if test "x$withval" != "xyes"
1334 with_sensors_cflags="-I$withval/include"
1335 with_sensors_ldflags="-L$withval/lib"
1336 with_lm_sensors="yes"
1341 if test "x$ac_system" = "xLinux"
1343 with_lm_sensors="yes"
1345 with_lm_sensors="no (Linux only library)"
1348 if test "x$with_lm_sensors" = "xyes"
1350 SAVE_CPPFLAGS="$CPPFLAGS"
1351 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1353 # AC_CHECK_HEADERS(sensors/sensors.h,
1355 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
1357 # [with_lm_sensors="no (sensors/sensors.h not found)"])
1358 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_lm_sensors="no (sensors/sensors.h not found)"])
1360 CPPFLAGS="$SAVE_CPPFLAGS"
1362 if test "x$with_lm_sensors" = "xyes"
1364 SAVE_CPPFLAGS="$CPPFLAGS"
1365 SAVE_LDFLAGS="$LDFLAGS"
1366 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1367 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
1369 AC_CHECK_LIB(sensors, sensors_init,
1371 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
1373 [with_lm_sensors="no (libsensors not found)"])
1375 CPPFLAGS="$SAVE_CPPFLAGS"
1376 LDFLAGS="$SAVE_LDFLAGS"
1378 if test "x$with_lm_sensors" = "xyes"
1380 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
1381 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
1382 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
1383 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
1385 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
1387 with_mysql_config="mysql_config"
1388 with_mysql_cflags=""
1390 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1392 if test "x$withval" = "xno"
1395 else if test "x$withval" = "xyes"
1399 if test -f "$withval" && test -x "$withval";
1401 with_mysql_config="$withval"
1402 else if test -x "$withval/bin/mysql_config"
1404 with_mysql_config="$withval/bin/mysql_config"
1412 if test "x$with_libmysql" = "xyes"
1414 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1415 mysql_config_status=$?
1417 if test $mysql_config_status -ne 0
1419 with_libmysql="no ($with_mysql_config failed)"
1421 SAVE_CPPFLAGS="$CPPFLAGS"
1422 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1425 have_mysql_mysql_h="no"
1426 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
1428 if test "x$have_mysql_h" = "xno"
1430 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
1433 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
1435 with_libmysql="no (mysql.h not found)"
1438 CPPFLAGS="$SAVE_CPPFLAGS"
1441 if test "x$with_libmysql" = "xyes"
1443 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1444 mysql_config_status=$?
1446 if test $mysql_config_status -ne 0
1448 with_libmysql="no ($with_mysql_config failed)"
1450 AC_CHECK_LIB(mysqlclient, mysql_init,
1451 [with_libmysql="yes"],
1452 [with_libmysql="no (symbol 'mysql_init' not found)"],
1455 AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
1456 [with_libmysql="yes"],
1457 [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
1461 if test "x$with_libmysql" = "xyes"
1463 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1464 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1465 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1466 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1468 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1470 with_own_liboconfig="no"
1471 liboconfig_LDFLAGS="$LDFLAGS"
1472 liboconfig_CPPFLAGS="$CPPFLAGS"
1473 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1475 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1477 if test -d "$withval/lib"
1479 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1481 if test -d "$withval/include"
1483 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1486 if test "x$withval" = "xno"
1488 AC_MSG_ERROR("liboconfig is required")
1492 with_liboconfig="yes"
1495 save_LDFLAGS="$LDFLAGS"
1496 save_CPPFLAGS="$CPPFLAGS"
1497 LDFLAGS="$liboconfig_LDFLAGS"
1498 CPPFLAGS="$liboconfig_CPPFLAGS"
1499 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1501 with_liboconfig="yes"
1502 with_own_liboconfig="no"
1505 with_liboconfig="yes"
1506 with_own_liboconfig="yes"
1507 LDFLAGS="$save_LDFLAGS"
1508 CPPFLAGS="$save_CPPFLAGS"
1511 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1512 if test "x$with_own_liboconfig" = "xyes"
1514 with_liboconfig="yes (shipped version)"
1517 #with_liboping="yes"
1518 with_own_liboping="no"
1519 liboping_LDFLAGS="$LDFLAGS"
1520 liboping_CPPFLAGS="$CPPFLAGS"
1521 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1523 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1525 if test -d "$withval/lib"
1527 liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
1529 if test -d "$withval/include"
1531 liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
1534 if test "x$withval" = "xno"
1537 with_own_liboping="no"
1538 else if test "x$withval" = "xyes"
1547 if test "x$with_liboping" = "xyes"
1549 save_LDFLAGS="$LDFLAGS"
1550 save_CPPFLAGS="$CPPFLAGS"
1551 LDFLAGS="$liboping_LDFLAGS"
1552 CPPFLAGS="$liboping_CPPFLAGS"
1553 AC_CHECK_LIB(oping, ping_construct,
1556 with_own_liboping="no"
1560 with_own_liboping="yes"
1561 LDFLAGS="$save_LDFLAGS"
1562 CPPFLAGS="$save_CPPFLAGS"
1565 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1566 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
1568 with_libowcapi_cppflags=""
1569 with_libowcapi_libs="-lowcapi"
1570 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
1572 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1574 with_libowcapi_cppflags="-I$withval/include"
1575 with_libowcapi_libs="-L$withval/lib -lowcapi"
1576 with_libowcapi="yes"
1578 with_libowcapi="$withval"
1582 with_libowcapi="yes"
1584 if test "x$with_libowcapi" = "xyes"
1586 SAVE_CPPFLAGS="$CPPFLAGS"
1587 CPPFLAGS="$with_libowcapi_cppflags"
1589 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
1591 CPPFLAGS="$SAVE_CPPFLAGS"
1593 if test "x$with_libowcapi" = "xyes"
1595 SAVE_LDFLAGS="$LDFLAGS"
1596 SAVE_CPPFLAGS="$CPPFLAGS"
1597 LDFLAGS="$with_libowcapi_libs"
1598 CPPFLAGS="$with_libowcapi_cppflags"
1600 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
1602 LDFLAGS="$SAVE_LDFLAGS"
1603 CPPFLAGS="$SAVE_CPPFLAGS"
1605 if test "x$with_libowcapi" = "xyes"
1607 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
1608 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
1609 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
1610 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
1614 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
1616 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1618 LDFLAGS="$LDFLAGS -L$withval/lib"
1619 CPPFLAGS="$CPPFLAGS -I$withval/include"
1622 with_libpcap="$withval"
1628 if test "x$with_libpcap" = "xyes"
1630 AC_CHECK_LIB(pcap, pcap_open_live,
1632 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
1633 ], [with_libpcap="no (libpcap not found)"])
1635 if test "x$with_libpcap" = "xyes"
1637 AC_CHECK_HEADERS(pcap.h,
1639 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
1640 ], [with_libpcap="no (pcap.h not found)"])
1642 if test "x$with_libpcap" = "xyes"
1648 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
1649 [Wether or not to use the pcap library])
1650 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
1652 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1654 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1656 LDFLAGS="$LDFLAGS -L$withval/lib"
1657 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1660 with_libesmtp="$withval"
1666 if test "x$with_libesmtp" = "xyes"
1668 AC_CHECK_LIB(esmtp, smtp_create_session,
1670 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1671 ], [with_libesmtp="no (libesmtp not found)"])
1673 if test "x$with_libesmtp" = "xyes"
1675 AC_CHECK_HEADERS(libesmtp.h,
1677 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1678 ], [with_libesmtp="no (libesmtp.h not found)"])
1680 if test "x$with_libesmtp" = "xyes"
1686 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1687 [Wether or not to use the esmtp library])
1688 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1690 perl_interpreter="perl"
1691 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
1693 if test -x "$withval"
1695 perl_interpreter="$withval"
1697 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1699 LDFLAGS="$LDFLAGS -L$withval/lib"
1700 CPPFLAGS="$CPPFLAGS -I$withval/include"
1701 perl_interpreter="$withval/bin/perl"
1704 with_libperl="$withval"
1711 AC_MSG_CHECKING([for perl])
1712 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
1713 if test -x "$perl_interpreter"
1715 AC_MSG_RESULT([yes ($perl_interpreter)])
1721 AC_SUBST(PERL, "$perl_interpreter")
1723 if test "x$with_libperl" = "xyes" \
1724 && test -n "$perl_interpreter"
1727 SAVE_LDFLAGS=$LDFLAGS
1728 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
1729 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
1730 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
1731 CFLAGS="$CFLAGS $PERL_CFLAGS"
1732 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1734 AC_CACHE_CHECK([for libperl],
1735 [c_cv_have_libperl],
1739 #define PERL_NO_GET_CONTEXT
1746 load_module (PERL_LOADMOD_NOIMPORT,
1747 newSVpv ("Collectd::Plugin::FooBar", 24),
1750 [c_cv_have_libperl="yes"],
1751 [c_cv_have_libperl="no"]
1755 if test "x$c_cv_have_libperl" = "xyes"
1757 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
1758 AC_SUBST(PERL_CFLAGS)
1759 AC_SUBST(PERL_LDFLAGS)
1765 LDFLAGS=$SAVE_LDFLAGS
1766 else if test -z "$perl_interpreter"; then
1767 with_libperl="no (no perl interpreter found)"
1768 c_cv_have_libperl="no"
1770 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1772 if test "x$with_libperl" = "xyes"
1775 SAVE_LDFLAGS=$LDFLAGS
1776 CFLAGS="$CFLAGS $PERL_CFLAGS"
1777 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1779 AC_CACHE_CHECK([if perl supports ithreads],
1780 [c_cv_have_perl_ithreads],
1788 #if !defined(USE_ITHREADS)
1789 # error "Perl does not support ithreads!"
1790 #endif /* !defined(USE_ITHREADS) */
1793 [c_cv_have_perl_ithreads="yes"],
1794 [c_cv_have_perl_ithreads="no"]
1798 if test "x$c_cv_have_perl_ithreads" = "xyes"
1800 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
1804 LDFLAGS=$SAVE_LDFLAGS
1807 with_own_libiptc="no"
1808 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1810 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1812 LDFLAGS="$LDFLAGS -L$withval/lib"
1813 CPPFLAGS="$CPPFLAGS -I$withval/include"
1816 with_libiptc="$withval"
1820 if test "x$ac_system" = "xLinux"
1824 with_libiptc="no (Linux only)"
1827 if test "x$with_libiptc" = "xyes"
1829 AC_CHECK_LIB(iptc, iptc_init,
1831 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1835 with_own_libiptc="yes"
1838 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" != "xyes"
1840 AC_CHECK_HEADERS(libiptc/libiptc.h,
1842 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1846 with_own_libiptc="yes"
1849 if test "x$with_libiptc" = "xyes"
1852 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
1854 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
1856 with_libiptc="no (Linux iptables headers not found - check KERNEL_DIR)"
1857 with_own_libiptc="no"
1860 #include "$srcdir/src/libiptc/ipt_kernel_headers.h"
1865 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1866 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1867 if test "x$with_own_libiptc" = "xyes"
1869 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1872 with_snmp_config="net-snmp-config"
1875 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1877 if test "x$withval" = "xno"
1879 with_libnetsnmp="no"
1880 else if test "x$withval" = "xyes"
1882 with_libnetsnmp="yes"
1884 if test -x "$withval"
1886 with_snmp_config="$withval"
1887 with_libnetsnmp="yes"
1889 with_snmp_config="$withval/bin/net-snmp-config"
1890 with_libnetsnmp="yes"
1894 [with_libnetsnmp="yes"])
1895 if test "x$with_libnetsnmp" = "xyes"
1897 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
1898 snmp_config_status=$?
1900 if test $snmp_config_status -ne 0
1902 with_libnetsnmp="no ($with_snmp_config failed)"
1904 SAVE_CPPFLAGS="$CPPFLAGS"
1905 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
1907 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1909 CPPFLAGS="$SAVE_CPPFLAGS"
1912 if test "x$with_libnetsnmp" = "xyes"
1914 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
1915 snmp_config_status=$?
1917 if test $snmp_config_status -ne 0
1919 with_libnetsnmp="no ($with_snmp_config failed)"
1921 AC_CHECK_LIB(netsnmp, init_snmp,
1922 [with_libnetsnmp="yes"],
1923 [with_libnetsnmp="no (libnetsnmp not found)"],
1927 if test "x$with_libnetsnmp" = "xyes"
1929 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
1930 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
1931 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
1932 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
1934 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1936 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
1937 [with_libnotify="yes"],
1938 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
1940 with_libupsclient_config=""
1941 with_libupsclient_cflags=""
1942 with_libupsclient_libs=""
1943 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1945 if test "x$withval" = "xno"
1947 with_libupsclient="no"
1948 else if test "x$withval" = "xyes"
1950 with_libupsclient="use_pkgconfig"
1952 if test -x "$withval"
1954 with_libupsclient_config="$withval"
1955 with_libupsclient="use_libupsclient_config"
1956 else if test -x "$withval/bin/libupsclient-config"
1958 with_libupsclient_config="$withval/bin/net-snmp-config"
1959 with_libupsclient="use_libupsclient_config"
1961 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
1962 with_libupsclient_cflags="-I$withval/include"
1963 with_libupsclient_libs="-L$withval/lib -lupsclient"
1964 with_libupsclient="yes"
1968 [with_libupsclient="use_pkgconfig"])
1970 # configure using libupsclient-config
1971 if test "x$with_libupsclient" = "xuse_libupsclient_config"
1973 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
1974 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
1977 with_libupsclient="no ($with_libupsclient_config failed)"
1979 with_libupsclient_libs="`$with_libupsclient_config --libs`"
1982 with_libupsclient="no ($with_libupsclient_config failed)"
1985 if test "x$with_libupsclient" = "xuse_libupsclient_config"
1987 with_libupsclient="yes"
1990 # configure using pkg-config
1991 if test "x$with_libupsclient" = "xuse_pkgconfig"
1993 if test "x$PKG_CONFIG" = "x"
1995 with_libupsclient="no (Don't have pkg-config)"
1998 if test "x$with_libupsclient" = "xuse_pkgconfig"
2000 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
2001 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
2004 with_libupsclient="no (pkg-config doesn't know library)"
2007 if test "x$with_libupsclient" = "xuse_pkgconfig"
2009 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
2012 with_libupsclient="no ($PKG_CONFIG failed)"
2014 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
2017 with_libupsclient="no ($PKG_CONFIG failed)"
2020 if test "x$with_libupsclient" = "xuse_pkgconfig"
2022 with_libupsclient="yes"
2025 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
2026 # the actual checks.
2027 if test "x$with_libupsclient" = "xyes"
2029 SAVE_CPPFLAGS="$CPPFLAGS"
2030 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2032 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
2034 CPPFLAGS="$SAVE_CPPFLAGS"
2036 if test "x$with_libupsclient" = "xyes"
2038 SAVE_CPPFLAGS="$CPPFLAGS"
2039 SAVE_LDFLAGS="$LDFLAGS"
2041 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2042 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
2044 AC_CHECK_LIB(upsclient, upscli_connect,
2045 [with_libupsclient="yes"],
2046 [with_libupsclient="no (symbol upscli_connect not found)"])
2048 CPPFLAGS="$SAVE_CPPFLAGS"
2049 LDFLAGS="$SAVE_LDFLAGS"
2051 if test "x$with_libupsclient" = "xyes"
2053 SAVE_CPPFLAGS="$CPPFLAGS"
2054 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2056 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
2057 [#include <stdlib.h>
2059 #include <upsclient.h>])
2061 CPPFLAGS="$SAVE_CPPFLAGS"
2063 if test "x$with_libupsclient" = "xyes"
2065 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
2066 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
2067 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
2068 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
2071 ### BEGIN of check for libxmms ###
2072 with_xmms_config="xmms-config"
2075 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
2077 if test "x$withval" != "xno" \
2078 && test "x$withval" != "xyes"
2080 if test -f "$withval" && test -x "$withval";
2082 with_xmms_config="$withval"
2083 else if test -x "$withval/bin/xmms-config"
2085 with_xmms_config="$withval/bin/xmms-config"
2088 else if test "x$withval" = "xno"
2098 if test "x$with_libxmms" = "xyes"
2100 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
2101 xmms_config_status=$?
2103 if test $xmms_config_status -ne 0
2108 if test "x$with_libxmms" = "xyes"
2110 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
2111 xmms_config_status=$?
2113 if test $xmms_config_status -ne 0
2118 if test "x$with_libxmms" = "xyes"
2120 AC_CHECK_LIB(xmms, xmms_remote_get_info,
2122 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
2123 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
2124 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
2125 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
2132 with_libxmms_numeric=0
2133 if test "x$with_libxmms" = "xyes"
2135 with_libxmms_numeric=1
2137 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
2138 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
2139 ### END of check for libxmms ###
2141 with_libnetlink_cflags=""
2142 with_libnetlink_libs="-lnetlink"
2143 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
2145 echo "libnetlink: withval = $withval"
2146 if test "x$withval" = "xyes"
2148 with_libnetlink="yes"
2149 else if test "x$withval" = "xno"
2151 with_libnetlink="no"
2153 if test -d "$withval/include"
2155 with_libnetlink_cflags="-I$withval/include"
2156 with_libnetlink_libs="-L$withval/lib -lnetlink"
2157 with_libnetlink="yes"
2159 AC_MSG_ERROR("no such directory: $withval/include")
2164 if test "x$ac_system" = "xLinux"
2166 with_libnetlink="yes"
2168 with_libnetlink="no (Linux only library)"
2171 if test "x$with_libnetlink" = "xyes"
2174 CFLAGS="$CFLAGS $with_libnetlink_cflags"
2176 with_libnetlink="no (libnetlink.h not found)"
2178 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
2180 with_libnetlink="yes"
2184 #include <sys/types.h>
2185 #include <asm/types.h>
2186 #include <sys/socket.h>
2187 #include <linux/netlink.h>
2188 #include <linux/rtnetlink.h>])
2189 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
2191 #include <sys/types.h>
2192 #include <asm/types.h>
2193 #include <sys/socket.h>])
2197 #include <sys/types.h>
2198 #include <asm/types.h>
2199 #include <sys/socket.h>
2200 #include <linux/netlink.h>
2201 #include <linux/rtnetlink.h>
2205 int retval = TCA_STATS2;
2208 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
2213 #include <sys/types.h>
2214 #include <asm/types.h>
2215 #include <sys/socket.h>
2216 #include <linux/netlink.h>
2217 #include <linux/rtnetlink.h>
2221 int retval = TCA_STATS;
2224 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
2227 CFLAGS="$SAVE_CFLAGS"
2229 if test "x$with_libnetlink" = "xyes"
2231 AC_CHECK_LIB(netlink, rtnl_open,
2232 [with_libnetlink="yes"],
2233 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
2234 [$with_libnetlink_libs])
2236 if test "x$with_libnetlink" = "xyes"
2238 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
2239 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
2240 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
2241 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
2243 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
2245 with_libopenipmipthread="yes"
2246 with_libopenipmipthread_cflags=""
2247 with_libopenipmipthread_libs=""
2249 AC_MSG_CHECKING([for pkg-config])
2251 if test "x$PKG_CONFIG" = "x"
2253 with_libopenipmipthread="no"
2256 temp_result="$PKG_CONFIG"
2258 AC_MSG_RESULT([$temp_result])
2260 if test "x$with_libopenipmipthread" = "xyes"
2262 AC_MSG_CHECKING([for libOpenIPMIpthread])
2263 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
2266 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
2268 AC_MSG_RESULT([$with_libopenipmipthread])
2271 if test "x$with_libopenipmipthread" = "xyes"
2273 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
2274 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
2277 with_libopenipmipthread_cflags="$temp_result"
2279 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
2280 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
2282 AC_MSG_RESULT([$temp_result])
2285 if test "x$with_libopenipmipthread" = "xyes"
2287 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
2288 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
2291 with_libopenipmipthread_ldflags="$temp_result"
2293 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
2294 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
2296 AC_MSG_RESULT([$temp_result])
2299 if test "x$with_libopenipmipthread" = "xyes"
2301 SAVE_CPPFLAGS="$CPPFLAGS"
2302 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
2304 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
2305 [with_libopenipmipthread="yes"],
2306 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
2307 [#include <OpenIPMI/ipmiif.h>
2308 #include <OpenIPMI/ipmi_err.h>
2309 #include <OpenIPMI/ipmi_posix.h>
2310 #include <OpenIPMI/ipmi_conn.h>
2313 CPPFLAGS="$SAVE_CPPFLAGS"
2316 if test "x$with_libopenipmipthread" = "xyes"
2318 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
2319 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
2320 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
2321 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
2324 dnl Check for libpq.
2325 with_pg_config="pg_config"
2326 with_libpq_includedir=""
2327 with_libpq_libdir=""
2328 with_libpq_cppflags=""
2329 with_libpq_ldflags=""
2330 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2333 if test "x$withval" = "xno"
2336 else if test "x$withval" = "xyes"
2340 if test -f "$withval" && test -x "$withval";
2342 with_pg_config="$withval"
2343 else if test -x "$withval/bin/pg_config"
2345 with_pg_config="$withval/bin/pg_config"
2353 if test "x$with_libpq" = "xyes"
2355 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2358 if test $pg_config_status -eq 0
2360 if test -n "$with_libpq_includedir"; then
2361 for dir in $with_libpq_includedir; do
2362 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2366 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2369 SAVE_CPPFLAGS="$CPPFLAGS"
2370 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2372 AC_CHECK_HEADERS(libpq-fe.h, [],
2373 [with_libpq="no (libpq-fe.h not found)"], [])
2375 CPPFLAGS="$SAVE_CPPFLAGS"
2377 if test "x$with_libpq" = "xyes"
2379 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2382 if test $pg_config_status -eq 0
2384 if test -n "$with_libpq_libdir"; then
2385 for dir in $with_libpq_libdir; do
2386 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2390 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2393 SAVE_LDFLAGS="$LDFLAGS"
2394 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2396 AC_CHECK_LIB(pq, PQconnectdb,
2398 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2400 LDFLAGS="$SAVE_LDFLAGS"
2402 if test "x$with_libpq" = "xyes"
2404 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2405 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2406 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2407 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2409 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2411 dnl Check for libvirt and libxml2 libraries.
2412 with_libxml2="no (pkg-config isn't available)"
2413 with_libxml2_cflags=""
2414 with_libxml2_ldflags=""
2415 with_libvirt="no (pkg-config isn't available)"
2416 with_libvirt_cflags=""
2417 with_libvirt_ldflags=""
2418 if test "x$PKG_CONFIG" != "x"
2420 pkg-config --exists 'libxml-2.0' 2>/dev/null
2425 with_libxml2="no (pkg-config doesn't know library)"
2428 pkg-config --exists libvirt 2>/dev/null
2433 with_libvirt="no (pkg-config doesn't know library)"
2436 if test "x$with_libxml2" = "xyes"
2438 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
2443 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
2449 if test "x$with_libxml2" = "xyes"
2451 SAVE_CPPFLAGS="$CPPFLAGS"
2452 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
2454 AC_CHECK_HEADERS(libxml/parser.h, [],
2455 [with_libxml2="no (libxml/parser.h not found)"])
2457 CPPFLAGS="$SAVE_CPPFLAGS"
2459 if test "x$with_libxml2" = "xyes"
2461 SAVE_CFLAGS="$CFLAGS"
2462 SAVE_LDFLAGS="$LDFLAGS"
2464 CFLAGS="$CFLAGS $with_libxml2_cflags"
2465 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
2467 AC_CHECK_LIB(xml2, xmlXPathEval,
2468 [with_libxml2="yes"],
2469 [with_libxml2="no (symbol xmlXPathEval not found)"])
2471 CFLAGS="$SAVE_CFLAGS"
2472 LDFLAGS="$SAVE_LDFLAGS"
2474 dnl Add the right compiler flags and libraries.
2475 if test "x$with_libxml2" = "xyes"; then
2476 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
2477 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
2478 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
2479 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
2481 if test "x$with_libvirt" = "xyes"
2483 with_libvirt_cflags="`pkg-config --cflags libvirt`"
2488 with_libvirt_ldflags="`pkg-config --libs libvirt`"
2494 if test "x$with_libvirt" = "xyes"
2496 SAVE_CPPFLAGS="$CPPFLAGS"
2497 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
2499 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
2500 [with_libvirt="no (libvirt/libvirt.h not found)"])
2502 CPPFLAGS="$SAVE_CPPFLAGS"
2504 if test "x$with_libvirt" = "xyes"
2506 SAVE_CFLAGS="$CFLAGS"
2507 SAVE_LDFLAGS="$LDFLAGS"
2509 CFLAGS="$CFLAGS $with_libvirt_cflags"
2510 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
2512 AC_CHECK_LIB(virt, virDomainBlockStats,
2513 [with_libvirt="yes"],
2514 [with_libvirt="no (symbol virDomainBlockStats not found)"])
2516 CFLAGS="$SAVE_CFLAGS"
2517 LDFLAGS="$SAVE_LDFLAGS"
2519 dnl Add the right compiler flags and libraries.
2520 if test "x$with_libvirt" = "xyes"; then
2521 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
2522 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
2523 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
2524 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
2527 dnl End of check for libvirt and libxml2 libraries.
2529 # Check for enabled/disabled features
2532 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
2533 # ------------------------------------------------------------
2535 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
2540 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
2545 m4_define([EnDis],[disabled])dnl
2546 m4_define([YesNo],[no])dnl
2552 m4_define([EnDis],[enabled])dnl
2553 m4_define([YesNo],[yes])dnl
2556 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
2560 m4_if([$3], [feature], [],
2564 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
2570 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
2572 enable_$1='[YesNo]'dnl
2574 if test "x$enable_$1" = "xno"
2578 if test "x$enable_$1" = "xyes"
2582 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
2587 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
2588 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
2590 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
2592 # AC_PLUGIN(name, default, info)
2593 # ------------------------------------------------------------
2599 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
2601 if test "x$enableval" = "xyes"
2609 if test "x$2" = "xyes"
2616 if test "x$enable_plugin" = "xyes"
2618 if test "x$2" = "xyes"
2620 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
2621 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
2622 dependency_error="yes"
2623 enable_plugin="no (dependency error)"
2626 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
2627 enable_$1="$enable_plugin"
2629 )# AC_PLUGIN(name, default, info)
2631 m4_divert_once([HELP_ENABLE], [
2632 collectd features:])
2633 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
2634 AC_COLLECTD([debug], [enable], [feature], [debugging])
2635 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
2636 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
2638 dependency_error="no"
2646 plugin_interface="no"
2653 plugin_multimeter="no"
2656 plugin_processes="no"
2660 plugin_tcpconns="no"
2665 plugin_wireless="no"
2668 if test "x$ac_system" = "xLinux"
2670 plugin_battery="yes"
2672 plugin_cpufreq="yes"
2674 plugin_entropy="yes"
2675 plugin_interface="yes"
2680 plugin_processes="yes"
2683 plugin_tcpconns="yes"
2684 plugin_thermal="yes"
2686 plugin_vserver="yes"
2687 plugin_wireless="yes"
2689 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
2695 if test "x$ac_system" = "xOpenBSD"
2697 plugin_tcpconns="yes"
2701 if test "x$with_libiokit" = "xyes"
2703 plugin_battery="yes"
2708 if test "x$with_devinfo$with_kstat" = "xyesyes"
2712 plugin_interface="yes"
2717 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
2723 if test "x$with_libstatgrab" = "xyes"
2727 plugin_interface="yes"
2734 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
2739 if test "x$with_libopenipmipthread" = "xyes"
2744 if test "x$have_processor_info" = "xyes"
2748 if test "x$have_sysctlbyname" = "xyes"
2752 plugin_tcpconns="yes"
2755 # Df plugin: Check if we know how to determine mount points first.
2756 #if test "x$have_listmntent" = "xyes"; then
2759 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
2763 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
2767 #if test "x$have_getmntent" = "xseq"
2771 if test "x$c_cv_have_one_getmntent" = "xyes"
2776 # Df plugin: Check if we have either `statfs' or `statvfs' second.
2777 if test "x$plugin_df" = "xyes"
2780 if test "x$have_statfs" = "xyes"
2784 if test "x$have_statvfs" = "xyes"
2790 if test "x$have_getifaddrs" = "xyes"
2792 plugin_interface="yes"
2795 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
2797 plugin_libvirt="yes"
2800 if test "x$have_getloadavg" = "xyes"
2805 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
2810 # Mac OS X memory interface
2811 if test "x$have_host_statistics" = "xyes"
2816 if test "x$have_termios_h" = "xyes"
2818 plugin_multimeter="yes"
2821 if test "x$have_thread_info" = "xyes"
2823 plugin_processes="yes"
2826 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
2828 plugin_processes="yes"
2831 if test "x$with_kvm_getswapinfo" = "xyes"
2836 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
2838 plugin_tcpconns="yes"
2841 if test "x$have_getutent" = "xyes"
2845 if test "x$have_getutxent" = "xyes"
2850 # FIXME: sysctl for swap plugin
2852 m4_divert_once([HELP_ENABLE], [
2855 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
2856 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
2857 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
2858 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
2859 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
2860 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
2861 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
2862 AC_PLUGIN([csv], [yes], [CSV output plugin])
2863 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
2864 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
2865 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
2866 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
2867 AC_PLUGIN([email], [yes], [EMail statistics])
2868 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
2869 AC_PLUGIN([exec], [yes], [Execution of external programs])
2870 AC_PLUGIN([filecount], [yes], [Count files in directories])
2871 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
2872 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
2873 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
2874 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
2875 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
2876 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
2877 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
2878 AC_PLUGIN([load], [$plugin_load], [System load])
2879 AC_PLUGIN([logfile], [yes], [File logging plugin])
2880 AC_PLUGIN([mbmon], [yes], [Query mbmond])
2881 AC_PLUGIN([memcached], [yes], [memcached statistics])
2882 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
2883 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
2884 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
2885 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
2886 AC_PLUGIN([network], [yes], [Network communication plugin])
2887 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
2888 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
2889 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
2890 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
2891 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
2892 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
2893 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
2894 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
2895 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
2896 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
2897 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
2898 AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
2899 AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
2900 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
2901 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
2902 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
2903 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
2904 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
2905 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
2906 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
2907 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
2908 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
2909 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
2910 AC_PLUGIN([users], [$plugin_users], [User statistics])
2911 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
2912 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
2913 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
2914 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
2915 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
2918 if test "x$ac_system" = "xLinux" \
2919 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
2921 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
2925 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
2927 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2929 PERL_BINDINGS_OPTIONS="$withval"
2930 with_perl_bindings="yes"
2932 PERL_BINDINGS_OPTIONS=""
2933 with_perl_bindings="$withval"
2937 PERL_BINDINGS_OPTIONS=""
2938 if test -n "$perl_interpreter"
2940 with_perl_bindings="yes"
2942 with_perl_bindings="no (no perl interpreter found)"
2945 if test "x$with_perl_bindings" = "xyes"
2947 PERL_BINDINGS="perl"
2951 AC_SUBST(PERL_BINDINGS)
2952 AC_SUBST(PERL_BINDINGS_OPTIONS)
2954 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
2956 if test "x$with_rrdtool" = "xyes" \
2957 && test "x$librrd_threadsafe" != "xyes"
2959 with_rrdtool="yes (warning: librrd is not thread-safe)"
2962 if test "x$with_liboping" = "xyes" \
2963 && test "x$with_own_liboping" = "xyes"
2965 with_liboping="yes (shipped version)"
2968 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes"
2970 with_libiptc="yes (shipped version)"
2973 if test "x$with_libperl" = "xyes"
2975 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
2977 enable_perl="no (needs libperl)"
2980 if test "x$with_perl_bindings" = "xyes" \
2981 && test "x$PERL_BINDINGS_OPTIONS" != "x"
2983 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
2990 libcurl . . . . . . . $with_libcurl
2991 libesmtp . . . . . . $with_libesmtp
2992 libiokit . . . . . . $with_libiokit
2993 libiptc . . . . . . . $with_libiptc
2994 libkstat . . . . . . $with_kstat
2995 libkvm . . . . . . . $with_libkvm
2996 libmysql . . . . . . $with_libmysql
2997 libnetlink . . . . . $with_libnetlink
2998 libnetsnmp . . . . . $with_libnetsnmp
2999 libnotify . . . . . . $with_libnotify
3000 liboconfig . . . . . $with_liboconfig
3001 libopenipmi . . . . . $with_libopenipmipthread
3002 liboping . . . . . . $with_liboping
3003 libpcap . . . . . . . $with_libpcap
3004 libperl . . . . . . . $with_libperl
3005 libpthread . . . . . $with_libpthread
3006 libpq . . . . . . . . $with_libpq
3007 librrd . . . . . . . $with_rrdtool
3008 libsensors . . . . . $with_lm_sensors
3009 libstatgrab . . . . . $with_libstatgrab
3010 libupsclient . . . . $with_libupsclient
3011 libvirt . . . . . . . $with_libvirt
3012 libxml2 . . . . . . . $with_libxml2
3013 libxmms . . . . . . . $with_libxmms
3016 daemon mode . . . . . $enable_daemon
3017 debug . . . . . . . . $enable_debug
3020 perl . . . . . . . . $with_perl_bindings
3023 apache . . . . . . . $enable_apache
3024 apcups . . . . . . . $enable_apcups
3025 apple_sensors . . . . $enable_apple_sensors
3026 ascent . . . . . . . $enable_ascent
3027 battery . . . . . . . $enable_battery
3028 cpu . . . . . . . . . $enable_cpu
3029 cpufreq . . . . . . . $enable_cpufreq
3030 csv . . . . . . . . . $enable_csv
3031 df . . . . . . . . . $enable_df
3032 disk . . . . . . . . $enable_disk
3033 dns . . . . . . . . . $enable_dns
3034 email . . . . . . . . $enable_email
3035 entropy . . . . . . . $enable_entropy
3036 exec . . . . . . . . $enable_exec
3037 filecount . . . . . . $enable_filecount
3038 hddtemp . . . . . . . $enable_hddtemp
3039 interface . . . . . . $enable_interface
3040 iptables . . . . . . $enable_iptables
3041 ipmi . . . . . . . . $enable_ipmi
3042 ipvs . . . . . . . . $enable_ipvs
3043 irq . . . . . . . . . $enable_irq
3044 libvirt . . . . . . . $enable_libvirt
3045 load . . . . . . . . $enable_load
3046 logfile . . . . . . . $enable_logfile
3047 mbmon . . . . . . . . $enable_mbmon
3048 memcached . . . . . . $enable_memcached
3049 memory . . . . . . . $enable_memory
3050 multimeter . . . . . $enable_multimeter
3051 mysql . . . . . . . . $enable_mysql
3052 netlink . . . . . . . $enable_netlink
3053 network . . . . . . . $enable_network
3054 nfs . . . . . . . . . $enable_nfs
3055 nginx . . . . . . . . $enable_nginx
3056 notify_desktop . . . $enable_notify_desktop
3057 notify_email . . . . $enable_notify_email
3058 ntpd . . . . . . . . $enable_ntpd
3059 nut . . . . . . . . . $enable_nut
3060 onewire . . . . . . . $enable_onewire
3061 perl . . . . . . . . $enable_perl
3062 ping . . . . . . . . $enable_ping
3063 postgresql . . . . . $enable_postgresql
3064 powerdns . . . . . . $enable_powerdns
3065 processes . . . . . . $enable_processes
3066 rrdtool . . . . . . . $enable_rrdtool
3067 sensors . . . . . . . $enable_sensors
3068 serial . . . . . . . $enable_serial
3069 snmp . . . . . . . . $enable_snmp
3070 swap . . . . . . . . $enable_swap
3071 syslog . . . . . . . $enable_syslog
3072 tail . . . . . . . . $enable_tail
3073 tape . . . . . . . . $enable_tape
3074 tcpconns . . . . . . $enable_tcpconns
3075 teamspeak2 . . . . . $enable_teamspeak2
3076 thermal . . . . . . . $enable_thermal
3077 unixsock . . . . . . $enable_unixsock
3078 users . . . . . . . . $enable_users
3079 uuid . . . . . . . . $enable_uuid
3080 vmem . . . . . . . . $enable_vmem
3081 vserver . . . . . . . $enable_vserver
3082 wireless . . . . . . $enable_wireless
3083 xmms . . . . . . . . $enable_xmms
3087 if test "x$dependency_error" = "xyes"; then
3088 AC_MSG_ERROR("Some plugins are missing dependencies - see above summary for details")