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)
69 # Checks for header files.
75 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)
78 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
83 # include <sys/types.h>
86 AC_CHECK_HEADERS(netinet/in.h, [], [],
91 # include <sys/types.h>
93 #if HAVE_NETINET_IN_SYSTM_H
94 # include <netinet/in_systm.h>
97 AC_CHECK_HEADERS(netinet/ip.h, [], [],
102 # include <sys/types.h>
104 #if HAVE_NETINET_IN_SYSTM_H
105 # include <netinet/in_systm.h>
107 #if HAVE_NETINET_IN_H
108 # include <netinet/in.h>
111 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
116 # include <sys/types.h>
118 #if HAVE_NETINET_IN_SYSTM_H
119 # include <netinet/in_systm.h>
121 #if HAVE_NETINET_IN_H
122 # include <netinet/in.h>
124 #if HAVE_NETINET_IP_H
125 # include <netinet/ip.h>
128 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
133 # include <sys/types.h>
135 #if HAVE_NETINET_IN_SYSTM_H
136 # include <netinet/in_systm.h>
138 #if HAVE_NETINET_IN_H
139 # include <netinet/in.h>
141 #if HAVE_NETINET_IP_H
142 # include <netinet/ip.h>
145 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
150 # include <sys/types.h>
152 #if HAVE_NETINET_IN_SYSTM_H
153 # include <netinet/in_systm.h>
155 #if HAVE_NETINET_IN_H
156 # include <netinet/in.h>
159 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
164 # include <sys/types.h>
166 #if HAVE_NETINET_IN_SYSTM_H
167 # include <netinet/in_systm.h>
169 #if HAVE_NETINET_IN_H
170 # include <netinet/in.h>
172 #if HAVE_NETINET_IP6_H
173 # include <netinet/ip6.h>
176 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
181 # include <sys/types.h>
183 #if HAVE_NETINET_IN_SYSTM_H
184 # include <netinet/in_systm.h>
186 #if HAVE_NETINET_IN_H
187 # include <netinet/in.h>
189 #if HAVE_NETINET_IP_H
190 # include <netinet/ip.h>
193 AC_CHECK_HEADERS(netinet/udp.h, [], [],
198 # include <sys/types.h>
200 #if HAVE_NETINET_IN_SYSTM_H
201 # include <netinet/in_systm.h>
203 #if HAVE_NETINET_IN_H
204 # include <netinet/in.h>
206 #if HAVE_NETINET_IP_H
207 # include <netinet/ip.h>
212 AC_CHECK_HEADERS(sys/dkstat.h)
213 if test "x$ac_system" = "xDarwin"
215 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)
216 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
218 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
221 # include <sys/types.h>
224 # include <sys/param.h>
229 AC_CHECK_HEADERS(linux/major.h libgen.h)
231 # For the battery plugin
232 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
234 #if HAVE_IOKIT_IOKITLIB_H
235 # include <IOKit/IOKitLib.h>
237 #if HAVE_IOKIT_IOTYPES_H
238 # include <IOKit/IOTypes.h>
242 # For the swap module
243 AC_CHECK_HEADERS(sys/swap.h, [], [],
246 # include <sys/types.h>
249 # include <sys/param.h>
254 # For the processes plugin
256 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
258 # For interface plugin
259 AC_CHECK_HEADERS(ifaddrs.h)
260 AC_CHECK_HEADERS(net/if.h, [], [],
263 # include <sys/types.h>
265 #if HAVE_SYS_SOCKET_H
266 # include <sys/socket.h>
269 AC_CHECK_HEADERS(linux/if.h, [], [],
272 # include <sys/types.h>
274 #if HAVE_SYS_SOCKET_H
275 # include <sys/socket.h>
278 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
281 # include <sys/types.h>
283 #if HAVE_SYS_SOCKET_H
284 # include <sys/socket.h>
287 # include <linux/if.h>
292 have_net_ip_vs_h="no"
294 if test "x$ac_system" = "xLinux"
297 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
299 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
300 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
306 AC_CHECK_HEADERS(sys/ucred.h, [], [],
309 # include <sys/types.h>
312 # include <sys/param.h>
316 # For mount interface
317 AC_CHECK_HEADERS(sys/mount.h, [], [],
320 # include <sys/types.h>
323 # include <sys/param.h>
327 # For the email plugin
328 AC_CHECK_HEADERS(linux/un.h, [], [],
330 #if HAVE_SYS_SOCKET_H
331 # include <sys/socket.h>
335 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)
338 AC_CHECK_HEADERS(arpa/nameser.h)
339 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
341 #if HAVE_ARPA_NAMESER_H
342 # include <arpa/nameser.h>
346 AC_CHECK_HEADERS(net/if_arp.h, [], [],
347 [#if HAVE_SYS_SOCKET_H
348 # include <sys/socket.h>
351 AC_CHECK_HEADERS(net/ppp_defs.h)
352 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
353 [#if HAVE_NET_PPP_DEFS_H
354 # include <net/ppp_defs.h>
357 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
362 # include <sys/types.h>
364 #if HAVE_SYS_SOCKET_H
365 # include <sys/socket.h>
370 #if HAVE_NETINET_IN_H
371 # include <netinet/in.h>
375 # For the multimeter plugin
377 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
380 # Checks for typedefs, structures, and compiler characteristics.
389 # Checks for library functions.
391 AC_PROG_GCC_TRADITIONAL
392 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog)
396 AC_CACHE_CHECK([for strtok_r],
397 [have_strtok_r_default],
406 char buffer[] = "foo,bar,baz";
413 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
416 printf ("token = %s;\n", token);
419 [have_strtok_r_default="yes"],
420 [have_strtok_r_default="no"]
424 if test "x$have_strtok_r_default" = "xno"
426 SAVE_CFLAGS="$CFLAGS"
427 CFLAGS="$CFLAGS -D_REENTRANT=1"
429 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
430 [have_strtok_r_reentrant],
439 char buffer[] = "foo,bar,baz";
446 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
449 printf ("token = %s;\n", token);
452 [have_strtok_r_reentrant="yes"],
453 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
458 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
460 socket_needs_socket="no"
461 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
462 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
464 nanosleep_needs_rt="no"
465 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
466 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
468 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
469 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
470 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
471 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
472 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
473 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
474 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
475 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
476 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
477 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
480 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
483 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
485 if test "x$withval" = "xno"; then
487 else if test "x$withval" = "xyes"; then
494 if test "x$nan_type" = "xnone"; then
495 AC_CACHE_CHECK([whether NAN is defined by default],
502 static float foo = NAN;
510 [have_nan_default="yes"],
511 [have_nan_default="no"]
514 if test "x$have_nan_default" = "xyes"
519 if test "x$nan_type" = "xnone"; then
520 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
526 #define __USE_ISOC99 1
528 static float foo = NAN;
536 [have_nan_isoc="yes"],
540 if test "x$have_nan_isoc" = "xyes"
545 if test "x$nan_type" = "xnone"; then
546 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
556 #define NAN (0.0 / 0.0)
558 # define isnan(f) ((f) != (f))
560 static float foo = NAN;
568 [have_nan_zero="yes"],
572 if test "x$have_nan_zero" = "xyes"
578 if test "x$nan_type" = "xdefault"; then
579 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
580 [Define if NAN is defined by default and can initialize static variables.])
581 else if test "x$nan_type" = "xisoc99"; then
582 AC_DEFINE(NAN_STATIC_ISOC, 1,
583 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
584 else if test "x$nan_type" = "xzero"; then
585 AC_DEFINE(NAN_ZERO_ZERO, 1,
586 [Define if NAN can be defined as (0.0 / 0.0)])
588 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
591 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
593 if test "x$withval" = "xnothing"; then
594 fp_layout_type="nothing"
595 else if test "x$withval" = "xendianflip"; then
596 fp_layout_type="endianflip"
597 else if test "x$withval" = "xintswap"; then
598 fp_layout_type="intswap"
600 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
603 [fp_layout_type="unknown"])
605 if test "x$fp_layout_type" = "xunknown"; then
606 AC_CACHE_CHECK([if doubles are stored in x86 representation],
607 [fp_layout_need_nothing],
618 # include <stdbool.h>
628 memcpy ((void *) &i0, (void *) &d, 8);
631 memcpy ((void *) c, (void *) &i1, 8);
633 if ((c[0] == 0x2f) && (c[1] == 0x25)
634 && (c[2] == 0xc0) && (c[3] == 0xc7)
635 && (c[4] == 0x43) && (c[5] == 0x2b)
636 && (c[6] == 0x1f) && (c[7] == 0x5b))
641 [fp_layout_need_nothing="yes"],
642 [fp_layout_need_nothing="no"]
645 if test "x$fp_layout_need_nothing" = "xyes"; then
646 fp_layout_type="nothing"
649 if test "x$fp_layout_type" = "xunknown"; then
650 AC_CACHE_CHECK([if endianflip converts to x86 representation],
651 [fp_layout_need_endianflip],
662 # include <stdbool.h>
664 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
665 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
666 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
667 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
668 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
669 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
670 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
671 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
680 memcpy ((void *) &i0, (void *) &d, 8);
682 i1 = endianflip (i0);
683 memcpy ((void *) c, (void *) &i1, 8);
685 if ((c[0] == 0x2f) && (c[1] == 0x25)
686 && (c[2] == 0xc0) && (c[3] == 0xc7)
687 && (c[4] == 0x43) && (c[5] == 0x2b)
688 && (c[6] == 0x1f) && (c[7] == 0x5b))
693 [fp_layout_need_endianflip="yes"],
694 [fp_layout_need_endianflip="no"]
697 if test "x$fp_layout_need_endianflip" = "xyes"; then
698 fp_layout_type="endianflip"
701 if test "x$fp_layout_type" = "xunknown"; then
702 AC_CACHE_CHECK([if intswap converts to x86 representation],
703 [fp_layout_need_intswap],
714 # include <stdbool.h>
716 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
717 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
726 memcpy ((void *) &i0, (void *) &d, 8);
729 memcpy ((void *) c, (void *) &i1, 8);
731 if ((c[0] == 0x2f) && (c[1] == 0x25)
732 && (c[2] == 0xc0) && (c[3] == 0xc7)
733 && (c[4] == 0x43) && (c[5] == 0x2b)
734 && (c[6] == 0x1f) && (c[7] == 0x5b))
739 [fp_layout_need_intswap="yes"],
740 [fp_layout_need_intswap="no"]
743 if test "x$fp_layout_need_intswap" = "xyes"; then
744 fp_layout_type="intswap"
748 if test "x$fp_layout_type" = "xnothing"; then
749 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
750 [Define if doubles are stored in x86 representation.])
751 else if test "x$fp_layout_type" = "xendianflip"; then
752 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
753 [Define if endianflip is needed to convert to x86 representation.])
754 else if test "x$fp_layout_type" = "xintswap"; then
755 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
756 [Define if intswap is needed to convert to x86 representation.])
758 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
762 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
764 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
766 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
769 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
770 if test "x$have_getmntent" = "xno"; then
771 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
773 if test "x$have_getmntent" = "xno"; then
774 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
776 if test "x$have_getmntent" = "xno"; then
777 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
780 if test "x$have_getmntent" = "xc"; then
781 AC_CACHE_CHECK([whether getmntent takes one argument],
782 [have_one_getmntent],
784 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
786 #include "$srcdir/src/utils_mount.h"]],
790 fh = setmntent ("/etc/mtab", "r");
794 [have_one_getmntent="yes"],
795 [have_one_getmntent="no"]
798 AC_CACHE_CHECK([whether getmntent takes two arguments],
799 [have_two_getmntent],
801 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
802 #include <sys/mnttab.h>
803 #include "$srcdir/src/utils_mount.h"]],
808 fh = fopen ("/etc/mnttab", "r");
809 status = getmntent (fh, &mt);
812 [have_two_getmntent="yes"],
813 [have_two_getmntent="no"]
818 # Check for different versions of `getmntent' here..
820 if test "x$have_getmntent" = "xc"; then
821 if test "x$have_one_getmntent" = "xyes"; then
822 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
823 [Define if the function getmntent exists and takes one argument.])
825 if test "x$have_two_getmntent" = "xyes"; then
826 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
827 [Define if the function getmntent exists and takes two arguments.])
830 if test "x$have_getmntent" = "xsun"; then
831 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
832 [Define if the function getmntent exists. It's the version from libsun.])
834 if test "x$have_getmntent" = "xseq"; then
835 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
836 [Define if the function getmntent exists. It's the version from libseq.])
838 if test "x$have_getmntent" = "xgen"; then
839 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
840 [Define if the function getmntent exists. It's the version from libgen.])
843 # Check for structures
844 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
845 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
848 #include <sys/types.h>
849 #include <sys/socket.h>
852 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
853 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
856 #include <sys/types.h>
857 #include <sys/socket.h>
858 #include <linux/if.h>
859 #include <linux/netdevice.h>
862 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
867 # include <sys/types.h>
869 #if HAVE_NETINET_IN_SYSTM_H
870 # include <netinet/in_systm.h>
872 #if HAVE_NETINET_IN_H
873 # include <netinet/in.h>
875 #if HAVE_NETINET_IP_H
876 # include <netinet/ip.h>
878 #if HAVE_NETINET_UDP_H
879 # include <netinet/udp.h>
882 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
887 # include <sys/types.h>
889 #if HAVE_NETINET_IN_SYSTM_H
890 # include <netinet/in_systm.h>
892 #if HAVE_NETINET_IN_H
893 # include <netinet/in.h>
895 #if HAVE_NETINET_IP_H
896 # include <netinet/ip.h>
898 #if HAVE_NETINET_UDP_H
899 # include <netinet/udp.h>
903 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
913 # Checks for libraries begin here
916 AC_CHECK_LIB(resolv, res_search,
918 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
920 [with_libresolv="no"])
921 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
923 dnl Check for HAL (hardware abstraction library)
925 AC_CHECK_LIB(hal,libhal_device_property_exists,
926 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
928 if test "x$with_libhal" = "xyes"; then
929 if test "x$PKG_CONFIG" != "x"; then
930 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
931 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
932 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
933 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
937 m4_divert_once([HELP_WITH], [
938 collectd additional packages:])
940 if test "x$ac_system" = "xSolaris"
945 with_kstat="no (Solaris only)"
946 with_devinfo="no (Solaris only)"
949 if test "x$with_kstat" = "xyes"
951 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
953 if test "x$with_kstat" = "xyes"
955 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
956 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
958 if test "x$with_kstat" = "xyes"
960 AC_DEFINE(HAVE_LIBKSTAT, 1,
961 [Define to 1 if you have the 'kstat' library (-lkstat)])
963 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
964 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
967 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
974 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
977 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
978 if test "x$with_kvm_getprocs" = "xyes"
980 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
981 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
984 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
986 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
987 if test "x$with_kvm_getswapinfo" = "xyes"
989 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
990 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
993 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
995 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
996 if test "x$with_kvm_nlist" = "xyes"
998 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
999 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1002 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1004 # --with-libcurl {{{
1005 with_curl_config="curl-config"
1008 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1010 if test "x$withval" = "xno"
1013 else if test "x$withval" = "xyes"
1017 if test -f "$withval" && test -x "$withval"
1019 with_curl_config="$withval"
1021 else if test -x "$withval/bin/curl-config"
1023 with_curl_config="$withval/bin/curl-config"
1032 if test "x$with_libcurl" = "xyes"
1034 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1035 curl_config_status=$?
1037 if test $curl_config_status -ne 0
1039 with_libcurl="no ($with_curl_config failed)"
1041 SAVE_CPPFLAGS="$CPPFLAGS"
1042 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1044 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1046 CPPFLAGS="$SAVE_CPPFLAGS"
1049 if test "x$with_libcurl" = "xyes"
1051 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1052 curl_config_status=$?
1054 if test $curl_config_status -ne 0
1056 with_libcurl="no ($with_curl_config failed)"
1058 AC_CHECK_LIB(curl, curl_easy_init,
1059 [with_libcurl="yes"],
1060 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1064 if test "x$with_libcurl" = "xyes"
1066 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1067 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1068 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1069 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1071 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1075 with_libdbi_cppflags=""
1076 with_libdbi_ldflags=""
1077 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1079 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1081 with_libdbi_cppflags="-I$withval/include"
1082 with_libdbi_ldflags="-L$withval/lib"
1085 with_libdbi="$withval"
1091 if test "x$with_libdbi" = "xyes"
1093 SAVE_CPPFLAGS="$CPPFLAGS"
1094 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1096 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1098 CPPFLAGS="$SAVE_CPPFLAGS"
1100 if test "x$with_libdbi" = "xyes"
1102 SAVE_CPPFLAGS="$CPPFLAGS"
1103 SAVE_LDFLAGS="$LDFLAGS"
1104 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1105 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1107 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1109 CPPFLAGS="$SAVE_CPPFLAGS"
1110 LDFLAGS="$SAVE_LDFLAGS"
1112 if test "x$with_libdbi" = "xyes"
1114 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1115 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1116 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1117 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1118 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1119 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1121 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1124 # --with-libesmtp {{{
1125 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1127 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1129 LDFLAGS="$LDFLAGS -L$withval/lib"
1130 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1133 with_libesmtp="$withval"
1139 if test "x$with_libesmtp" = "xyes"
1141 AC_CHECK_LIB(esmtp, smtp_create_session,
1143 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1144 ], [with_libesmtp="no (libesmtp not found)"])
1146 if test "x$with_libesmtp" = "xyes"
1148 AC_CHECK_HEADERS(libesmtp.h,
1150 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1151 ], [with_libesmtp="no (libesmtp.h not found)"])
1153 if test "x$with_libesmtp" = "xyes"
1159 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1160 [Wether or not to use the esmtp library])
1161 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1164 # --with-libiptc {{{
1165 with_own_libiptc="no"
1166 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1168 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1170 LDFLAGS="$LDFLAGS -L$withval/lib"
1171 CPPFLAGS="$CPPFLAGS -I$withval/include"
1174 with_libiptc="$withval"
1178 if test "x$ac_system" = "xLinux"
1182 with_libiptc="no (Linux only)"
1185 if test "x$with_libiptc" = "xyes"
1187 AC_CHECK_LIB(iptc, iptc_init,
1189 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1193 with_own_libiptc="yes"
1196 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" != "xyes"
1198 AC_CHECK_HEADERS(libiptc/libiptc.h,
1200 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1204 with_own_libiptc="yes"
1207 if test "x$with_libiptc" = "xyes"
1210 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
1212 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h, [],
1214 with_libiptc="no (Linux iptables headers not found - check KERNEL_DIR)"
1215 with_own_libiptc="no"
1218 #include "$srcdir/src/libiptc/ipt_kernel_headers.h"
1223 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1224 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1225 if test "x$with_own_libiptc" = "xyes"
1227 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1231 # --with-libmysql {{{
1232 with_mysql_config="mysql_config"
1233 with_mysql_cflags=""
1235 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1237 if test "x$withval" = "xno"
1240 else if test "x$withval" = "xyes"
1244 if test -f "$withval" && test -x "$withval";
1246 with_mysql_config="$withval"
1247 else if test -x "$withval/bin/mysql_config"
1249 with_mysql_config="$withval/bin/mysql_config"
1257 if test "x$with_libmysql" = "xyes"
1259 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1260 mysql_config_status=$?
1262 if test $mysql_config_status -ne 0
1264 with_libmysql="no ($with_mysql_config failed)"
1266 SAVE_CPPFLAGS="$CPPFLAGS"
1267 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1270 have_mysql_mysql_h="no"
1271 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
1273 if test "x$have_mysql_h" = "xno"
1275 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
1278 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
1280 with_libmysql="no (mysql.h not found)"
1283 CPPFLAGS="$SAVE_CPPFLAGS"
1286 if test "x$with_libmysql" = "xyes"
1288 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1289 mysql_config_status=$?
1291 if test $mysql_config_status -ne 0
1293 with_libmysql="no ($with_mysql_config failed)"
1295 AC_CHECK_LIB(mysqlclient, mysql_init,
1296 [with_libmysql="yes"],
1297 [with_libmysql="no (symbol 'mysql_init' not found)"],
1301 if test "x$with_libmysql" = "xyes"
1303 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1304 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1305 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1306 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1308 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1311 # --with-libnetlink {{{
1312 with_libnetlink_cflags=""
1313 with_libnetlink_libs="-lnetlink"
1314 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1316 echo "libnetlink: withval = $withval"
1317 if test "x$withval" = "xyes"
1319 with_libnetlink="yes"
1320 else if test "x$withval" = "xno"
1322 with_libnetlink="no"
1324 if test -d "$withval/include"
1326 with_libnetlink_cflags="-I$withval/include"
1327 with_libnetlink_libs="-L$withval/lib -lnetlink"
1328 with_libnetlink="yes"
1330 AC_MSG_ERROR("no such directory: $withval/include")
1335 if test "x$ac_system" = "xLinux"
1337 with_libnetlink="yes"
1339 with_libnetlink="no (Linux only library)"
1342 if test "x$with_libnetlink" = "xyes"
1345 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1347 with_libnetlink="no (libnetlink.h not found)"
1349 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1351 with_libnetlink="yes"
1355 #include <sys/types.h>
1356 #include <asm/types.h>
1357 #include <sys/socket.h>
1358 #include <linux/netlink.h>
1359 #include <linux/rtnetlink.h>])
1360 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1362 #include <sys/types.h>
1363 #include <asm/types.h>
1364 #include <sys/socket.h>])
1368 #include <sys/types.h>
1369 #include <asm/types.h>
1370 #include <sys/socket.h>
1371 #include <linux/netlink.h>
1372 #include <linux/rtnetlink.h>
1376 int retval = TCA_STATS2;
1379 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1384 #include <sys/types.h>
1385 #include <asm/types.h>
1386 #include <sys/socket.h>
1387 #include <linux/netlink.h>
1388 #include <linux/rtnetlink.h>
1392 int retval = TCA_STATS;
1395 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1398 CFLAGS="$SAVE_CFLAGS"
1400 if test "x$with_libnetlink" = "xyes"
1402 AC_CHECK_LIB(netlink, rtnl_open,
1403 [with_libnetlink="yes"],
1404 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1405 [$with_libnetlink_libs])
1407 if test "x$with_libnetlink" = "xyes"
1409 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1410 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1411 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1412 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1414 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1417 # --with-libnetsnmp {{{
1418 with_snmp_config="net-snmp-config"
1421 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1423 if test "x$withval" = "xno"
1425 with_libnetsnmp="no"
1426 else if test "x$withval" = "xyes"
1428 with_libnetsnmp="yes"
1430 if test -x "$withval"
1432 with_snmp_config="$withval"
1433 with_libnetsnmp="yes"
1435 with_snmp_config="$withval/bin/net-snmp-config"
1436 with_libnetsnmp="yes"
1440 [with_libnetsnmp="yes"])
1441 if test "x$with_libnetsnmp" = "xyes"
1443 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
1444 snmp_config_status=$?
1446 if test $snmp_config_status -ne 0
1448 with_libnetsnmp="no ($with_snmp_config failed)"
1450 SAVE_CPPFLAGS="$CPPFLAGS"
1451 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
1453 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1455 CPPFLAGS="$SAVE_CPPFLAGS"
1458 if test "x$with_libnetsnmp" = "xyes"
1460 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
1461 snmp_config_status=$?
1463 if test $snmp_config_status -ne 0
1465 with_libnetsnmp="no ($with_snmp_config failed)"
1467 AC_CHECK_LIB(netsnmp, init_snmp,
1468 [with_libnetsnmp="yes"],
1469 [with_libnetsnmp="no (libnetsnmp not found)"],
1473 if test "x$with_libnetsnmp" = "xyes"
1475 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
1476 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
1477 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
1478 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
1480 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1483 # --with-liboconfig {{{
1484 with_own_liboconfig="no"
1485 liboconfig_LDFLAGS="$LDFLAGS"
1486 liboconfig_CPPFLAGS="$CPPFLAGS"
1487 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1489 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1491 if test -d "$withval/lib"
1493 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1495 if test -d "$withval/include"
1497 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1500 if test "x$withval" = "xno"
1502 AC_MSG_ERROR("liboconfig is required")
1506 with_liboconfig="yes"
1509 save_LDFLAGS="$LDFLAGS"
1510 save_CPPFLAGS="$CPPFLAGS"
1511 LDFLAGS="$liboconfig_LDFLAGS"
1512 CPPFLAGS="$liboconfig_CPPFLAGS"
1513 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1515 with_liboconfig="yes"
1516 with_own_liboconfig="no"
1519 with_liboconfig="yes"
1520 with_own_liboconfig="yes"
1521 LDFLAGS="$save_LDFLAGS"
1522 CPPFLAGS="$save_CPPFLAGS"
1525 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1526 if test "x$with_own_liboconfig" = "xyes"
1528 with_liboconfig="yes (shipped version)"
1532 # --with-liboping {{{
1533 with_own_liboping="no"
1534 liboping_LDFLAGS="$LDFLAGS"
1535 liboping_CPPFLAGS="$CPPFLAGS"
1536 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1538 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1540 if test -d "$withval/lib"
1542 liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
1544 if test -d "$withval/include"
1546 liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
1549 if test "x$withval" = "xno"
1552 with_own_liboping="no"
1553 else if test "x$withval" = "xyes"
1562 if test "x$with_liboping" = "xyes"
1564 save_LDFLAGS="$LDFLAGS"
1565 save_CPPFLAGS="$CPPFLAGS"
1566 LDFLAGS="$liboping_LDFLAGS"
1567 CPPFLAGS="$liboping_CPPFLAGS"
1568 AC_CHECK_LIB(oping, ping_construct,
1571 with_own_liboping="no"
1575 with_own_liboping="yes"
1576 LDFLAGS="$save_LDFLAGS"
1577 CPPFLAGS="$save_CPPFLAGS"
1580 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1581 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
1585 with_oracle_cppflags=""
1587 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
1589 if test "x$withval" = "xyes"
1591 if test "x$ORACLE_HOME" = "x"
1593 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
1596 else if test "x$withval" = "xno"
1601 ORACLE_HOME="$withval"
1605 if test "x$ORACLE_HOME" = "x"
1607 with_oracle="no (ORACLE_HOME is not set)"
1612 if test "x$ORACLE_HOME" != "x"
1614 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
1616 if test -e "$ORACLE_HOME/lib/ldflags"
1618 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
1620 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
1621 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
1623 if test "x$with_oracle" = "xyes"
1625 SAVE_CPPFLAGS="$CPPFLAGS"
1626 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
1628 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
1630 CPPFLAGS="$SAVE_CPPFLAGS"
1632 if test "x$with_oracle" = "xyes"
1634 SAVE_CPPFLAGS="$CPPFLAGS"
1635 SAVE_LDFLAGS="$LDFLAGS"
1636 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
1637 LDFLAGS="$LDFLAGS $with_oracle_libs"
1639 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
1641 CPPFLAGS="$SAVE_CPPFLAGS"
1642 LDFLAGS="$SAVE_LDFLAGS"
1644 if test "x$with_oracle" = "xyes"
1646 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
1647 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
1648 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
1649 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
1653 # --with-libowcapi {{{
1654 with_libowcapi_cppflags=""
1655 with_libowcapi_libs="-lowcapi"
1656 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
1658 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1660 with_libowcapi_cppflags="-I$withval/include"
1661 with_libowcapi_libs="-L$withval/lib -lowcapi"
1662 with_libowcapi="yes"
1664 with_libowcapi="$withval"
1668 with_libowcapi="yes"
1670 if test "x$with_libowcapi" = "xyes"
1672 SAVE_CPPFLAGS="$CPPFLAGS"
1673 CPPFLAGS="$with_libowcapi_cppflags"
1675 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
1677 CPPFLAGS="$SAVE_CPPFLAGS"
1679 if test "x$with_libowcapi" = "xyes"
1681 SAVE_LDFLAGS="$LDFLAGS"
1682 SAVE_CPPFLAGS="$CPPFLAGS"
1683 LDFLAGS="$with_libowcapi_libs"
1684 CPPFLAGS="$with_libowcapi_cppflags"
1686 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
1688 LDFLAGS="$SAVE_LDFLAGS"
1689 CPPFLAGS="$SAVE_CPPFLAGS"
1691 if test "x$with_libowcapi" = "xyes"
1693 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
1694 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
1695 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
1696 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
1700 # --with-libpcap {{{
1701 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
1703 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1705 LDFLAGS="$LDFLAGS -L$withval/lib"
1706 CPPFLAGS="$CPPFLAGS -I$withval/include"
1709 with_libpcap="$withval"
1715 if test "x$with_libpcap" = "xyes"
1717 AC_CHECK_LIB(pcap, pcap_open_live,
1719 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
1720 ], [with_libpcap="no (libpcap not found)"])
1722 if test "x$with_libpcap" = "xyes"
1724 AC_CHECK_HEADERS(pcap.h,
1726 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
1727 ], [with_libpcap="no (pcap.h not found)"])
1729 if test "x$with_libpcap" = "xyes"
1735 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
1736 [Wether or not to use the pcap library])
1737 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
1740 # --with-libpcre {{{
1741 with_pcre_config="pcre-config"
1744 AC_ARG_WITH(libpcre, [AS_HELP_STRING([--with-libpcre@<:@=PREFIX@:>@],
1745 [Path to libpcre.])],
1747 if test "x$withval" = "xno"
1750 else if test "x$withval" = "xyes"
1754 if test -f "$withval" && test -x "$withval"
1756 with_pcre_config="$withval"
1757 else if test -x "$withval/bin/pcre-config"
1759 with_pcre_config="$withval/bin/pcre-config"
1768 if test "x$with_libpcre" = "xyes"
1770 with_pcre_cflags=`$with_pcre_config --cflags 2>/dev/null`
1771 pcre_config_status=$?
1773 if test $pcre_config_status -ne 0
1775 with_libpcre="no ($with_pcre_config failed)"
1777 SAVE_CPPFLAGS="$CPPFLAGS"
1778 CPPFLAGS="$CPPFLAGS $with_pcre_cflags"
1780 AC_CHECK_HEADERS(pcre.h, [], [with_libpcre="no (pcre.h not found)"], [])
1782 CPPFLAGS="$SAVE_CPPFLAGS"
1786 if test "x$with_libpcre" = "xyes"
1788 with_pcre_libs=`$with_pcre_config --libs 2>/dev/null`
1789 pcre_config_status=$?
1791 if test $pcre_config_status -ne 0
1793 with_libpcre="no ($with_pcre_config failed)"
1795 AC_CHECK_LIB(pcre, pcre_compile,
1796 [with_libpcre="yes"],
1797 [with_libpcre="no (symbol 'pcre_compile' not found)"],
1802 if test "x$with_libpcre" = "xyes"
1804 BUILD_WITH_LIBPCRE_CFLAGS="$with_pcre_cflags"
1805 BUILD_WITH_LIBPCRE_LIBS="$with_pcre_libs"
1806 AC_SUBST(BUILD_WITH_LIBPCRE_CFLAGS)
1807 AC_SUBST(BUILD_WITH_LIBPCRE_LIBS)
1809 AM_CONDITIONAL(BUILD_WITH_LIBPCRE, test "x$with_libpcre" = "xyes")
1812 # --with-libperl {{{
1813 perl_interpreter="perl"
1814 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
1816 if test -x "$withval"
1818 perl_interpreter="$withval"
1820 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1822 LDFLAGS="$LDFLAGS -L$withval/lib"
1823 CPPFLAGS="$CPPFLAGS -I$withval/include"
1824 perl_interpreter="$withval/bin/perl"
1827 with_libperl="$withval"
1834 AC_MSG_CHECKING([for perl])
1835 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
1836 if test -x "$perl_interpreter"
1838 AC_MSG_RESULT([yes ($perl_interpreter)])
1844 AC_SUBST(PERL, "$perl_interpreter")
1846 if test "x$with_libperl" = "xyes" \
1847 && test -n "$perl_interpreter"
1850 SAVE_LDFLAGS=$LDFLAGS
1851 PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts`
1852 PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts`
1853 CFLAGS="$CFLAGS $PERL_CFLAGS"
1854 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1856 AC_CACHE_CHECK([for libperl],
1861 #define PERL_NO_GET_CONTEXT
1868 load_module (PERL_LOADMOD_NOIMPORT,
1869 newSVpv ("Collectd::Plugin::FooBar", 24),
1872 [have_libperl="yes"],
1877 if test "x$have_libperl" = "xyes"
1879 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
1880 AC_SUBST(PERL_CFLAGS)
1881 AC_SUBST(PERL_LDFLAGS)
1887 LDFLAGS=$SAVE_LDFLAGS
1888 else if test -z "$perl_interpreter"; then
1889 with_libperl="no (no perl interpreter found)"
1892 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1894 if test "x$with_libperl" = "xyes"
1897 SAVE_LDFLAGS=$LDFLAGS
1898 CFLAGS="$CFLAGS $PERL_CFLAGS"
1899 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1901 AC_CACHE_CHECK([if perl supports ithreads],
1902 [have_perl_ithreads],
1910 #if !defined(USE_ITHREADS)
1911 # error "Perl does not support ithreads!"
1912 #endif /* !defined(USE_ITHREADS) */
1915 [have_perl_ithreads="yes"],
1916 [have_perl_ithreads="no"]
1920 if test "x$have_perl_ithreads" = "xyes"
1922 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
1926 LDFLAGS=$SAVE_LDFLAGS
1931 with_pg_config="pg_config"
1932 with_libpq_includedir=""
1933 with_libpq_libdir=""
1934 with_libpq_cppflags=""
1935 with_libpq_ldflags=""
1936 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
1939 if test "x$withval" = "xno"
1942 else if test "x$withval" = "xyes"
1946 if test -f "$withval" && test -x "$withval";
1948 with_pg_config="$withval"
1949 else if test -x "$withval/bin/pg_config"
1951 with_pg_config="$withval/bin/pg_config"
1959 if test "x$with_libpq" = "xyes"
1961 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
1964 if test $pg_config_status -eq 0
1966 if test -n "$with_libpq_includedir"; then
1967 for dir in $with_libpq_includedir; do
1968 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
1972 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
1975 SAVE_CPPFLAGS="$CPPFLAGS"
1976 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
1978 AC_CHECK_HEADERS(libpq-fe.h, [],
1979 [with_libpq="no (libpq-fe.h not found)"], [])
1981 CPPFLAGS="$SAVE_CPPFLAGS"
1983 if test "x$with_libpq" = "xyes"
1985 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
1988 if test $pg_config_status -eq 0
1990 if test -n "$with_libpq_libdir"; then
1991 for dir in $with_libpq_libdir; do
1992 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
1996 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
1999 SAVE_LDFLAGS="$LDFLAGS"
2000 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2002 AC_CHECK_LIB(pq, PQconnectdb,
2004 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2006 LDFLAGS="$SAVE_LDFLAGS"
2008 if test "x$with_libpq" = "xyes"
2010 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2011 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2012 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2013 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2015 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2018 # --with-libpthread {{{
2019 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
2020 [ if test "x$withval" != "xno" \
2021 && test "x$withval" != "xyes"
2023 LDFLAGS="$LDFLAGS -L$withval/lib"
2024 CPPFLAGS="$CPPFLAGS -I$withval/include"
2025 with_libpthread="yes"
2027 if test "x$withval" = "xno"
2029 with_libpthread="no (disabled)"
2032 ], [with_libpthread="yes"])
2033 if test "x$with_libpthread" = "xyes"
2035 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
2037 if test "x$with_libpthread" = "xyes"
2039 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
2041 if test "x$with_libpthread" = "xyes"
2047 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
2048 [Wether or not to use pthread (POSIX threads) library])
2049 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
2053 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
2056 librrd_threadsafe="yes"
2057 librrd_rrdc_update="no"
2058 AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
2059 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
2061 librrd_cflags="-I$withval/include"
2062 librrd_ldflags="-L$withval/lib"
2065 with_librrd="$withval"
2067 ], [with_librrd="yes"])
2068 if test "x$with_librrd" = "xyes"
2070 SAVE_CPPFLAGS="$CPPFLAGS"
2071 SAVE_LDFLAGS="$LDFLAGS"
2073 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2074 LDFLAGS="$LDFLAGS $librrd_ldflags"
2076 AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
2078 CPPFLAGS="$SAVE_CPPFLAGS"
2079 LDFLAGS="$SAVE_LDFLAGS"
2081 if test "x$with_librrd" = "xyes"
2083 SAVE_CPPFLAGS="$CPPFLAGS"
2084 SAVE_LDFLAGS="$LDFLAGS"
2086 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2087 LDFLAGS="$LDFLAGS $librrd_ldflags"
2089 AC_CHECK_LIB(rrd_th, rrd_update_r,
2091 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
2093 [librrd_threadsafe="no"
2094 AC_CHECK_LIB(rrd, rrd_update,
2096 librrd_ldflags="$librrd_ldflags -lrrd -lm"
2098 [with_librrd="no (symbol 'rrd_update' not found)"],
2103 if test "x$librrd_threadsafe" = "xyes"
2105 AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2107 AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2110 CPPFLAGS="$SAVE_CPPFLAGS"
2111 LDFLAGS="$SAVE_LDFLAGS"
2113 if test "x$with_librrd" = "xyes"
2115 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
2116 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
2117 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
2118 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
2120 if test "x$librrd_threadsafe" = "xyes"
2122 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
2126 # --with-libsensors {{{
2127 with_sensors_cflags=""
2128 with_sensors_ldflags=""
2129 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
2131 if test "x$withval" = "xno"
2133 with_libsensors="no"
2135 with_libsensors="yes"
2136 if test "x$withval" != "xyes"
2138 with_sensors_cflags="-I$withval/include"
2139 with_sensors_ldflags="-L$withval/lib"
2140 with_libsensors="yes"
2145 if test "x$ac_system" = "xLinux"
2147 with_libsensors="yes"
2149 with_libsensors="no (Linux only library)"
2152 if test "x$with_libsensors" = "xyes"
2154 SAVE_CPPFLAGS="$CPPFLAGS"
2155 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2157 # AC_CHECK_HEADERS(sensors/sensors.h,
2159 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
2161 # [with_libsensors="no (sensors/sensors.h not found)"])
2162 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
2164 CPPFLAGS="$SAVE_CPPFLAGS"
2166 if test "x$with_libsensors" = "xyes"
2168 SAVE_CPPFLAGS="$CPPFLAGS"
2169 SAVE_LDFLAGS="$LDFLAGS"
2170 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2171 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
2173 AC_CHECK_LIB(sensors, sensors_init,
2175 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
2177 [with_libsensors="no (libsensors not found)"])
2179 CPPFLAGS="$SAVE_CPPFLAGS"
2180 LDFLAGS="$SAVE_LDFLAGS"
2182 if test "x$with_libsensors" = "xyes"
2184 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
2185 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
2186 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
2187 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
2189 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
2192 # --with-libstatgrab {{{
2193 with_libstatgrab_cflags=""
2194 with_libstatgrab_ldflags=""
2195 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
2197 if test "x$withval" != "xno" \
2198 && test "x$withval" != "xyes"
2200 with_libstatgrab_cflags="-I$withval/include"
2201 with_libstatgrab_ldflags="-L$withval/lib"
2202 with_libstatgrab="yes"
2204 with_libstatgrab="$withval"
2208 if test "x$ac_system" = "xunknown"
2210 with_libstatgrab="yes"
2212 with_libstatgrab="no"
2215 with_libstatgrab_pkg_config="yes"
2216 if test "x$with_libstatgrab" = "xyes" \
2217 && test "x$PKG_CONFIG" != "x"
2219 AC_MSG_CHECKING([pkg-config for libstatgrab])
2221 $PKG_CONFIG --exists libstatgrab 2>/dev/null
2224 with_libstatgrab_pkg_config="no"
2225 temp_result="not found"
2227 AC_MSG_RESULT([$temp_result])
2229 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
2230 with_libstatgrab_pkg_config="no"
2231 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
2234 if test "x$with_libstatgrab" = "xyes" \
2235 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2236 && test "x$with_libstatgrab_cflags" = "x"
2238 AC_MSG_CHECKING([for libstatgrab CFLAGS])
2239 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
2242 with_libstatgrab_cflags="$temp_result"
2244 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
2245 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
2247 AC_MSG_RESULT([$temp_result])
2250 if test "x$with_libstatgrab" = "xyes" \
2251 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2252 && test "x$with_libstatgrab_ldflags" = "x"
2254 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
2255 temp_result="`$PKG_CONFIG --libs libstatgrab`"
2258 with_libstatgrab_ldflags="$temp_result"
2260 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
2261 temp_result="$PKG_CONFIG --libs libstatgrab failed"
2263 AC_MSG_RESULT([$temp_result])
2266 if test "x$with_libstatgrab" = "xyes"
2268 SAVE_CPPFLAGS="$CPPFLAGS"
2269 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
2271 AC_CHECK_HEADERS(statgrab.h,
2272 [with_libstatgrab="yes"],
2273 [with_libstatgrab="no (statgrab.h not found)"])
2275 CPPFLAGS="$SAVE_CPPFLAGS"
2278 if test "x$with_libstatgrab" = "xyes"
2280 SAVE_CFLAGS="$CFLAGS"
2281 SAVE_LDFLAGS="$LDFLAGS"
2283 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
2284 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
2286 AC_CHECK_LIB(statgrab, sg_init,
2287 [with_libstatgrab="yes"],
2288 [with_libstatgrab="no (symbol sg_init not found)"])
2290 CFLAGS="$SAVE_CFLAGS"
2291 LDFLAGS="$SAVE_LDFLAGS"
2294 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
2295 if test "x$with_libstatgrab" = "xyes"
2297 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
2298 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
2299 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
2300 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
2301 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
2305 # --with-libxmms {{{
2306 with_xmms_config="xmms-config"
2309 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
2311 if test "x$withval" != "xno" \
2312 && test "x$withval" != "xyes"
2314 if test -f "$withval" && test -x "$withval";
2316 with_xmms_config="$withval"
2317 else if test -x "$withval/bin/xmms-config"
2319 with_xmms_config="$withval/bin/xmms-config"
2322 else if test "x$withval" = "xno"
2332 if test "x$with_libxmms" = "xyes"
2334 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
2335 xmms_config_status=$?
2337 if test $xmms_config_status -ne 0
2342 if test "x$with_libxmms" = "xyes"
2344 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
2345 xmms_config_status=$?
2347 if test $xmms_config_status -ne 0
2352 if test "x$with_libxmms" = "xyes"
2354 AC_CHECK_LIB(xmms, xmms_remote_get_info,
2356 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
2357 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
2358 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
2359 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
2366 with_libxmms_numeric=0
2367 if test "x$with_libxmms" = "xyes"
2369 with_libxmms_numeric=1
2371 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
2372 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
2375 # pkg-config --exists 'libupsclient' {{{
2376 with_libupsclient="no (pkg-config isn't available)"
2377 with_libupsclient_cflags=""
2378 with_libupsclient_libs=""
2379 if test "x$PKG_CONFIG" != "x"
2381 pkg-config --exists 'libupsclient' 2>/dev/null
2384 with_libupsclient="yes"
2386 with_libupsclient="no (pkg-config doesn't know library)"
2389 if test "x$with_libupsclient" = "xyes"
2391 with_libupsclient_cflags="`pkg-config --cflags 'libupsclient'`"
2394 with_libupsclient="no"
2396 with_libupsclient_libs="`pkg-config --libs 'libupsclient'`"
2399 with_libupsclient="no"
2402 if test "x$with_libupsclient" = "xyes"
2404 SAVE_CPPFLAGS="$CPPFLAGS"
2405 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2407 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
2409 CPPFLAGS="$SAVE_CPPFLAGS"
2411 if test "x$with_libupsclient" = "xyes"
2413 SAVE_CPPFLAGS="$CPPFLAGS"
2414 SAVE_LDFLAGS="$LDFLAGS"
2416 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2417 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
2419 AC_CHECK_LIB(upsclient, upscli_connect,
2420 [with_libupsclient="yes"],
2421 [with_libupsclient="no (symbol upscli_connect not found)"])
2423 CPPFLAGS="$SAVE_CPPFLAGS"
2424 LDFLAGS="$SAVE_LDFLAGS"
2426 if test "x$with_libupsclient" = "xyes"
2428 SAVE_CPPFLAGS="$CPPFLAGS"
2429 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
2431 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
2432 [#include <stdlib.h>
2434 #include <upsclient.h>])
2436 CPPFLAGS="$SAVE_CPPFLAGS"
2438 if test "x$with_libupsclient" = "xyes"
2440 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
2441 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
2442 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
2443 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
2447 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
2448 with_libxml2="no (pkg-config isn't available)"
2449 with_libxml2_cflags=""
2450 with_libxml2_ldflags=""
2451 with_libvirt="no (pkg-config isn't available)"
2452 with_libvirt_cflags=""
2453 with_libvirt_ldflags=""
2454 if test "x$PKG_CONFIG" != "x"
2456 pkg-config --exists 'libxml-2.0' 2>/dev/null
2461 with_libxml2="no (pkg-config doesn't know library)"
2464 pkg-config --exists libvirt 2>/dev/null
2469 with_libvirt="no (pkg-config doesn't know library)"
2472 if test "x$with_libxml2" = "xyes"
2474 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
2479 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
2485 if test "x$with_libxml2" = "xyes"
2487 SAVE_CPPFLAGS="$CPPFLAGS"
2488 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
2490 AC_CHECK_HEADERS(libxml/parser.h, [],
2491 [with_libxml2="no (libxml/parser.h not found)"])
2493 CPPFLAGS="$SAVE_CPPFLAGS"
2495 if test "x$with_libxml2" = "xyes"
2497 SAVE_CFLAGS="$CFLAGS"
2498 SAVE_LDFLAGS="$LDFLAGS"
2500 CFLAGS="$CFLAGS $with_libxml2_cflags"
2501 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
2503 AC_CHECK_LIB(xml2, xmlXPathEval,
2504 [with_libxml2="yes"],
2505 [with_libxml2="no (symbol xmlXPathEval not found)"])
2507 CFLAGS="$SAVE_CFLAGS"
2508 LDFLAGS="$SAVE_LDFLAGS"
2510 dnl Add the right compiler flags and libraries.
2511 if test "x$with_libxml2" = "xyes"; then
2512 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
2513 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
2514 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
2515 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
2517 if test "x$with_libvirt" = "xyes"
2519 with_libvirt_cflags="`pkg-config --cflags libvirt`"
2524 with_libvirt_ldflags="`pkg-config --libs libvirt`"
2530 if test "x$with_libvirt" = "xyes"
2532 SAVE_CPPFLAGS="$CPPFLAGS"
2533 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
2535 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
2536 [with_libvirt="no (libvirt/libvirt.h not found)"])
2538 CPPFLAGS="$SAVE_CPPFLAGS"
2540 if test "x$with_libvirt" = "xyes"
2542 SAVE_CFLAGS="$CFLAGS"
2543 SAVE_LDFLAGS="$LDFLAGS"
2545 CFLAGS="$CFLAGS $with_libvirt_cflags"
2546 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
2548 AC_CHECK_LIB(virt, virDomainBlockStats,
2549 [with_libvirt="yes"],
2550 [with_libvirt="no (symbol virDomainBlockStats not found)"])
2552 CFLAGS="$SAVE_CFLAGS"
2553 LDFLAGS="$SAVE_LDFLAGS"
2555 dnl Add the right compiler flags and libraries.
2556 if test "x$with_libvirt" = "xyes"; then
2557 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
2558 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
2559 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
2560 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
2564 # $PKG_CONFIG --exists OpenIPMIpthread {{{
2565 with_libopenipmipthread="yes"
2566 with_libopenipmipthread_cflags=""
2567 with_libopenipmipthread_libs=""
2569 AC_MSG_CHECKING([for pkg-config])
2571 if test "x$PKG_CONFIG" = "x"
2573 with_libopenipmipthread="no"
2576 temp_result="$PKG_CONFIG"
2578 AC_MSG_RESULT([$temp_result])
2580 if test "x$with_libopenipmipthread" = "xyes"
2582 AC_MSG_CHECKING([for libOpenIPMIpthread])
2583 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
2586 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
2588 AC_MSG_RESULT([$with_libopenipmipthread])
2591 if test "x$with_libopenipmipthread" = "xyes"
2593 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
2594 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
2597 with_libopenipmipthread_cflags="$temp_result"
2599 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
2600 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
2602 AC_MSG_RESULT([$temp_result])
2605 if test "x$with_libopenipmipthread" = "xyes"
2607 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
2608 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
2611 with_libopenipmipthread_ldflags="$temp_result"
2613 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
2614 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
2616 AC_MSG_RESULT([$temp_result])
2619 if test "x$with_libopenipmipthread" = "xyes"
2621 SAVE_CPPFLAGS="$CPPFLAGS"
2622 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
2624 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
2625 [with_libopenipmipthread="yes"],
2626 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
2627 [#include <OpenIPMI/ipmiif.h>
2628 #include <OpenIPMI/ipmi_err.h>
2629 #include <OpenIPMI/ipmi_posix.h>
2630 #include <OpenIPMI/ipmi_conn.h>
2633 CPPFLAGS="$SAVE_CPPFLAGS"
2636 if test "x$with_libopenipmipthread" = "xyes"
2638 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
2639 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
2640 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
2641 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
2645 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
2646 [with_libnotify="yes"],
2647 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
2649 # Check for enabled/disabled features
2652 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
2653 # ------------------------------------------------------------
2655 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
2660 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
2665 m4_define([EnDis],[disabled])dnl
2666 m4_define([YesNo],[no])dnl
2672 m4_define([EnDis],[enabled])dnl
2673 m4_define([YesNo],[yes])dnl
2676 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
2680 m4_if([$3], [feature], [],
2684 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
2690 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
2692 enable_$1='[YesNo]'dnl
2694 if test "x$enable_$1" = "xno"
2698 if test "x$enable_$1" = "xyes"
2702 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
2707 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
2708 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
2710 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
2712 # AC_PLUGIN(name, default, info)
2713 # ------------------------------------------------------------
2719 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
2721 if test "x$enableval" = "xyes"
2729 if test "x$2" = "xyes"
2736 if test "x$enable_plugin" = "xyes"
2738 if test "x$2" = "xyes"
2740 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
2741 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
2742 dependency_error="yes"
2743 enable_plugin="no (dependency error)"
2746 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
2747 enable_$1="$enable_plugin"
2749 )# AC_PLUGIN(name, default, info)
2751 m4_divert_once([HELP_ENABLE], [
2752 collectd features:])
2753 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
2754 AC_COLLECTD([debug], [enable], [feature], [debugging])
2755 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
2756 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
2758 dependency_error="no"
2766 plugin_interface="no"
2773 plugin_multimeter="no"
2776 plugin_processes="no"
2780 plugin_tcpconns="no"
2785 plugin_wireless="no"
2788 if test "x$ac_system" = "xLinux"
2790 plugin_battery="yes"
2792 plugin_cpufreq="yes"
2794 plugin_entropy="yes"
2795 plugin_interface="yes"
2800 plugin_processes="yes"
2803 plugin_tcpconns="yes"
2804 plugin_thermal="yes"
2806 plugin_vserver="yes"
2807 plugin_wireless="yes"
2809 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
2815 if test "x$ac_system" = "xOpenBSD"
2817 plugin_tcpconns="yes"
2821 if test "x$with_libiokit" = "xyes"
2823 plugin_battery="yes"
2828 if test "x$with_devinfo$with_kstat" = "xyesyes"
2832 plugin_interface="yes"
2839 if test "x$with_libstatgrab" = "xyes"
2843 plugin_interface="yes"
2850 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
2855 if test "x$with_libopenipmipthread" = "xyes"
2860 if test "x$have_processor_info" = "xyes"
2864 if test "x$have_sysctlbyname" = "xyes"
2868 plugin_tcpconns="yes"
2871 if test "x$have_statfs" = "xyes"
2875 if test "x$have_statvfs" = "xyes"
2880 if test "x$have_getifaddrs" = "xyes"
2882 plugin_interface="yes"
2885 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
2887 plugin_libvirt="yes"
2890 if test "x$have_getloadavg" = "xyes"
2895 if test "x$have_libperl$have_perl_ithreads" = "xyesyes"
2900 # Mac OS X memory interface
2901 if test "x$have_host_statistics" = "xyes"
2906 if test "x$have_termios_h" = "xyes"
2908 plugin_multimeter="yes"
2911 if test "x$have_thread_info" = "xyes"
2913 plugin_processes="yes"
2916 if test "x$with_kvm_getprocs" = "xyes"
2918 plugin_processes="yes"
2921 if test "x$with_kvm_getswapinfo" = "xyes"
2926 if test "x$with_kvm_nlist" = "xyes"
2928 plugin_tcpconns="yes"
2931 if test "x$have_getutent" = "xyes"
2935 if test "x$have_getutxent" = "xyes"
2940 # FIXME: sysctl for swap plugin
2942 m4_divert_once([HELP_ENABLE], [
2945 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
2946 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
2947 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
2948 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
2949 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
2950 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
2951 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
2952 AC_PLUGIN([csv], [yes], [CSV output plugin])
2953 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
2954 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
2955 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
2956 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
2957 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
2958 AC_PLUGIN([email], [yes], [EMail statistics])
2959 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
2960 AC_PLUGIN([exec], [yes], [Execution of external programs])
2961 AC_PLUGIN([filecount], [yes], [Count files in directories])
2962 AC_PLUGIN([filter_ignore], [yes], [Ignore specific values])
2963 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
2964 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
2965 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
2966 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
2967 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
2968 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
2969 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
2970 AC_PLUGIN([load], [$plugin_load], [System load])
2971 AC_PLUGIN([logfile], [yes], [File logging plugin])
2972 AC_PLUGIN([match_regex], [yes], [The regex match])
2973 AC_PLUGIN([mbmon], [yes], [Query mbmond])
2974 AC_PLUGIN([memcached], [yes], [memcached statistics])
2975 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
2976 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
2977 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
2978 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
2979 AC_PLUGIN([network], [yes], [Network communication plugin])
2980 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
2981 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
2982 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
2983 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
2984 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
2985 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
2986 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
2987 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
2988 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
2989 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
2990 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
2991 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
2992 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
2993 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
2994 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
2995 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
2996 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
2997 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
2998 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
2999 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
3000 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
3001 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
3002 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
3003 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
3004 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
3005 AC_PLUGIN([users], [$plugin_users], [User statistics])
3006 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
3007 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
3008 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
3009 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
3010 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
3013 if test "x$ac_system" = "xLinux" \
3014 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
3016 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
3020 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
3022 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3024 PERL_BINDINGS_OPTIONS="$withval"
3025 with_perl_bindings="yes"
3027 PERL_BINDINGS_OPTIONS=""
3028 with_perl_bindings="$withval"
3032 PERL_BINDINGS_OPTIONS=""
3033 if test -n "$perl_interpreter"
3035 with_perl_bindings="yes"
3037 with_perl_bindings="no (no perl interpreter found)"
3040 if test "x$with_perl_bindings" = "xyes"
3042 PERL_BINDINGS="perl"
3046 AC_SUBST(PERL_BINDINGS)
3047 AC_SUBST(PERL_BINDINGS_OPTIONS)
3049 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libiptc/Makefile src/libcollectdclient/Makefile src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
3051 if test "x$with_librrd" = "xyes" \
3052 && test "x$librrd_threadsafe" != "xyes"
3054 with_librrd="yes (warning: librrd is not thread-safe)"
3057 if test "x$with_liboping" = "xyes" \
3058 && test "x$with_own_liboping" = "xyes"
3060 with_liboping="yes (shipped version)"
3063 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes"
3065 with_libiptc="yes (shipped version)"
3068 if test "x$with_libperl" = "xyes"
3070 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
3072 enable_perl="no (needs libperl)"
3075 if test "x$with_perl_bindings" = "xyes" \
3076 && test "x$PERL_BINDINGS_OPTIONS" != "x"
3078 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
3085 libcurl . . . . . . . $with_libcurl
3086 libdbi . . . . . . . $with_libdbi
3087 libesmtp . . . . . . $with_libesmtp
3088 libiokit . . . . . . $with_libiokit
3089 libiptc . . . . . . . $with_libiptc
3090 libkstat . . . . . . $with_kstat
3091 libkvm . . . . . . . $with_libkvm
3092 libmysql . . . . . . $with_libmysql
3093 libnetlink . . . . . $with_libnetlink
3094 libnetsnmp . . . . . $with_libnetsnmp
3095 libnotify . . . . . . $with_libnotify
3096 liboconfig . . . . . $with_liboconfig
3097 libopenipmi . . . . . $with_libopenipmipthread
3098 liboping . . . . . . $with_liboping
3099 libpcap . . . . . . . $with_libpcap
3100 libpcre . . . . . . . $with_libpcre
3101 libperl . . . . . . . $with_libperl
3102 libpthread . . . . . $with_libpthread
3103 libpq . . . . . . . . $with_libpq
3104 librrd . . . . . . . $with_librrd
3105 libsensors . . . . . $with_libsensors
3106 libstatgrab . . . . . $with_libstatgrab
3107 libupsclient . . . . $with_libupsclient
3108 libvirt . . . . . . . $with_libvirt
3109 libxml2 . . . . . . . $with_libxml2
3110 libxmms . . . . . . . $with_libxmms
3111 oracle . . . . . . . $with_oracle
3114 daemon mode . . . . . $enable_daemon
3115 debug . . . . . . . . $enable_debug
3118 perl . . . . . . . . $with_perl_bindings
3121 apache . . . . . . . $enable_apache
3122 apcups . . . . . . . $enable_apcups
3123 apple_sensors . . . . $enable_apple_sensors
3124 ascent . . . . . . . $enable_ascent
3125 battery . . . . . . . $enable_battery
3126 cpu . . . . . . . . . $enable_cpu
3127 cpufreq . . . . . . . $enable_cpufreq
3128 csv . . . . . . . . . $enable_csv
3129 dbi . . . . . . . . . $enable_dbi
3130 df . . . . . . . . . $enable_df
3131 disk . . . . . . . . $enable_disk
3132 dns . . . . . . . . . $enable_dns
3133 email . . . . . . . . $enable_email
3134 entropy . . . . . . . $enable_entropy
3135 exec . . . . . . . . $enable_exec
3136 filecount . . . . . . $enable_filecount
3137 filter_ignore . . . . $enable_filter_ignore
3138 hddtemp . . . . . . . $enable_hddtemp
3139 interface . . . . . . $enable_interface
3140 iptables . . . . . . $enable_iptables
3141 ipmi . . . . . . . . $enable_ipmi
3142 ipvs . . . . . . . . $enable_ipvs
3143 irq . . . . . . . . . $enable_irq
3144 libvirt . . . . . . . $enable_libvirt
3145 load . . . . . . . . $enable_load
3146 logfile . . . . . . . $enable_logfile
3147 match_regex . . . . . $enable_match_regex
3148 mbmon . . . . . . . . $enable_mbmon
3149 memcached . . . . . . $enable_memcached
3150 memory . . . . . . . $enable_memory
3151 multimeter . . . . . $enable_multimeter
3152 mysql . . . . . . . . $enable_mysql
3153 netlink . . . . . . . $enable_netlink
3154 network . . . . . . . $enable_network
3155 nfs . . . . . . . . . $enable_nfs
3156 nginx . . . . . . . . $enable_nginx
3157 notify_desktop . . . $enable_notify_desktop
3158 notify_email . . . . $enable_notify_email
3159 ntpd . . . . . . . . $enable_ntpd
3160 nut . . . . . . . . . $enable_nut
3161 onewire . . . . . . . $enable_onewire
3162 oracle . . . . . . . $enable_oracle
3163 perl . . . . . . . . $enable_perl
3164 ping . . . . . . . . $enable_ping
3165 postgresql . . . . . $enable_postgresql
3166 powerdns . . . . . . $enable_powerdns
3167 processes . . . . . . $enable_processes
3168 rrdtool . . . . . . . $enable_rrdtool
3169 rrdcached . . . . . . $enable_rrdcached
3170 sensors . . . . . . . $enable_sensors
3171 serial . . . . . . . $enable_serial
3172 snmp . . . . . . . . $enable_snmp
3173 swap . . . . . . . . $enable_swap
3174 syslog . . . . . . . $enable_syslog
3175 tail . . . . . . . . $enable_tail
3176 tape . . . . . . . . $enable_tape
3177 tcpconns . . . . . . $enable_tcpconns
3178 teamspeak2 . . . . . $enable_teamspeak2
3179 thermal . . . . . . . $enable_thermal
3180 unixsock . . . . . . $enable_unixsock
3181 users . . . . . . . . $enable_users
3182 uuid . . . . . . . . $enable_uuid
3183 vmem . . . . . . . . $enable_vmem
3184 vserver . . . . . . . $enable_vserver
3185 wireless . . . . . . $enable_wireless
3186 xmms . . . . . . . . $enable_xmms
3190 if test "x$dependency_error" = "xyes"; then
3191 AC_MSG_ERROR("Some plugins are missing dependencies - see above summary for details")
3194 # vim: set fdm=marker :