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 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to enforce POSIX thread semantics under Solaris.])
73 # Where to install .pc files.
74 pkgconfigdir="${libdir}/pkgconfig"
75 AC_SUBST(pkgconfigdir)
77 # Check for standards compliance mode
78 AC_ARG_ENABLE(standards,
79 AS_HELP_STRING([--enable-standards], [Enable standards compliance mode]),
80 [enable_standards="$enableval"],
81 [enable_standards="no"])
82 if test "x$enable_standards" = "xyes"
84 AC_DEFINE(_ISOC99_SOURCE, 1, [Define to enforce ISO C99 compliance.])
85 AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Define to enforce POSIX.1-2001 compliance.])
86 AC_DEFINE(_XOPEN_SOURCE, 600, [Define to enforce X/Open 6 (XSI) compliance.])
87 AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.])
89 AM_CONDITIONAL(BUILD_FEATURE_STANDARDS, test "x$enable_standards" = "xyes")
92 # Checks for header files.
98 AC_CHECK_HEADERS(stdio.h stdint.h stdbool.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)
101 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
106 # include <sys/types.h>
109 AC_CHECK_HEADERS(netinet/in.h, [], [],
114 # include <sys/types.h>
116 #if HAVE_NETINET_IN_SYSTM_H
117 # include <netinet/in_systm.h>
120 AC_CHECK_HEADERS(netinet/ip.h, [], [],
125 # include <sys/types.h>
127 #if HAVE_NETINET_IN_SYSTM_H
128 # include <netinet/in_systm.h>
130 #if HAVE_NETINET_IN_H
131 # include <netinet/in.h>
134 AC_CHECK_HEADERS(netinet/ip_icmp.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/ip_var.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>
164 #if HAVE_NETINET_IP_H
165 # include <netinet/ip.h>
168 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
173 # include <sys/types.h>
175 #if HAVE_NETINET_IN_SYSTM_H
176 # include <netinet/in_systm.h>
178 #if HAVE_NETINET_IN_H
179 # include <netinet/in.h>
182 AC_CHECK_HEADERS(netinet/icmp6.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_IP6_H
196 # include <netinet/ip6.h>
199 AC_CHECK_HEADERS(netinet/tcp.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>
216 AC_CHECK_HEADERS(netinet/udp.h, [], [],
221 # include <sys/types.h>
223 #if HAVE_NETINET_IN_SYSTM_H
224 # include <netinet/in_systm.h>
226 #if HAVE_NETINET_IN_H
227 # include <netinet/in.h>
229 #if HAVE_NETINET_IP_H
230 # include <netinet/ip.h>
235 AC_CHECK_HEADERS(sys/dkstat.h)
236 if test "x$ac_system" = "xDarwin"
238 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)
239 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
241 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
244 # include <sys/types.h>
247 # include <sys/param.h>
252 AC_CHECK_HEADERS(linux/major.h libgen.h)
254 # For the battery plugin
255 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
257 #if HAVE_IOKIT_IOKITLIB_H
258 # include <IOKit/IOKitLib.h>
260 #if HAVE_IOKIT_IOTYPES_H
261 # include <IOKit/IOTypes.h>
265 # For the swap module
266 have_sys_swap_h="yes"
267 AC_CHECK_HEADERS(sys/swap.h, [], [have_sys_swap_h="no"],
270 # include <sys/types.h>
273 # include <sys/param.h>
277 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
279 AC_MSG_NOTICE([Solaris detected and sys/swap.h not found: Try building a 64bit binary.])
283 # For the processes plugin
285 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
287 # For interface plugin
288 AC_CHECK_HEADERS(ifaddrs.h)
289 AC_CHECK_HEADERS(net/if.h, [], [],
292 # include <sys/types.h>
294 #if HAVE_SYS_SOCKET_H
295 # include <sys/socket.h>
298 AC_CHECK_HEADERS(linux/if.h, [], [],
301 # include <sys/types.h>
303 #if HAVE_SYS_SOCKET_H
304 # include <sys/socket.h>
307 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
310 # include <sys/types.h>
312 #if HAVE_SYS_SOCKET_H
313 # include <sys/socket.h>
316 # include <linux/if.h>
321 have_net_ip_vs_h="no"
323 if test "x$ac_system" = "xLinux"
326 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
328 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
329 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
335 AC_CHECK_HEADERS(sys/ucred.h, [], [],
338 # include <sys/types.h>
341 # include <sys/param.h>
345 # For mount interface
346 AC_CHECK_HEADERS(sys/mount.h, [], [],
349 # include <sys/types.h>
352 # include <sys/param.h>
356 # For the email plugin
357 AC_CHECK_HEADERS(linux/un.h, [], [],
359 #if HAVE_SYS_SOCKET_H
360 # include <sys/socket.h>
364 AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.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)
367 AC_CHECK_HEADERS(arpa/nameser.h)
368 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
370 #if HAVE_ARPA_NAMESER_H
371 # include <arpa/nameser.h>
375 AC_CHECK_HEADERS(net/if_arp.h, [], [],
376 [#if HAVE_SYS_SOCKET_H
377 # include <sys/socket.h>
380 AC_CHECK_HEADERS(net/ppp_defs.h)
381 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
382 [#if HAVE_NET_PPP_DEFS_H
383 # include <net/ppp_defs.h>
386 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
391 # include <sys/types.h>
393 #if HAVE_SYS_SOCKET_H
394 # include <sys/socket.h>
399 #if HAVE_NETINET_IN_H
400 # include <netinet/in.h>
404 # For the multimeter plugin
406 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
409 # Checks for typedefs, structures, and compiler characteristics.
418 # Checks for library functions.
420 AC_PROG_GCC_TRADITIONAL
421 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf)
425 AC_CACHE_CHECK([for strtok_r],
426 [c_cv_have_strtok_r_default],
435 char buffer[] = "foo,bar,baz";
442 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
445 printf ("token = %s;\n", token);
448 [c_cv_have_strtok_r_default="yes"],
449 [c_cv_have_strtok_r_default="no"]
453 if test "x$c_cv_have_strtok_r_default" = "xno"
455 SAVE_CFLAGS="$CFLAGS"
456 CFLAGS="$CFLAGS -D_REENTRANT=1"
458 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
459 [c_cv_have_strtok_r_reentrant],
468 char buffer[] = "foo,bar,baz";
475 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
478 printf ("token = %s;\n", token);
481 [c_cv_have_strtok_r_reentrant="yes"],
482 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
487 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
489 socket_needs_socket="no"
490 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
491 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
493 nanosleep_needs_rt="no"
494 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
495 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
497 AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
498 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
499 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
500 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
501 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
502 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
503 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
504 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
505 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
506 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
507 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
508 AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
511 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
514 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
516 if test "x$withval" = "xno"; then
518 else if test "x$withval" = "xyes"; then
525 if test "x$nan_type" = "xnone"; then
526 AC_CACHE_CHECK([whether NAN is defined by default],
527 [c_cv_have_nan_default],
533 static float foo = NAN;
541 [c_cv_have_nan_default="yes"],
542 [c_cv_have_nan_default="no"]
545 if test "x$c_cv_have_nan_default" = "xyes"
550 if test "x$nan_type" = "xnone"; then
551 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
552 [c_cv_have_nan_isoc],
557 #define __USE_ISOC99 1
559 static float foo = NAN;
567 [c_cv_have_nan_isoc="yes"],
568 [c_cv_have_nan_isoc="no"]
571 if test "x$c_cv_have_nan_isoc" = "xyes"
576 if test "x$nan_type" = "xnone"; then
577 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
578 [c_cv_have_nan_zero],
587 #define NAN (0.0 / 0.0)
589 # define isnan(f) ((f) != (f))
591 static float foo = NAN;
599 [c_cv_have_nan_zero="yes"],
600 [c_cv_have_nan_zero="no"]
603 if test "x$c_cv_have_nan_zero" = "xyes"
609 if test "x$nan_type" = "xdefault"; then
610 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
611 [Define if NAN is defined by default and can initialize static variables.])
612 else if test "x$nan_type" = "xisoc99"; then
613 AC_DEFINE(NAN_STATIC_ISOC, 1,
614 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
615 else if test "x$nan_type" = "xzero"; then
616 AC_DEFINE(NAN_ZERO_ZERO, 1,
617 [Define if NAN can be defined as (0.0 / 0.0)])
619 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
622 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
624 if test "x$withval" = "xnothing"; then
625 fp_layout_type="nothing"
626 else if test "x$withval" = "xendianflip"; then
627 fp_layout_type="endianflip"
628 else if test "x$withval" = "xintswap"; then
629 fp_layout_type="intswap"
631 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
634 [fp_layout_type="unknown"])
636 if test "x$fp_layout_type" = "xunknown"; then
637 AC_CACHE_CHECK([if doubles are stored in x86 representation],
638 [c_cv_fp_layout_need_nothing],
649 # include <stdbool.h>
659 memcpy ((void *) &i0, (void *) &d, 8);
662 memcpy ((void *) c, (void *) &i1, 8);
664 if ((c[0] == 0x2f) && (c[1] == 0x25)
665 && (c[2] == 0xc0) && (c[3] == 0xc7)
666 && (c[4] == 0x43) && (c[5] == 0x2b)
667 && (c[6] == 0x1f) && (c[7] == 0x5b))
672 [c_cv_fp_layout_need_nothing="yes"],
673 [c_cv_fp_layout_need_nothing="no"]
676 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
677 fp_layout_type="nothing"
680 if test "x$fp_layout_type" = "xunknown"; then
681 AC_CACHE_CHECK([if endianflip converts to x86 representation],
682 [c_cv_fp_layout_need_endianflip],
693 # include <stdbool.h>
695 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
696 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
697 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
698 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
699 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
700 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
701 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
702 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
711 memcpy ((void *) &i0, (void *) &d, 8);
713 i1 = endianflip (i0);
714 memcpy ((void *) c, (void *) &i1, 8);
716 if ((c[0] == 0x2f) && (c[1] == 0x25)
717 && (c[2] == 0xc0) && (c[3] == 0xc7)
718 && (c[4] == 0x43) && (c[5] == 0x2b)
719 && (c[6] == 0x1f) && (c[7] == 0x5b))
724 [c_cv_fp_layout_need_endianflip="yes"],
725 [c_cv_fp_layout_need_endianflip="no"]
728 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
729 fp_layout_type="endianflip"
732 if test "x$fp_layout_type" = "xunknown"; then
733 AC_CACHE_CHECK([if intswap converts to x86 representation],
734 [c_cv_fp_layout_need_intswap],
745 # include <stdbool.h>
747 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
748 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
757 memcpy ((void *) &i0, (void *) &d, 8);
760 memcpy ((void *) c, (void *) &i1, 8);
762 if ((c[0] == 0x2f) && (c[1] == 0x25)
763 && (c[2] == 0xc0) && (c[3] == 0xc7)
764 && (c[4] == 0x43) && (c[5] == 0x2b)
765 && (c[6] == 0x1f) && (c[7] == 0x5b))
770 [c_cv_fp_layout_need_intswap="yes"],
771 [c_cv_fp_layout_need_intswap="no"]
774 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
775 fp_layout_type="intswap"
779 if test "x$fp_layout_type" = "xnothing"; then
780 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
781 [Define if doubles are stored in x86 representation.])
782 else if test "x$fp_layout_type" = "xendianflip"; then
783 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
784 [Define if endianflip is needed to convert to x86 representation.])
785 else if test "x$fp_layout_type" = "xintswap"; then
786 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
787 [Define if intswap is needed to convert to x86 representation.])
789 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
793 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
795 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
797 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
800 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
801 if test "x$have_getmntent" = "xno"; then
802 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
804 if test "x$have_getmntent" = "xno"; then
805 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
807 if test "x$have_getmntent" = "xno"; then
808 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
811 if test "x$have_getmntent" = "xc"; then
812 AC_CACHE_CHECK([whether getmntent takes one argument],
813 [c_cv_have_one_getmntent],
815 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
817 #include "$srcdir/src/utils_mount.h"]],
821 fh = setmntent ("/etc/mtab", "r");
825 [c_cv_have_one_getmntent="yes"],
826 [c_cv_have_one_getmntent="no"]
829 AC_CACHE_CHECK([whether getmntent takes two arguments],
830 [c_cv_have_two_getmntent],
832 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
833 #include <sys/mnttab.h>
834 #include "$srcdir/src/utils_mount.h"]],
839 fh = fopen ("/etc/mnttab", "r");
840 status = getmntent (fh, &mt);
843 [c_cv_have_two_getmntent="yes"],
844 [c_cv_have_two_getmntent="no"]
849 # Check for different versions of `getmntent' here..
851 if test "x$have_getmntent" = "xc"; then
852 if test "x$c_cv_have_one_getmntent" = "xyes"; then
853 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
854 [Define if the function getmntent exists and takes one argument.])
856 if test "x$c_cv_have_two_getmntent" = "xyes"; then
857 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
858 [Define if the function getmntent exists and takes two arguments.])
861 if test "x$have_getmntent" = "xsun"; then
862 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
863 [Define if the function getmntent exists. It's the version from libsun.])
865 if test "x$have_getmntent" = "xseq"; then
866 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
867 [Define if the function getmntent exists. It's the version from libseq.])
869 if test "x$have_getmntent" = "xgen"; then
870 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
871 [Define if the function getmntent exists. It's the version from libgen.])
874 # Check for structures
875 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
876 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
879 #include <sys/types.h>
880 #include <sys/socket.h>
883 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
884 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
887 #include <sys/types.h>
888 #include <sys/socket.h>
889 #include <linux/if.h>
890 #include <linux/netdevice.h>
893 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
895 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
896 [Define if struct kinfo_proc exists in the FreeBSD variant.])
897 have_struct_kinfo_proc_freebsd="yes"
900 have_struct_kinfo_proc_freebsd="no"
904 #include <sys/param.h>
905 #include <sys/sysctl.h>
906 #include <sys/user.h>
909 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
911 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
912 [Define if struct kinfo_proc exists in the OpenBSD variant.])
913 have_struct_kinfo_proc_openbsd="yes"
916 have_struct_kinfo_proc_openbsd="no"
919 #include <sys/param.h>
920 #include <sys/sysctl.h>
924 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
930 # include <sys/types.h>
932 #if HAVE_NETINET_IN_SYSTM_H
933 # include <netinet/in_systm.h>
935 #if HAVE_NETINET_IN_H
936 # include <netinet/in.h>
938 #if HAVE_NETINET_IP_H
939 # include <netinet/ip.h>
941 #if HAVE_NETINET_UDP_H
942 # include <netinet/udp.h>
945 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
951 # include <sys/types.h>
953 #if HAVE_NETINET_IN_SYSTM_H
954 # include <netinet/in_systm.h>
956 #if HAVE_NETINET_IN_H
957 # include <netinet/in.h>
959 #if HAVE_NETINET_IP_H
960 # include <netinet/ip.h>
962 #if HAVE_NETINET_UDP_H
963 # include <netinet/udp.h>
967 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
977 # Checks for libraries begin here
980 AC_CHECK_LIB(resolv, res_search,
982 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
984 [with_libresolv="no"])
985 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
987 dnl Check for HAL (hardware abstraction library)
989 AC_CHECK_LIB(hal,libhal_device_property_exists,
990 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
992 if test "x$with_libhal" = "xyes"; then
993 if test "x$PKG_CONFIG" != "x"; then
994 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
995 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
996 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
997 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
1001 m4_divert_once([HELP_WITH], [
1002 collectd additional packages:])
1004 if test "x$ac_system" = "xSolaris"
1009 with_kstat="no (Solaris only)"
1010 with_devinfo="no (Solaris only)"
1013 if test "x$with_kstat" = "xyes"
1015 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1017 if test "x$with_kstat" = "xyes"
1019 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1020 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1022 if test "x$with_kstat" = "xyes"
1024 AC_DEFINE(HAVE_LIBKSTAT, 1,
1025 [Define to 1 if you have the 'kstat' library (-lkstat)])
1027 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1028 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1031 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1038 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1041 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1042 if test "x$with_kvm_getprocs" = "xyes"
1044 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1045 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1048 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1050 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1051 if test "x$with_kvm_getswapinfo" = "xyes"
1053 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1054 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1057 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1059 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1060 if test "x$with_kvm_nlist" = "xyes"
1062 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1063 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1066 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1068 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1069 if test "x$with_kvm_openfiles" = "xyes"
1071 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1072 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1075 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1077 # --with-libcurl {{{
1078 with_curl_config="curl-config"
1081 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1083 if test "x$withval" = "xno"
1086 else if test "x$withval" = "xyes"
1090 if test -f "$withval" && test -x "$withval"
1092 with_curl_config="$withval"
1094 else if test -x "$withval/bin/curl-config"
1096 with_curl_config="$withval/bin/curl-config"
1105 if test "x$with_libcurl" = "xyes"
1107 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1108 curl_config_status=$?
1110 if test $curl_config_status -ne 0
1112 with_libcurl="no ($with_curl_config failed)"
1114 SAVE_CPPFLAGS="$CPPFLAGS"
1115 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1117 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1119 CPPFLAGS="$SAVE_CPPFLAGS"
1122 if test "x$with_libcurl" = "xyes"
1124 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1125 curl_config_status=$?
1127 if test $curl_config_status -ne 0
1129 with_libcurl="no ($with_curl_config failed)"
1131 AC_CHECK_LIB(curl, curl_easy_init,
1132 [with_libcurl="yes"],
1133 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1137 if test "x$with_libcurl" = "xyes"
1139 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1140 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1141 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1142 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1144 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1148 with_libdbi_cppflags=""
1149 with_libdbi_ldflags=""
1150 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1152 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1154 with_libdbi_cppflags="-I$withval/include"
1155 with_libdbi_ldflags="-L$withval/lib"
1158 with_libdbi="$withval"
1164 if test "x$with_libdbi" = "xyes"
1166 SAVE_CPPFLAGS="$CPPFLAGS"
1167 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1169 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1171 CPPFLAGS="$SAVE_CPPFLAGS"
1173 if test "x$with_libdbi" = "xyes"
1175 SAVE_CPPFLAGS="$CPPFLAGS"
1176 SAVE_LDFLAGS="$LDFLAGS"
1177 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1178 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1180 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1182 CPPFLAGS="$SAVE_CPPFLAGS"
1183 LDFLAGS="$SAVE_LDFLAGS"
1185 if test "x$with_libdbi" = "xyes"
1187 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1188 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1189 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1190 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1191 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1192 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1194 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1197 # --with-libesmtp {{{
1198 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1200 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1202 LDFLAGS="$LDFLAGS -L$withval/lib"
1203 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1206 with_libesmtp="$withval"
1212 if test "x$with_libesmtp" = "xyes"
1214 AC_CHECK_LIB(esmtp, smtp_create_session,
1216 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1217 ], [with_libesmtp="no (libesmtp not found)"])
1219 if test "x$with_libesmtp" = "xyes"
1221 AC_CHECK_HEADERS(libesmtp.h,
1223 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1224 ], [with_libesmtp="no (libesmtp.h not found)"])
1226 if test "x$with_libesmtp" = "xyes"
1232 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1233 [Wether or not to use the esmtp library])
1234 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1237 # --with-libganglia {{{
1238 AC_ARG_WITH(libganglia, [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
1240 if test -f "$withval" && test -x "$withval"
1242 with_libganglia_config="$withval"
1243 with_libganglia="yes"
1244 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"
1246 with_libganglia_config="$withval/bin/ganglia-config"
1247 with_libganglia="yes"
1248 else if test -d "$withval"
1250 GANGLIA_CPPFLAGS="-I$withval/include"
1251 GANGLIA_LDFLAGS="-L$withval/lib"
1252 with_libganglia="yes"
1254 with_libganglia_config="ganglia-config"
1255 with_libganglia="$withval"
1259 with_libganglia_config="ganglia-config"
1260 with_libganglia="yes"
1263 if test "x$with_libganglia" = "xyes" && test "x$with_libganglia_config" != "x"
1265 if test "x$GANGLIA_CPPFLAGS" = "x"
1267 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
1270 if test "x$GANGLIA_LDFLAGS" = "x"
1272 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
1275 if test "x$GANGLIA_LIBS" = "x"
1277 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
1281 SAVE_CPPFLAGS="$CPPFLAGS"
1282 SAVE_LDFLAGS="$LDFLAGS"
1283 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
1284 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
1286 if test "x$with_libganglia" = "xyes"
1288 AC_CHECK_HEADERS(gm_protocol.h,
1290 AC_DEFINE(HAVE_GM_PROTOCOL_H, 1,
1291 [Define to 1 if you have the <gm_protocol.h> header file.])
1292 ], [with_libganglia="no (gm_protocol.h not found)"])
1295 if test "x$with_libganglia" = "xyes"
1297 AC_CHECK_LIB(ganglia, xdr_Ganglia_value_msg,
1299 AC_DEFINE(HAVE_LIBGANGLIA, 1,
1300 [Define to 1 if you have the ganglia library (-lganglia).])
1301 ], [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"])
1304 CPPFLAGS="$SAVE_CPPFLAGS"
1305 LDFLAGS="$SAVE_LDFLAGS"
1307 AC_SUBST(GANGLIA_CPPFLAGS)
1308 AC_SUBST(GANGLIA_LDFLAGS)
1309 AC_SUBST(GANGLIA_LIBS)
1310 AM_CONDITIONAL(BUILD_WITH_LIBGANGLIA, test "x$with_libganglia" = "xyes")
1313 # --with-libgcrypt {{{
1314 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
1315 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
1316 GCRYPT_LIBS="$GCRYPT_LIBS"
1317 AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
1319 if test -f "$withval" && test -x "$withval"
1321 with_libgcrypt_config="$withval"
1322 with_libgcrypt="yes"
1323 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"
1325 with_libgcrypt_config="$withval/bin/gcrypt-config"
1326 with_libgcrypt="yes"
1327 else if test -d "$withval"
1329 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
1330 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
1331 with_libgcrypt="yes"
1333 with_libgcrypt_config="gcrypt-config"
1334 with_libgcrypt="$withval"
1338 with_libgcrypt_config="libgcrypt-config"
1339 with_libgcrypt="yes"
1342 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"
1344 if test "x$GCRYPT_CPPFLAGS" = "x"
1346 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
1349 if test "x$GCRYPT_LDFLAGS" = "x"
1351 gcrypt_exec_prefix=`"$with_libgcrypt_config" --exec-prefix 2>/dev/null`
1352 GCRYPT_LDFLAGS="-L$gcrypt_exec_prefix/lib"
1355 if test "x$GCRYPT_LIBS" = "x"
1357 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
1361 SAVE_CPPFLAGS="$CPPFLAGS"
1362 SAVE_LDFLAGS="$LDFLAGS"
1363 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
1364 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
1366 if test "x$with_libgcrypt" = "xyes"
1368 if test "x$GCRYPT_CPPFLAGS" != "x"
1370 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
1372 AC_CHECK_HEADERS(gcrypt.h,
1373 [with_libgcrypt="yes"],
1374 [with_libgcrypt="no (gcrypt.h not found)"])
1377 if test "x$with_libgcrypt" = "xyes"
1379 if test "x$GCRYPT_LDFLAGS" != "x"
1381 AC_MSG_NOTICE([gcrypt LDFLAGS: $GCRYPT_LDFLAGS])
1383 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
1384 [with_libgcrypt="yes"],
1385 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
1388 CPPFLAGS="$SAVE_CPPFLAGS"
1389 LDFLAGS="$SAVE_LDFLAGS"
1391 if test "x$with_libgcrypt" = "xyes"
1393 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to 1 if you have the gcrypt library (-lgcrypt).])
1396 AC_SUBST(GCRYPT_CPPFLAGS)
1397 AC_SUBST(GCRYPT_LDFLAGS)
1398 AC_SUBST(GCRYPT_LIBS)
1399 AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes")
1402 # --with-libiptc {{{
1403 with_own_libiptc="no"
1404 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1406 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1408 LDFLAGS="$LDFLAGS -L$withval/lib"
1409 CPPFLAGS="$CPPFLAGS -I$withval/include"
1412 with_libiptc="$withval"
1416 if test "x$ac_system" = "xLinux"
1420 with_libiptc="no (Linux only)"
1423 if test "x$with_libiptc" = "xyes"
1425 AC_CHECK_LIB(iptc, iptc_init,
1427 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1431 with_own_libiptc="yes"
1434 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" != "xyes"
1436 AC_CHECK_HEADERS(libiptc/libiptc.h,
1438 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1442 with_own_libiptc="yes"
1445 if test "x$with_libiptc" = "xyes"
1448 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
1450 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
1452 with_libiptc="no (Linux iptables headers not found - check KERNEL_DIR)"
1453 with_own_libiptc="no"
1456 #include "$srcdir/src/libiptc/ipt_kernel_headers.h"
1461 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1462 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1463 if test "x$with_own_libiptc" = "xyes"
1465 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1470 with_java_home="$JAVA_HOME"
1471 with_java_vmtype="client"
1474 AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
1476 if test "x$withval" = "xno"
1479 else if test "x$withval" = "xyes"
1483 with_java_home="$withval"
1488 if test "x$with_java" = "xyes"
1490 if test -d "$with_java_home"
1492 if test -d "$with_java_home/include"
1494 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$with_java_home/include"
1496 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$with_java_home"
1499 if test -d "$with_java_home/lib"
1501 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$with_java_home/lib"
1503 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$with_java_home"
1505 else if test "x$with_java_home" != "x"
1507 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
1511 if test "x$JAVA_CPPFLAGS" != "x"
1513 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
1515 if test "x$JAVA_CFLAGS" != "x"
1517 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
1519 if test "x$JAVA_LDFLAGS" != "x"
1521 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
1524 SAVE_CPPFLAGS="$CPPFLAGS"
1525 SAVE_CFLAGS="$CFLAGS"
1526 SAVE_LDFLAGS="$LDFLAGS"
1527 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
1528 CFLAGS="$CFLAGS $JAVA_CFLAGS"
1529 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
1531 if test "x$with_java" = "xyes"
1533 AC_CHECK_HEADERS(jni.h, [], [with_java="no (jni.h not found)"])
1535 if test "x$with_java" = "xyes"
1537 AC_CHECK_LIB(jvm, JNI_CreateJavaVM,
1539 [with_java="no (libjvm not found)"],
1542 if test "x$with_java" = "xyes"
1544 JAVA_LIBS="$JAVA_LIBS -ljvm"
1545 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
1548 CPPFLAGS="$SAVE_CPPFLAGS"
1549 CFLAGS="$SAVE_CFLAGS"
1550 LDFLAGS="$SAVE_LDFLAGS"
1552 AC_SUBST(JAVA_CPPFLAGS)
1553 AC_SUBST(JAVA_CFLAGS)
1554 AC_SUBST(JAVA_LDFLAGS)
1556 AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
1559 # --with-libmemcached {{{
1560 with_libmemcached_cppflags=""
1561 with_libmemcached_ldflags=""
1562 AC_ARG_WITH(libmemcached, [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
1564 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1566 with_libmemcached_cppflags="-I$withval/include"
1567 with_libmemcached_ldflags="-L$withval/lib"
1568 with_libmemcached="yes"
1570 with_libmemcached="$withval"
1574 with_libmemcached="yes"
1576 if test "x$with_libmemcached" = "xyes"
1578 SAVE_CPPFLAGS="$CPPFLAGS"
1579 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1581 AC_CHECK_HEADERS(libmemcached/memcached.h, [with_libmemcached="yes"], [with_libmemcached="no (libmemcached/memcached.h not found)"])
1583 CPPFLAGS="$SAVE_CPPFLAGS"
1585 if test "x$with_libmemcached" = "xyes"
1587 SAVE_CPPFLAGS="$CPPFLAGS"
1588 SAVE_LDFLAGS="$LDFLAGS"
1589 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1590 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
1592 AC_CHECK_LIB(memcached, memcached_create, [with_libmemcached="yes"], [with_libmemcached="no (Symbol 'memcached_create' not found)"])
1594 CPPFLAGS="$SAVE_CPPFLAGS"
1595 LDFLAGS="$SAVE_LDFLAGS"
1597 if test "x$with_libmemcached" = "xyes"
1599 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
1600 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
1601 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
1602 AC_SUBST(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1603 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1604 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LIBS)
1605 AC_DEFINE(HAVE_LIBMEMCACHED, 1, [Define if libmemcached is present and usable.])
1607 AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
1610 # --with-libmysql {{{
1611 with_mysql_config="mysql_config"
1612 with_mysql_cflags=""
1614 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1616 if test "x$withval" = "xno"
1619 else if test "x$withval" = "xyes"
1623 if test -f "$withval" && test -x "$withval";
1625 with_mysql_config="$withval"
1626 else if test -x "$withval/bin/mysql_config"
1628 with_mysql_config="$withval/bin/mysql_config"
1636 if test "x$with_libmysql" = "xyes"
1638 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1639 mysql_config_status=$?
1641 if test $mysql_config_status -ne 0
1643 with_libmysql="no ($with_mysql_config failed)"
1645 SAVE_CPPFLAGS="$CPPFLAGS"
1646 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1649 have_mysql_mysql_h="no"
1650 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
1652 if test "x$have_mysql_h" = "xno"
1654 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
1657 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
1659 with_libmysql="no (mysql.h not found)"
1662 CPPFLAGS="$SAVE_CPPFLAGS"
1665 if test "x$with_libmysql" = "xyes"
1667 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1668 mysql_config_status=$?
1670 if test $mysql_config_status -ne 0
1672 with_libmysql="no ($with_mysql_config failed)"
1674 AC_CHECK_LIB(mysqlclient, mysql_init,
1675 [with_libmysql="yes"],
1676 [with_libmysql="no (symbol 'mysql_init' not found)"],
1680 if test "x$with_libmysql" = "xyes"
1682 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1683 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1684 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1685 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1687 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1690 # --with-libnetlink {{{
1691 with_libnetlink_cflags=""
1692 with_libnetlink_libs="-lnetlink"
1693 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1695 echo "libnetlink: withval = $withval"
1696 if test "x$withval" = "xyes"
1698 with_libnetlink="yes"
1699 else if test "x$withval" = "xno"
1701 with_libnetlink="no"
1703 if test -d "$withval/include"
1705 with_libnetlink_cflags="-I$withval/include"
1706 with_libnetlink_libs="-L$withval/lib -lnetlink"
1707 with_libnetlink="yes"
1709 AC_MSG_ERROR("no such directory: $withval/include")
1714 if test "x$ac_system" = "xLinux"
1716 with_libnetlink="yes"
1718 with_libnetlink="no (Linux only library)"
1721 if test "x$with_libnetlink" = "xyes"
1724 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1726 with_libnetlink="no (libnetlink.h not found)"
1728 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1730 with_libnetlink="yes"
1734 #include <sys/types.h>
1735 #include <asm/types.h>
1736 #include <sys/socket.h>
1737 #include <linux/netlink.h>
1738 #include <linux/rtnetlink.h>])
1739 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1741 #include <sys/types.h>
1742 #include <asm/types.h>
1743 #include <sys/socket.h>])
1747 #include <sys/types.h>
1748 #include <asm/types.h>
1749 #include <sys/socket.h>
1750 #include <linux/netlink.h>
1751 #include <linux/rtnetlink.h>
1755 int retval = TCA_STATS2;
1758 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1763 #include <sys/types.h>
1764 #include <asm/types.h>
1765 #include <sys/socket.h>
1766 #include <linux/netlink.h>
1767 #include <linux/rtnetlink.h>
1771 int retval = TCA_STATS;
1774 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1777 CFLAGS="$SAVE_CFLAGS"
1779 if test "x$with_libnetlink" = "xyes"
1781 AC_CHECK_LIB(netlink, rtnl_open,
1782 [with_libnetlink="yes"],
1783 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1784 [$with_libnetlink_libs])
1786 if test "x$with_libnetlink" = "xyes"
1788 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1789 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1790 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1791 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1793 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1796 # --with-libnetsnmp {{{
1797 with_snmp_config="net-snmp-config"
1800 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1802 if test "x$withval" = "xno"
1804 with_libnetsnmp="no"
1805 else if test "x$withval" = "xyes"
1807 with_libnetsnmp="yes"
1809 if test -x "$withval"
1811 with_snmp_config="$withval"
1812 with_libnetsnmp="yes"
1814 with_snmp_config="$withval/bin/net-snmp-config"
1815 with_libnetsnmp="yes"
1819 [with_libnetsnmp="yes"])
1820 if test "x$with_libnetsnmp" = "xyes"
1822 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
1823 snmp_config_status=$?
1825 if test $snmp_config_status -ne 0
1827 with_libnetsnmp="no ($with_snmp_config failed)"
1829 SAVE_CPPFLAGS="$CPPFLAGS"
1830 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
1832 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1834 CPPFLAGS="$SAVE_CPPFLAGS"
1837 if test "x$with_libnetsnmp" = "xyes"
1839 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
1840 snmp_config_status=$?
1842 if test $snmp_config_status -ne 0
1844 with_libnetsnmp="no ($with_snmp_config failed)"
1846 AC_CHECK_LIB(netsnmp, init_snmp,
1847 [with_libnetsnmp="yes"],
1848 [with_libnetsnmp="no (libnetsnmp not found)"],
1852 if test "x$with_libnetsnmp" = "xyes"
1854 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
1855 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
1856 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
1857 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
1859 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1862 # --with-liboconfig {{{
1863 with_own_liboconfig="no"
1864 liboconfig_LDFLAGS="$LDFLAGS"
1865 liboconfig_CPPFLAGS="$CPPFLAGS"
1866 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1868 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1870 if test -d "$withval/lib"
1872 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1874 if test -d "$withval/include"
1876 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1879 if test "x$withval" = "xno"
1881 AC_MSG_ERROR("liboconfig is required")
1885 with_liboconfig="yes"
1888 save_LDFLAGS="$LDFLAGS"
1889 save_CPPFLAGS="$CPPFLAGS"
1890 LDFLAGS="$liboconfig_LDFLAGS"
1891 CPPFLAGS="$liboconfig_CPPFLAGS"
1892 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1894 with_liboconfig="yes"
1895 with_own_liboconfig="no"
1898 with_liboconfig="yes"
1899 with_own_liboconfig="yes"
1900 LDFLAGS="$save_LDFLAGS"
1901 CPPFLAGS="$save_CPPFLAGS"
1904 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1905 if test "x$with_own_liboconfig" = "xyes"
1907 with_liboconfig="yes (shipped version)"
1911 # --with-liboping {{{
1912 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1914 if test "x$withval" = "xyes"
1917 else if test "x$withval" = "xno"
1922 LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS -I$withval/include"
1923 LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS -L$withval/lib"
1926 [with_liboping="yes"])
1928 SAVE_CPPFLAGS="$CPPFLAGS"
1929 SAVE_LDFLAGS="$LDFLAGS"
1931 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
1932 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
1934 if test "x$with_liboping" = "xyes"
1936 if test "x$LIBOPING_CPPFLAGS" != "x"
1938 AC_MSG_NOTICE([liboping CPPFLAGS: $LIBOPING_CPPFLAGS])
1940 AC_CHECK_HEADERS(oping.h,
1941 [with_liboping="yes"],
1942 [with_liboping="no ('oping.h' not found)"])
1944 if test "x$with_liboping" = "xyes"
1946 if test "x$LIBOPING_LDFLAGS" != "x"
1948 AC_MSG_NOTICE([liboping LDFLAGS: $LIBOPING_LDFLAGS])
1950 AC_CHECK_LIB(oping, ping_construct,
1951 [with_liboping="yes"],
1952 [with_liboping="no (symbol 'ping_construct' not found)"])
1955 CPPFLAGS="$SAVE_CPPFLAGS"
1956 LDFLAGS="$SAVE_LDFLAGS"
1958 if test "x$with_liboping" = "xyes"
1960 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
1961 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
1962 AC_SUBST(BUILD_WITH_LIBOPING_CPPFLAGS)
1963 AC_SUBST(BUILD_WITH_LIBOPING_LDFLAGS)
1965 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1969 with_oracle_cppflags=""
1971 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
1973 if test "x$withval" = "xyes"
1975 if test "x$ORACLE_HOME" = "x"
1977 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
1980 else if test "x$withval" = "xno"
1985 ORACLE_HOME="$withval"
1989 if test "x$ORACLE_HOME" = "x"
1991 with_oracle="no (ORACLE_HOME is not set)"
1996 if test "x$ORACLE_HOME" != "x"
1998 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
2000 if test -e "$ORACLE_HOME/lib/ldflags"
2002 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
2004 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
2005 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
2007 if test "x$with_oracle" = "xyes"
2009 SAVE_CPPFLAGS="$CPPFLAGS"
2010 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2012 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
2014 CPPFLAGS="$SAVE_CPPFLAGS"
2016 if test "x$with_oracle" = "xyes"
2018 SAVE_CPPFLAGS="$CPPFLAGS"
2019 SAVE_LDFLAGS="$LDFLAGS"
2020 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2021 LDFLAGS="$LDFLAGS $with_oracle_libs"
2023 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
2025 CPPFLAGS="$SAVE_CPPFLAGS"
2026 LDFLAGS="$SAVE_LDFLAGS"
2028 if test "x$with_oracle" = "xyes"
2030 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
2031 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
2032 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
2033 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
2037 # --with-libowcapi {{{
2038 with_libowcapi_cppflags=""
2039 with_libowcapi_libs="-lowcapi"
2040 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
2042 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2044 with_libowcapi_cppflags="-I$withval/include"
2045 with_libowcapi_libs="-L$withval/lib -lowcapi"
2046 with_libowcapi="yes"
2048 with_libowcapi="$withval"
2052 with_libowcapi="yes"
2054 if test "x$with_libowcapi" = "xyes"
2056 SAVE_CPPFLAGS="$CPPFLAGS"
2057 CPPFLAGS="$with_libowcapi_cppflags"
2059 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
2061 CPPFLAGS="$SAVE_CPPFLAGS"
2063 if test "x$with_libowcapi" = "xyes"
2065 SAVE_LDFLAGS="$LDFLAGS"
2066 SAVE_CPPFLAGS="$CPPFLAGS"
2067 LDFLAGS="$with_libowcapi_libs"
2068 CPPFLAGS="$with_libowcapi_cppflags"
2070 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
2072 LDFLAGS="$SAVE_LDFLAGS"
2073 CPPFLAGS="$SAVE_CPPFLAGS"
2075 if test "x$with_libowcapi" = "xyes"
2077 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
2078 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
2079 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
2080 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
2084 # --with-libpcap {{{
2085 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
2087 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2089 LDFLAGS="$LDFLAGS -L$withval/lib"
2090 CPPFLAGS="$CPPFLAGS -I$withval/include"
2093 with_libpcap="$withval"
2099 if test "x$with_libpcap" = "xyes"
2101 AC_CHECK_LIB(pcap, pcap_open_live,
2103 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
2104 ], [with_libpcap="no (libpcap not found)"])
2106 if test "x$with_libpcap" = "xyes"
2108 AC_CHECK_HEADERS(pcap.h,
2110 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
2111 ], [with_libpcap="no (pcap.h not found)"])
2113 if test "x$with_libpcap" = "xyes"
2119 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
2120 [Wether or not to use the pcap library])
2121 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
2124 # --with-libperl {{{
2125 perl_interpreter="perl"
2126 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
2128 if test -x "$withval"
2130 perl_interpreter="$withval"
2132 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
2134 LDFLAGS="$LDFLAGS -L$withval/lib"
2135 CPPFLAGS="$CPPFLAGS -I$withval/include"
2136 perl_interpreter="$withval/bin/perl"
2139 with_libperl="$withval"
2146 AC_MSG_CHECKING([for perl])
2147 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
2148 if test -x "$perl_interpreter"
2150 AC_MSG_RESULT([yes ($perl_interpreter)])
2156 AC_SUBST(PERL, "$perl_interpreter")
2158 if test "x$with_libperl" = "xyes" \
2159 && test -n "$perl_interpreter"
2162 SAVE_LDFLAGS=$LDFLAGS
2163 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
2164 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
2165 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
2166 CFLAGS="$CFLAGS $PERL_CFLAGS"
2167 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2169 AC_CACHE_CHECK([for libperl],
2170 [c_cv_have_libperl],
2174 #define PERL_NO_GET_CONTEXT
2181 load_module (PERL_LOADMOD_NOIMPORT,
2182 newSVpv ("Collectd::Plugin::FooBar", 24),
2185 [c_cv_have_libperl="yes"],
2186 [c_cv_have_libperl="no"]
2190 if test "x$c_cv_have_libperl" = "xyes"
2192 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
2193 AC_SUBST(PERL_CFLAGS)
2194 AC_SUBST(PERL_LDFLAGS)
2200 LDFLAGS=$SAVE_LDFLAGS
2201 else if test -z "$perl_interpreter"; then
2202 with_libperl="no (no perl interpreter found)"
2203 c_cv_have_libperl="no"
2205 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
2207 if test "x$with_libperl" = "xyes"
2210 SAVE_LDFLAGS=$LDFLAGS
2211 CFLAGS="$CFLAGS $PERL_CFLAGS"
2212 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2214 AC_CACHE_CHECK([if perl supports ithreads],
2215 [c_cv_have_perl_ithreads],
2223 #if !defined(USE_ITHREADS)
2224 # error "Perl does not support ithreads!"
2225 #endif /* !defined(USE_ITHREADS) */
2228 [c_cv_have_perl_ithreads="yes"],
2229 [c_cv_have_perl_ithreads="no"]
2233 if test "x$c_cv_have_perl_ithreads" = "xyes"
2235 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
2239 LDFLAGS=$SAVE_LDFLAGS
2242 if test "x$with_libperl" = "xyes"
2245 SAVE_LDFLAGS=$LDFLAGS
2246 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
2247 # (see issues #41 and #42)
2248 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
2249 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2251 AC_CACHE_CHECK([for broken Perl_load_module()],
2252 [c_cv_have_broken_perl_load_module],
2256 #define PERL_NO_GET_CONTEXT
2263 load_module (PERL_LOADMOD_NOIMPORT,
2264 newSVpv ("Collectd::Plugin::FooBar", 24),
2267 [c_cv_have_broken_perl_load_module="no"],
2268 [c_cv_have_broken_perl_load_module="yes"]
2273 LDFLAGS=$SAVE_LDFLAGS
2275 AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
2276 test "x$c_cv_have_broken_perl_load_module" = "xyes")
2278 if test "x$with_libperl" = "xyes"
2281 SAVE_LDFLAGS=$LDFLAGS
2282 CFLAGS="$CFLAGS $PERL_CFLAGS"
2283 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2286 [struct mgvtbl.svt_local],
2287 [have_struct_mgvtbl_svt_local="yes"],
2288 [have_struct_mgvtbl_svt_local="no"],
2295 if test "x$have_struct_mgvtbl_svt_local" = "xyes"
2297 AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
2298 [Define if Perl's struct mgvtbl has member svt_local.])
2302 LDFLAGS=$SAVE_LDFLAGS
2307 with_pg_config="pg_config"
2308 with_libpq_includedir=""
2309 with_libpq_libdir=""
2310 with_libpq_cppflags=""
2311 with_libpq_ldflags=""
2312 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2315 if test "x$withval" = "xno"
2318 else if test "x$withval" = "xyes"
2322 if test -f "$withval" && test -x "$withval";
2324 with_pg_config="$withval"
2325 else if test -x "$withval/bin/pg_config"
2327 with_pg_config="$withval/bin/pg_config"
2335 if test "x$with_libpq" = "xyes"
2337 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2340 if test $pg_config_status -eq 0
2342 if test -n "$with_libpq_includedir"; then
2343 for dir in $with_libpq_includedir; do
2344 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2348 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2351 SAVE_CPPFLAGS="$CPPFLAGS"
2352 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2354 AC_CHECK_HEADERS(libpq-fe.h, [],
2355 [with_libpq="no (libpq-fe.h not found)"], [])
2357 CPPFLAGS="$SAVE_CPPFLAGS"
2359 if test "x$with_libpq" = "xyes"
2361 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2364 if test $pg_config_status -eq 0
2366 if test -n "$with_libpq_libdir"; then
2367 for dir in $with_libpq_libdir; do
2368 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2372 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2375 SAVE_LDFLAGS="$LDFLAGS"
2376 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2378 AC_CHECK_LIB(pq, PQconnectdb,
2380 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2382 AC_CHECK_LIB(pq, PQserverVersion,
2384 [with_libpq="no (symbol 'PQserverVersion' not found)"])
2386 LDFLAGS="$SAVE_LDFLAGS"
2388 if test "x$with_libpq" = "xyes"
2390 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2391 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2392 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2393 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2395 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2398 # --with-libpthread {{{
2399 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
2400 [ if test "x$withval" != "xno" \
2401 && test "x$withval" != "xyes"
2403 LDFLAGS="$LDFLAGS -L$withval/lib"
2404 CPPFLAGS="$CPPFLAGS -I$withval/include"
2405 with_libpthread="yes"
2407 if test "x$withval" = "xno"
2409 with_libpthread="no (disabled)"
2412 ], [with_libpthread="yes"])
2413 if test "x$with_libpthread" = "xyes"
2415 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
2418 if test "x$with_libpthread" = "xyes"
2420 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
2422 if test "x$with_libpthread" = "xyes"
2428 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
2429 [Wether or not to use pthread (POSIX threads) library])
2430 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
2434 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
2437 librrd_threadsafe="yes"
2438 librrd_rrdc_update="no"
2439 AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
2440 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
2442 librrd_cflags="-I$withval/include"
2443 librrd_ldflags="-L$withval/lib"
2446 with_librrd="$withval"
2448 ], [with_librrd="yes"])
2449 if test "x$with_librrd" = "xyes"
2451 SAVE_CPPFLAGS="$CPPFLAGS"
2452 SAVE_LDFLAGS="$LDFLAGS"
2454 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2455 LDFLAGS="$LDFLAGS $librrd_ldflags"
2457 AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
2459 CPPFLAGS="$SAVE_CPPFLAGS"
2460 LDFLAGS="$SAVE_LDFLAGS"
2462 if test "x$with_librrd" = "xyes"
2464 SAVE_CPPFLAGS="$CPPFLAGS"
2465 SAVE_LDFLAGS="$LDFLAGS"
2467 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2468 LDFLAGS="$LDFLAGS $librrd_ldflags"
2470 AC_CHECK_LIB(rrd_th, rrd_update_r,
2472 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
2474 [librrd_threadsafe="no"
2475 AC_CHECK_LIB(rrd, rrd_update,
2477 librrd_ldflags="$librrd_ldflags -lrrd -lm"
2479 [with_librrd="no (symbol 'rrd_update' not found)"],
2484 if test "x$librrd_threadsafe" = "xyes"
2486 AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2488 AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2491 CPPFLAGS="$SAVE_CPPFLAGS"
2492 LDFLAGS="$SAVE_LDFLAGS"
2494 if test "x$with_librrd" = "xyes"
2496 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
2497 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
2498 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
2499 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
2501 if test "x$librrd_threadsafe" = "xyes"
2503 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
2507 # --with-libsensors {{{
2508 with_sensors_cflags=""
2509 with_sensors_ldflags=""
2510 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
2512 if test "x$withval" = "xno"
2514 with_libsensors="no"
2516 with_libsensors="yes"
2517 if test "x$withval" != "xyes"
2519 with_sensors_cflags="-I$withval/include"
2520 with_sensors_ldflags="-L$withval/lib"
2521 with_libsensors="yes"
2526 if test "x$ac_system" = "xLinux"
2528 with_libsensors="yes"
2530 with_libsensors="no (Linux only library)"
2533 if test "x$with_libsensors" = "xyes"
2535 SAVE_CPPFLAGS="$CPPFLAGS"
2536 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2538 # AC_CHECK_HEADERS(sensors/sensors.h,
2540 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
2542 # [with_libsensors="no (sensors/sensors.h not found)"])
2543 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
2545 CPPFLAGS="$SAVE_CPPFLAGS"
2547 if test "x$with_libsensors" = "xyes"
2549 SAVE_CPPFLAGS="$CPPFLAGS"
2550 SAVE_LDFLAGS="$LDFLAGS"
2551 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2552 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
2554 AC_CHECK_LIB(sensors, sensors_init,
2556 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
2558 [with_libsensors="no (libsensors not found)"])
2560 CPPFLAGS="$SAVE_CPPFLAGS"
2561 LDFLAGS="$SAVE_LDFLAGS"
2563 if test "x$with_libsensors" = "xyes"
2565 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
2566 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
2567 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
2568 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
2570 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
2573 # --with-libstatgrab {{{
2574 with_libstatgrab_cflags=""
2575 with_libstatgrab_ldflags=""
2576 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
2578 if test "x$withval" != "xno" \
2579 && test "x$withval" != "xyes"
2581 with_libstatgrab_cflags="-I$withval/include"
2582 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
2583 with_libstatgrab="yes"
2584 with_libstatgrab_pkg_config="no"
2586 with_libstatgrab="$withval"
2587 with_libstatgrab_pkg_config="yes"
2591 with_libstatgrab="yes"
2592 with_libstatgrab_pkg_config="yes"
2595 if test "x$with_libstatgrab" = "xyes" \
2596 && test "x$with_libstatgrab_pkg_config" = "xyes"
2598 if test "x$PKG_CONFIG" != "x"
2600 AC_MSG_CHECKING([pkg-config for libstatgrab])
2602 $PKG_CONFIG --exists libstatgrab 2>/dev/null
2605 with_libstatgrab_pkg_config="no"
2606 with_libstatgrab="no ($PKG_CONFIG doesn't know libstatgrab)"
2607 temp_result="not found"
2609 AC_MSG_RESULT([$temp_result])
2611 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
2612 with_libstatgrab_pkg_config="no"
2613 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
2617 if test "x$with_libstatgrab" = "xyes" \
2618 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2619 && test "x$with_libstatgrab_cflags" = "x"
2621 AC_MSG_CHECKING([for libstatgrab CFLAGS])
2622 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
2625 with_libstatgrab_cflags="$temp_result"
2627 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
2628 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
2630 AC_MSG_RESULT([$temp_result])
2633 if test "x$with_libstatgrab" = "xyes" \
2634 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2635 && test "x$with_libstatgrab_ldflags" = "x"
2637 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
2638 temp_result="`$PKG_CONFIG --libs libstatgrab`"
2641 with_libstatgrab_ldflags="$temp_result"
2643 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
2644 temp_result="$PKG_CONFIG --libs libstatgrab failed"
2646 AC_MSG_RESULT([$temp_result])
2649 if test "x$with_libstatgrab" = "xyes"
2651 SAVE_CPPFLAGS="$CPPFLAGS"
2652 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
2654 AC_CHECK_HEADERS(statgrab.h,
2655 [with_libstatgrab="yes"],
2656 [with_libstatgrab="no (statgrab.h not found)"])
2658 CPPFLAGS="$SAVE_CPPFLAGS"
2661 if test "x$with_libstatgrab" = "xyes"
2663 SAVE_CFLAGS="$CFLAGS"
2664 SAVE_LDFLAGS="$LDFLAGS"
2666 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
2667 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
2669 AC_CHECK_LIB(statgrab, sg_init,
2670 [with_libstatgrab="yes"],
2671 [with_libstatgrab="no (symbol sg_init not found)"])
2673 CFLAGS="$SAVE_CFLAGS"
2674 LDFLAGS="$SAVE_LDFLAGS"
2677 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
2678 if test "x$with_libstatgrab" = "xyes"
2680 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
2681 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
2682 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
2683 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
2684 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
2688 # --with-libupsclient {{{
2689 with_libupsclient_config=""
2690 with_libupsclient_cflags=""
2691 with_libupsclient_libs=""
2692 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
2694 if test "x$withval" = "xno"
2696 with_libupsclient="no"
2697 else if test "x$withval" = "xyes"
2699 with_libupsclient="use_pkgconfig"
2701 if test -x "$withval"
2703 with_libupsclient_config="$withval"
2704 with_libupsclient="use_libupsclient_config"
2705 else if test -x "$withval/bin/libupsclient-config"
2707 with_libupsclient_config="$withval/bin/net-snmp-config"
2708 with_libupsclient="use_libupsclient_config"
2710 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
2711 with_libupsclient_cflags="-I$withval/include"
2712 with_libupsclient_libs="-L$withval/lib -lupsclient"
2713 with_libupsclient="yes"
2717 [with_libupsclient="use_pkgconfig"])
2719 # configure using libupsclient-config
2720 if test "x$with_libupsclient" = "xuse_libupsclient_config"
2722 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
2723 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
2726 with_libupsclient="no ($with_libupsclient_config failed)"
2728 with_libupsclient_libs="`$with_libupsclient_config --libs`"
2731 with_libupsclient="no ($with_libupsclient_config failed)"
2734 if test "x$with_libupsclient" = "xuse_libupsclient_config"
2736 with_libupsclient="yes"
2739 # configure using pkg-config
2740 if test "x$with_libupsclient" = "xuse_pkgconfig"
2742 if test "x$PKG_CONFIG" = "x"
2744 with_libupsclient="no (Don't have pkg-config)"
2747 if test "x$with_libupsclient" = "xuse_pkgconfig"
2749 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
2750 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
2753 with_libupsclient="no (pkg-config doesn't know library)"
2756 if test "x$with_libupsclient" = "xuse_pkgconfig"
2758 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
2761 with_libupsclient="no ($PKG_CONFIG failed)"
2763 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
2766 with_libupsclient="no ($PKG_CONFIG failed)"
2769 if test "x$with_libupsclient" = "xuse_pkgconfig"
2771 with_libupsclient="yes"
2774 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
2775 # the actual checks.
2776 if test "x$with_libupsclient" = "xyes"
2778 SAVE_CPPFLAGS="$CPPFLAGS"
2779 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2781 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
2783 CPPFLAGS="$SAVE_CPPFLAGS"
2785 if test "x$with_libupsclient" = "xyes"
2787 SAVE_CPPFLAGS="$CPPFLAGS"
2788 SAVE_LDFLAGS="$LDFLAGS"
2790 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2791 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
2793 AC_CHECK_LIB(upsclient, upscli_connect,
2794 [with_libupsclient="yes"],
2795 [with_libupsclient="no (symbol upscli_connect not found)"])
2797 CPPFLAGS="$SAVE_CPPFLAGS"
2798 LDFLAGS="$SAVE_LDFLAGS"
2800 if test "x$with_libupsclient" = "xyes"
2802 SAVE_CPPFLAGS="$CPPFLAGS"
2803 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2805 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
2806 [#include <stdlib.h>
2808 #include <upsclient.h>])
2810 CPPFLAGS="$SAVE_CPPFLAGS"
2812 if test "x$with_libupsclient" = "xyes"
2814 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
2815 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
2816 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
2817 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
2821 # --with-libxmms {{{
2822 with_xmms_config="xmms-config"
2825 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
2827 if test "x$withval" != "xno" \
2828 && test "x$withval" != "xyes"
2830 if test -f "$withval" && test -x "$withval";
2832 with_xmms_config="$withval"
2833 else if test -x "$withval/bin/xmms-config"
2835 with_xmms_config="$withval/bin/xmms-config"
2838 else if test "x$withval" = "xno"
2848 if test "x$with_libxmms" = "xyes"
2850 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
2851 xmms_config_status=$?
2853 if test $xmms_config_status -ne 0
2858 if test "x$with_libxmms" = "xyes"
2860 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
2861 xmms_config_status=$?
2863 if test $xmms_config_status -ne 0
2868 if test "x$with_libxmms" = "xyes"
2870 AC_CHECK_LIB(xmms, xmms_remote_get_info,
2872 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
2873 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
2874 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
2875 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
2882 with_libxmms_numeric=0
2883 if test "x$with_libxmms" = "xyes"
2885 with_libxmms_numeric=1
2887 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
2888 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
2891 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
2892 with_libxml2="no (pkg-config isn't available)"
2893 with_libxml2_cflags=""
2894 with_libxml2_ldflags=""
2895 with_libvirt="no (pkg-config isn't available)"
2896 with_libvirt_cflags=""
2897 with_libvirt_ldflags=""
2898 if test "x$PKG_CONFIG" != "x"
2900 pkg-config --exists 'libxml-2.0' 2>/dev/null
2905 with_libxml2="no (pkg-config doesn't know library)"
2908 pkg-config --exists libvirt 2>/dev/null
2913 with_libvirt="no (pkg-config doesn't know library)"
2916 if test "x$with_libxml2" = "xyes"
2918 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
2923 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
2929 if test "x$with_libxml2" = "xyes"
2931 SAVE_CPPFLAGS="$CPPFLAGS"
2932 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
2934 AC_CHECK_HEADERS(libxml/parser.h, [],
2935 [with_libxml2="no (libxml/parser.h not found)"])
2937 CPPFLAGS="$SAVE_CPPFLAGS"
2939 if test "x$with_libxml2" = "xyes"
2941 SAVE_CFLAGS="$CFLAGS"
2942 SAVE_LDFLAGS="$LDFLAGS"
2944 CFLAGS="$CFLAGS $with_libxml2_cflags"
2945 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
2947 AC_CHECK_LIB(xml2, xmlXPathEval,
2948 [with_libxml2="yes"],
2949 [with_libxml2="no (symbol xmlXPathEval not found)"])
2951 CFLAGS="$SAVE_CFLAGS"
2952 LDFLAGS="$SAVE_LDFLAGS"
2954 dnl Add the right compiler flags and libraries.
2955 if test "x$with_libxml2" = "xyes"; then
2956 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
2957 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
2958 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
2959 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
2961 if test "x$with_libvirt" = "xyes"
2963 with_libvirt_cflags="`pkg-config --cflags libvirt`"
2968 with_libvirt_ldflags="`pkg-config --libs libvirt`"
2974 if test "x$with_libvirt" = "xyes"
2976 SAVE_CPPFLAGS="$CPPFLAGS"
2977 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
2979 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
2980 [with_libvirt="no (libvirt/libvirt.h not found)"])
2982 CPPFLAGS="$SAVE_CPPFLAGS"
2984 if test "x$with_libvirt" = "xyes"
2986 SAVE_CFLAGS="$CFLAGS"
2987 SAVE_LDFLAGS="$LDFLAGS"
2989 CFLAGS="$CFLAGS $with_libvirt_cflags"
2990 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
2992 AC_CHECK_LIB(virt, virDomainBlockStats,
2993 [with_libvirt="yes"],
2994 [with_libvirt="no (symbol virDomainBlockStats not found)"])
2996 CFLAGS="$SAVE_CFLAGS"
2997 LDFLAGS="$SAVE_LDFLAGS"
2999 dnl Add the right compiler flags and libraries.
3000 if test "x$with_libvirt" = "xyes"; then
3001 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
3002 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
3003 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
3004 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
3008 # $PKG_CONFIG --exists OpenIPMIpthread {{{
3009 with_libopenipmipthread="yes"
3010 with_libopenipmipthread_cflags=""
3011 with_libopenipmipthread_libs=""
3013 AC_MSG_CHECKING([for pkg-config])
3015 if test "x$PKG_CONFIG" = "x"
3017 with_libopenipmipthread="no"
3020 temp_result="$PKG_CONFIG"
3022 AC_MSG_RESULT([$temp_result])
3024 if test "x$with_libopenipmipthread" = "xyes"
3026 AC_MSG_CHECKING([for libOpenIPMIpthread])
3027 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
3030 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
3032 AC_MSG_RESULT([$with_libopenipmipthread])
3035 if test "x$with_libopenipmipthread" = "xyes"
3037 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
3038 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
3041 with_libopenipmipthread_cflags="$temp_result"
3043 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
3044 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
3046 AC_MSG_RESULT([$temp_result])
3049 if test "x$with_libopenipmipthread" = "xyes"
3051 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
3052 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
3055 with_libopenipmipthread_ldflags="$temp_result"
3057 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
3058 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
3060 AC_MSG_RESULT([$temp_result])
3063 if test "x$with_libopenipmipthread" = "xyes"
3065 SAVE_CPPFLAGS="$CPPFLAGS"
3066 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
3068 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
3069 [with_libopenipmipthread="yes"],
3070 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
3071 [#include <OpenIPMI/ipmiif.h>
3072 #include <OpenIPMI/ipmi_err.h>
3073 #include <OpenIPMI/ipmi_posix.h>
3074 #include <OpenIPMI/ipmi_conn.h>
3077 CPPFLAGS="$SAVE_CPPFLAGS"
3080 if test "x$with_libopenipmipthread" = "xyes"
3082 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
3083 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
3084 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
3085 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
3089 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
3090 [with_libnotify="yes"],
3091 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
3093 # Check for enabled/disabled features
3096 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
3097 # ------------------------------------------------------------
3099 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
3104 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
3109 m4_define([EnDis],[disabled])dnl
3110 m4_define([YesNo],[no])dnl
3116 m4_define([EnDis],[enabled])dnl
3117 m4_define([YesNo],[yes])dnl
3120 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
3124 m4_if([$3], [feature], [],
3128 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
3134 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
3136 enable_$1='[YesNo]'dnl
3138 if test "x$enable_$1" = "xno"
3142 if test "x$enable_$1" = "xyes"
3146 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
3151 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
3152 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
3154 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
3156 # AC_PLUGIN(name, default, info)
3157 # ------------------------------------------------------------
3163 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
3165 if test "x$enableval" = "xyes"
3173 if test "x$2" = "xyes"
3180 if test "x$enable_plugin" = "xyes"
3182 if test "x$2" = "xyes"
3184 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
3185 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
3186 dependency_error="yes"
3187 enable_plugin="no (dependency error)"
3190 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
3191 enable_$1="$enable_plugin"
3193 )# AC_PLUGIN(name, default, info)
3195 m4_divert_once([HELP_ENABLE], [
3196 collectd features:])
3197 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
3198 AC_COLLECTD([debug], [enable], [feature], [debugging])
3199 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
3200 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
3202 dependency_error="no"
3206 plugin_conntrack="no"
3212 plugin_interface="no"
3219 plugin_multimeter="no"
3223 plugin_processes="no"
3224 plugin_protocols="no"
3228 plugin_tcpconns="no"
3235 plugin_wireless="no"
3238 if test "x$ac_system" = "xLinux"
3240 plugin_battery="yes"
3241 plugin_conntrack="yes"
3243 plugin_cpufreq="yes"
3245 plugin_entropy="yes"
3246 plugin_interface="yes"
3251 plugin_fscache="yes"
3252 plugin_processes="yes"
3253 plugin_protocols="yes"
3256 plugin_tcpconns="yes"
3257 plugin_thermal="yes"
3260 plugin_vserver="yes"
3261 plugin_wireless="yes"
3263 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
3269 if test "x$ac_system" = "xOpenBSD"
3271 plugin_tcpconns="yes"
3275 if test "x$with_libiokit" = "xyes"
3277 plugin_battery="yes"
3282 if test "x$with_kstat" = "xyes"
3287 if test "x$with_devinfo$with_kstat" = "xyesyes"
3291 plugin_interface="yes"
3296 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
3302 if test "x$with_libstatgrab" = "xyes"
3306 plugin_interface="yes"
3313 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
3319 if test "x$with_libopenipmipthread" = "xyes"
3324 if test "x$have_processor_info" = "xyes"
3328 if test "x$have_sysctl" = "xyes"
3335 if test "x$have_sysctlbyname" = "xyes"
3339 plugin_tcpconns="yes"
3342 if test "x$have_statfs" = "xyes"
3346 if test "x$have_statvfs" = "xyes"
3351 if test "x$have_getifaddrs" = "xyes"
3353 plugin_interface="yes"
3356 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
3358 plugin_libvirt="yes"
3361 if test "x$have_getloadavg" = "xyes"
3366 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
3371 # Mac OS X memory interface
3372 if test "x$have_host_statistics" = "xyes"
3377 if test "x$have_termios_h" = "xyes"
3379 plugin_multimeter="yes"
3383 if test "x$have_thread_info" = "xyes"
3385 plugin_processes="yes"
3388 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
3390 plugin_processes="yes"
3393 if test "x$with_kvm_getswapinfo" = "xyes"
3398 if test "x$have_swapctl" = "xyes"
3403 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
3405 plugin_tcpconns="yes"
3408 if test "x$have_getutent" = "xyes"
3412 if test "x$have_getutxent" = "xyes"
3417 m4_divert_once([HELP_ENABLE], [
3420 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
3421 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
3422 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
3423 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
3424 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
3425 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
3426 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
3427 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
3428 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
3429 AC_PLUGIN([csv], [yes], [CSV output plugin])
3430 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
3431 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
3432 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
3433 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
3434 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
3435 AC_PLUGIN([email], [yes], [EMail statistics])
3436 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
3437 AC_PLUGIN([exec], [yes], [Execution of external programs])
3438 AC_PLUGIN([filecount], [yes], [Count files in directories])
3439 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
3440 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
3441 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
3442 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
3443 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
3444 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
3445 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
3446 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
3447 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
3448 AC_PLUGIN([load], [$plugin_load], [System load])
3449 AC_PLUGIN([logfile], [yes], [File logging plugin])
3450 AC_PLUGIN([match_regex], [yes], [The regex match])
3451 AC_PLUGIN([match_timediff], [yes], [The timediff match])
3452 AC_PLUGIN([match_value], [yes], [The value match])
3453 AC_PLUGIN([mbmon], [yes], [Query mbmond])
3454 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
3455 AC_PLUGIN([memcached], [yes], [memcached statistics])
3456 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
3457 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
3458 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
3459 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
3460 AC_PLUGIN([network], [yes], [Network communication plugin])
3461 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
3462 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
3463 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
3464 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
3465 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
3466 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
3467 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
3468 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
3469 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
3470 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
3471 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
3472 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
3473 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
3474 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
3475 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
3476 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
3477 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
3478 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
3479 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
3480 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
3481 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
3482 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
3483 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
3484 AC_PLUGIN([table], [yes], [Parsing of tabular data])
3485 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
3486 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
3487 AC_PLUGIN([target_notification], [yes], [The notification target])
3488 AC_PLUGIN([target_replace], [yes], [The replace target])
3489 AC_PLUGIN([target_set], [yes], [The set target])
3490 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
3491 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
3492 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
3493 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
3494 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
3495 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
3496 AC_PLUGIN([users], [$plugin_users], [User statistics])
3497 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
3498 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
3499 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
3500 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
3501 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
3503 dnl Default configuration file
3504 # Load either syslog or logfile
3505 LOAD_PLUGIN_SYSLOG=""
3506 LOAD_PLUGIN_LOGFILE=""
3508 AC_MSG_CHECKING([which default log plugin to load])
3509 default_log_plugin="none"
3510 if test "x$enable_syslog" = "xyes"
3512 default_log_plugin="syslog"
3514 LOAD_PLUGIN_SYSLOG="##"
3517 if test "x$enable_logfile" = "xyes"
3519 if test "x$default_log_plugin" = "xnone"
3521 default_log_plugin="logfile"
3523 LOAD_PLUGIN_LOGFILE="#"
3526 LOAD_PLUGIN_LOGFILE="##"
3528 AC_MSG_RESULT([$default_log_plugin])
3530 AC_SUBST(LOAD_PLUGIN_SYSLOG)
3531 AC_SUBST(LOAD_PLUGIN_LOGFILE)
3533 DEFAULT_LOG_LEVEL="info"
3534 if test "x$enable_debug" = "xyes"
3536 DEFAULT_LOG_LEVEL="debug"
3538 AC_SUBST(DEFAULT_LOG_LEVEL)
3540 # Load only one of rrdtool, network, csv in the default config.
3541 LOAD_PLUGIN_RRDTOOL=""
3542 LOAD_PLUGIN_NETWORK=""
3545 AC_MSG_CHECKING([which default write plugin to load])
3546 default_write_plugin="none"
3547 if test "x$enable_rrdtool" = "xyes"
3549 default_write_plugin="rrdtool"
3551 LOAD_PLUGIN_RRDTOOL="##"
3554 if test "x$enable_network" = "xyes"
3556 if test "x$default_write_plugin" = "xnone"
3558 default_write_plugin="network"
3560 LOAD_PLUGIN_NETWORK="#"
3563 LOAD_PLUGIN_NETWORK="##"
3566 if test "x$enable_csv" = "xyes"
3568 if test "x$default_write_plugin" = "xnone"
3570 default_write_plugin="csv"
3575 LOAD_PLUGIN_CSV="##"
3577 AC_MSG_RESULT([$default_write_plugin])
3579 AC_SUBST(LOAD_PLUGIN_RRDTOOL)
3580 AC_SUBST(LOAD_PLUGIN_NETWORK)
3581 AC_SUBST(LOAD_PLUGIN_CSV)
3584 if test "x$ac_system" = "xLinux" \
3585 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
3587 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
3591 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
3593 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3595 PERL_BINDINGS_OPTIONS="$withval"
3596 with_perl_bindings="yes"
3598 PERL_BINDINGS_OPTIONS=""
3599 with_perl_bindings="$withval"
3603 PERL_BINDINGS_OPTIONS=""
3604 if test -n "$perl_interpreter"
3606 with_perl_bindings="yes"
3608 with_perl_bindings="no (no perl interpreter found)"
3611 if test "x$with_perl_bindings" = "xyes"
3613 PERL_BINDINGS="perl"
3617 AC_SUBST(PERL_BINDINGS)
3618 AC_SUBST(PERL_BINDINGS_OPTIONS)
3620 dnl libcollectdclient
3621 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
3622 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
3623 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
3625 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
3627 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
3629 AC_SUBST(LCC_VERSION_MAJOR)
3630 AC_SUBST(LCC_VERSION_MINOR)
3631 AC_SUBST(LCC_VERSION_PATCH)
3632 AC_SUBST(LCC_VERSION_EXTRA)
3633 AC_SUBST(LCC_VERSION_STRING)
3635 AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
3637 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile)
3639 if test "x$with_librrd" = "xyes" \
3640 && test "x$librrd_threadsafe" != "xyes"
3642 with_librrd="yes (warning: librrd is not thread-safe)"
3645 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes"
3647 with_libiptc="yes (shipped version)"
3650 if test "x$with_libperl" = "xyes"
3652 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
3654 enable_perl="no (needs libperl)"
3657 if test "x$with_perl_bindings" = "xyes" \
3658 && test "x$PERL_BINDINGS_OPTIONS" != "x"
3660 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
3667 libcurl . . . . . . . $with_libcurl
3668 libdbi . . . . . . . $with_libdbi
3669 libesmtp . . . . . . $with_libesmtp
3670 libgcrypt . . . . . . $with_libgcrypt
3671 libiokit . . . . . . $with_libiokit
3672 libiptc . . . . . . . $with_libiptc
3673 libjvm . . . . . . . $with_java
3674 libkstat . . . . . . $with_kstat
3675 libkvm . . . . . . . $with_libkvm
3676 libmysql . . . . . . $with_libmysql
3677 libnetlink . . . . . $with_libnetlink
3678 libnetsnmp . . . . . $with_libnetsnmp
3679 libnotify . . . . . . $with_libnotify
3680 liboconfig . . . . . $with_liboconfig
3681 libopenipmi . . . . . $with_libopenipmipthread
3682 liboping . . . . . . $with_liboping
3683 libpcap . . . . . . . $with_libpcap
3684 libperl . . . . . . . $with_libperl
3685 libpq . . . . . . . . $with_libpq
3686 libpthread . . . . . $with_libpthread
3687 librrd . . . . . . . $with_librrd
3688 libsensors . . . . . $with_libsensors
3689 libstatgrab . . . . . $with_libstatgrab
3690 libupsclient . . . . $with_libupsclient
3691 libvirt . . . . . . . $with_libvirt
3692 libxml2 . . . . . . . $with_libxml2
3693 libxmms . . . . . . . $with_libxmms
3694 oracle . . . . . . . $with_oracle
3697 daemon mode . . . . . $enable_daemon
3698 debug . . . . . . . . $enable_debug
3701 perl . . . . . . . . $with_perl_bindings
3704 apache . . . . . . . $enable_apache
3705 apcups . . . . . . . $enable_apcups
3706 apple_sensors . . . . $enable_apple_sensors
3707 ascent . . . . . . . $enable_ascent
3708 battery . . . . . . . $enable_battery
3709 bind . . . . . . . . $enable_bind
3710 conntrack . . . . . . $enable_conntrack
3711 cpu . . . . . . . . . $enable_cpu
3712 cpufreq . . . . . . . $enable_cpufreq
3713 csv . . . . . . . . . $enable_csv
3714 curl . . . . . . . . $enable_curl
3715 dbi . . . . . . . . . $enable_dbi
3716 df . . . . . . . . . $enable_df
3717 disk . . . . . . . . $enable_disk
3718 dns . . . . . . . . . $enable_dns
3719 email . . . . . . . . $enable_email
3720 entropy . . . . . . . $enable_entropy
3721 exec . . . . . . . . $enable_exec
3722 filecount . . . . . . $enable_filecount
3723 gmond . . . . . . . . $enable_gmond
3724 hddtemp . . . . . . . $enable_hddtemp
3725 interface . . . . . . $enable_interface
3726 ipmi . . . . . . . . $enable_ipmi
3727 iptables . . . . . . $enable_iptables
3728 ipvs . . . . . . . . $enable_ipvs
3729 irq . . . . . . . . . $enable_irq
3730 java . . . . . . . . $enable_java
3731 libvirt . . . . . . . $enable_libvirt
3732 load . . . . . . . . $enable_load
3733 logfile . . . . . . . $enable_logfile
3734 match_regex . . . . . $enable_match_regex
3735 match_timediff . . . $enable_match_timediff
3736 match_value . . . . . $enable_match_value
3737 mbmon . . . . . . . . $enable_mbmon
3738 memcachec . . . . . . $enable_memcachec
3739 memcached . . . . . . $enable_memcached
3740 memory . . . . . . . $enable_memory
3741 multimeter . . . . . $enable_multimeter
3742 mysql . . . . . . . . $enable_mysql
3743 netlink . . . . . . . $enable_netlink
3744 network . . . . . . . $enable_network
3745 nfs . . . . . . . . . $enable_nfs
3746 fscache . . . . . . . $enable_fscache
3747 nginx . . . . . . . . $enable_nginx
3748 notify_desktop . . . $enable_notify_desktop
3749 notify_email . . . . $enable_notify_email
3750 ntpd . . . . . . . . $enable_ntpd
3751 nut . . . . . . . . . $enable_nut
3752 onewire . . . . . . . $enable_onewire
3753 openvpn . . . . . . . $enable_openvpn
3754 oracle . . . . . . . $enable_oracle
3755 perl . . . . . . . . $enable_perl
3756 ping . . . . . . . . $enable_ping
3757 postgresql . . . . . $enable_postgresql
3758 powerdns . . . . . . $enable_powerdns
3759 processes . . . . . . $enable_processes
3760 protocols . . . . . . $enable_protocols
3761 rrdcached . . . . . . $enable_rrdcached
3762 rrdtool . . . . . . . $enable_rrdtool
3763 sensors . . . . . . . $enable_sensors
3764 serial . . . . . . . $enable_serial
3765 snmp . . . . . . . . $enable_snmp
3766 swap . . . . . . . . $enable_swap
3767 syslog . . . . . . . $enable_syslog
3768 table . . . . . . . . $enable_table
3769 tail . . . . . . . . $enable_tail
3770 tape . . . . . . . . $enable_tape
3771 target_notification . $enable_target_notification
3772 target_replace . . . $enable_target_replace
3773 target_set . . . . . $enable_target_set
3774 tcpconns . . . . . . $enable_tcpconns
3775 teamspeak2 . . . . . $enable_teamspeak2
3776 ted . . . . . . . . . $enable_ted
3777 thermal . . . . . . . $enable_thermal
3778 unixsock . . . . . . $enable_unixsock
3779 uptime . . . . . . . $enable_uptime
3780 users . . . . . . . . $enable_users
3781 uuid . . . . . . . . $enable_uuid
3782 vmem . . . . . . . . $enable_vmem
3783 vserver . . . . . . . $enable_vserver
3784 wireless . . . . . . $enable_wireless
3785 xmms . . . . . . . . $enable_xmms
3789 if test "x$dependency_error" = "xyes"; then
3790 AC_MSG_ERROR("Some plugins are missing dependencies - see above summary for details")
3793 # vim: set fdm=marker :