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)
6 m4_ifdef([LT_PACKAGE_VERSION],
9 LT_CONFIG_LTDL_DIR([libltdl])
11 LTDL_INIT([convenience])
16 AC_LIBLTDL_CONVENIENCE
20 AC_CONFIG_SUBDIRS(libltdl)
24 AM_INIT_AUTOMAKE(dist-bzip2)
27 AC_PREFIX_DEFAULT("/opt/collectd")
32 # Checks for programs.
40 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
48 AC_MSG_CHECKING([for kernel type ($host_os)])
51 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
55 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
65 AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel])
71 AC_MSG_RESULT([$ac_system])
73 if test "x$ac_system" = "xLinux"
75 AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
76 if test -z "$KERNEL_DIR"
78 KERNEL_DIR="/lib/modules/`uname -r`/source"
81 KERNEL_CFLAGS="-I$KERNEL_DIR/include"
82 AC_SUBST(KERNEL_CFLAGS)
85 if test "x$ac_system" = "xSolaris"
87 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to enforce POSIX thread semantics under Solaris.])
90 # Where to install .pc files.
91 pkgconfigdir="${libdir}/pkgconfig"
92 AC_SUBST(pkgconfigdir)
94 # Check for standards compliance mode
95 AC_ARG_ENABLE(standards,
96 AS_HELP_STRING([--enable-standards], [Enable standards compliance mode]),
97 [enable_standards="$enableval"],
98 [enable_standards="no"])
99 if test "x$enable_standards" = "xyes"
101 AC_DEFINE(_ISOC99_SOURCE, 1, [Define to enforce ISO C99 compliance.])
102 AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Define to enforce POSIX.1-2001 compliance.])
103 AC_DEFINE(_XOPEN_SOURCE, 600, [Define to enforce X/Open 6 (XSI) compliance.])
104 AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.])
106 AM_CONDITIONAL(BUILD_FEATURE_STANDARDS, test "x$enable_standards" = "xyes")
109 # Checks for header files.
116 AC_CHECK_HEADERS(stdio.h stdint.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h)
119 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
124 # include <sys/types.h>
127 AC_CHECK_HEADERS(netinet/in.h, [], [],
132 # include <sys/types.h>
134 #if HAVE_NETINET_IN_SYSTM_H
135 # include <netinet/in_systm.h>
138 AC_CHECK_HEADERS(netinet/ip.h, [], [],
143 # include <sys/types.h>
145 #if HAVE_NETINET_IN_SYSTM_H
146 # include <netinet/in_systm.h>
148 #if HAVE_NETINET_IN_H
149 # include <netinet/in.h>
152 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
157 # include <sys/types.h>
159 #if HAVE_NETINET_IN_SYSTM_H
160 # include <netinet/in_systm.h>
162 #if HAVE_NETINET_IN_H
163 # include <netinet/in.h>
165 #if HAVE_NETINET_IP_H
166 # include <netinet/ip.h>
169 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
174 # include <sys/types.h>
176 #if HAVE_NETINET_IN_SYSTM_H
177 # include <netinet/in_systm.h>
179 #if HAVE_NETINET_IN_H
180 # include <netinet/in.h>
182 #if HAVE_NETINET_IP_H
183 # include <netinet/ip.h>
186 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
191 # include <sys/types.h>
193 #if HAVE_NETINET_IN_SYSTM_H
194 # include <netinet/in_systm.h>
196 #if HAVE_NETINET_IN_H
197 # include <netinet/in.h>
200 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
205 # include <sys/types.h>
207 #if HAVE_NETINET_IN_SYSTM_H
208 # include <netinet/in_systm.h>
210 #if HAVE_NETINET_IN_H
211 # include <netinet/in.h>
213 #if HAVE_NETINET_IP6_H
214 # include <netinet/ip6.h>
217 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
222 # include <sys/types.h>
224 #if HAVE_NETINET_IN_SYSTM_H
225 # include <netinet/in_systm.h>
227 #if HAVE_NETINET_IN_H
228 # include <netinet/in.h>
230 #if HAVE_NETINET_IP_H
231 # include <netinet/ip.h>
234 AC_CHECK_HEADERS(netinet/udp.h, [], [],
239 # include <sys/types.h>
241 #if HAVE_NETINET_IN_SYSTM_H
242 # include <netinet/in_systm.h>
244 #if HAVE_NETINET_IN_H
245 # include <netinet/in.h>
247 #if HAVE_NETINET_IP_H
248 # include <netinet/ip.h>
253 AC_CHECK_HEADERS(sys/dkstat.h)
254 if test "x$ac_system" = "xDarwin"
256 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)
257 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
259 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
262 # include <sys/types.h>
265 # include <sys/param.h>
269 AC_MSG_CHECKING([for sysctl kern.cp_times])
270 if test -x /sbin/sysctl
272 /sbin/sysctl kern.cp_times 2>/dev/null
276 AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIMES, 1,
277 [Define if sysctl supports kern.cp_times])
286 AC_CHECK_HEADERS(linux/major.h libgen.h)
288 # For the battery plugin
289 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
291 #if HAVE_IOKIT_IOKITLIB_H
292 # include <IOKit/IOKitLib.h>
294 #if HAVE_IOKIT_IOTYPES_H
295 # include <IOKit/IOTypes.h>
299 # For the swap module
300 have_linux_wireless_h="no"
301 if test "x$ac_system" = "xLinux"
303 AC_CHECK_HEADERS(linux/wireless.h,
304 [have_linux_wireless_h="yes"],
305 [have_linux_wireless_h="no"],
308 #include <sys/ioctl.h>
309 #include <sys/socket.h>
313 # For the swap module
314 have_sys_swap_h="yes"
315 AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
317 #undef _FILE_OFFSET_BITS
318 #undef _LARGEFILE64_SOURCE
320 # include <sys/types.h>
323 # include <sys/param.h>
327 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
330 if test "x$GCC" = "xyes"
332 hint_64="CFLAGS='-m64'"
334 hint_64="CFLAGS='-xarch=v9'"
336 AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
340 # For the processes plugin
342 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
344 # For interface plugin
345 AC_CHECK_HEADERS(ifaddrs.h)
346 AC_CHECK_HEADERS(net/if.h, [], [],
349 # include <sys/types.h>
351 #if HAVE_SYS_SOCKET_H
352 # include <sys/socket.h>
355 AC_CHECK_HEADERS(linux/if.h, [], [],
358 # include <sys/types.h>
360 #if HAVE_SYS_SOCKET_H
361 # include <sys/socket.h>
364 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
367 # include <sys/types.h>
369 #if HAVE_SYS_SOCKET_H
370 # include <sys/socket.h>
373 # include <linux/if.h>
378 have_net_ip_vs_h="no"
380 if test "x$ac_system" = "xLinux"
382 SAVE_CFLAGS="$CFLAGS"
383 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
385 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
386 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
388 CFLAGS="$SAVE_CFLAGS"
392 AC_CHECK_HEADERS(sys/ucred.h, [], [],
395 # include <sys/types.h>
398 # include <sys/param.h>
402 # For mount interface
403 AC_CHECK_HEADERS(sys/mount.h, [], [],
406 # include <sys/types.h>
409 # include <sys/param.h>
413 # For the email plugin
414 AC_CHECK_HEADERS(linux/un.h, [], [],
416 #if HAVE_SYS_SOCKET_H
417 # include <sys/socket.h>
421 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)
424 AC_CHECK_HEADERS(arpa/nameser.h)
425 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
427 #if HAVE_ARPA_NAMESER_H
428 # include <arpa/nameser.h>
432 AC_CHECK_HEADERS(net/if_arp.h, [], [],
433 [#if HAVE_SYS_SOCKET_H
434 # include <sys/socket.h>
437 AC_CHECK_HEADERS(net/ppp_defs.h)
438 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
439 [#if HAVE_NET_PPP_DEFS_H
440 # include <net/ppp_defs.h>
443 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
448 # include <sys/types.h>
450 #if HAVE_SYS_SOCKET_H
451 # include <sys/socket.h>
456 #if HAVE_NETINET_IN_H
457 # include <netinet/in.h>
461 # For the multimeter plugin
463 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
466 # Checks for typedefs, structures, and compiler characteristics.
475 # Checks for library functions.
477 AC_PROG_GCC_TRADITIONAL
478 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf)
482 AC_CACHE_CHECK([for strtok_r],
483 [c_cv_have_strtok_r_default],
492 char buffer[] = "foo,bar,baz";
499 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
502 printf ("token = %s;\n", token);
505 [c_cv_have_strtok_r_default="yes"],
506 [c_cv_have_strtok_r_default="no"]
510 if test "x$c_cv_have_strtok_r_default" = "xno"
512 SAVE_CFLAGS="$CFLAGS"
513 CFLAGS="$CFLAGS -D_REENTRANT=1"
515 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
516 [c_cv_have_strtok_r_reentrant],
525 char buffer[] = "foo,bar,baz";
532 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
535 printf ("token = %s;\n", token);
538 [c_cv_have_strtok_r_reentrant="yes"],
539 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
544 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
546 socket_needs_socket="no"
547 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
548 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
550 nanosleep_needs_rt="no"
551 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
552 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
554 AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
555 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
556 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
557 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
558 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
559 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
560 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
561 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
562 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
563 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
564 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
565 AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
568 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
571 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
573 if test "x$withval" = "xno"; then
575 else if test "x$withval" = "xyes"; then
582 if test "x$nan_type" = "xnone"; then
583 AC_CACHE_CHECK([whether NAN is defined by default],
584 [c_cv_have_nan_default],
590 static float foo = NAN;
598 [c_cv_have_nan_default="yes"],
599 [c_cv_have_nan_default="no"]
602 if test "x$c_cv_have_nan_default" = "xyes"
607 if test "x$nan_type" = "xnone"; then
608 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
609 [c_cv_have_nan_isoc],
614 #define __USE_ISOC99 1
616 static float foo = NAN;
624 [c_cv_have_nan_isoc="yes"],
625 [c_cv_have_nan_isoc="no"]
628 if test "x$c_cv_have_nan_isoc" = "xyes"
633 if test "x$nan_type" = "xnone"; then
634 SAVE_LDFLAGS=$LDFLAGS
635 LDFLAGS="$LDFLAGS -lm"
636 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
637 [c_cv_have_nan_zero],
646 #define NAN (0.0 / 0.0)
648 # define isnan(f) ((f) != (f))
650 static float foo = NAN;
658 [c_cv_have_nan_zero="yes"],
659 [c_cv_have_nan_zero="no"]
662 LDFLAGS=$SAVE_LDFLAGS
663 if test "x$c_cv_have_nan_zero" = "xyes"
669 if test "x$nan_type" = "xdefault"; then
670 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
671 [Define if NAN is defined by default and can initialize static variables.])
672 else if test "x$nan_type" = "xisoc99"; then
673 AC_DEFINE(NAN_STATIC_ISOC, 1,
674 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
675 else if test "x$nan_type" = "xzero"; then
676 AC_DEFINE(NAN_ZERO_ZERO, 1,
677 [Define if NAN can be defined as (0.0 / 0.0)])
679 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
682 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
684 if test "x$withval" = "xnothing"; then
685 fp_layout_type="nothing"
686 else if test "x$withval" = "xendianflip"; then
687 fp_layout_type="endianflip"
688 else if test "x$withval" = "xintswap"; then
689 fp_layout_type="intswap"
691 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
694 [fp_layout_type="unknown"])
696 if test "x$fp_layout_type" = "xunknown"; then
697 AC_CACHE_CHECK([if doubles are stored in x86 representation],
698 [c_cv_fp_layout_need_nothing],
709 # include <stdbool.h>
719 memcpy ((void *) &i0, (void *) &d, 8);
722 memcpy ((void *) c, (void *) &i1, 8);
724 if ((c[0] == 0x2f) && (c[1] == 0x25)
725 && (c[2] == 0xc0) && (c[3] == 0xc7)
726 && (c[4] == 0x43) && (c[5] == 0x2b)
727 && (c[6] == 0x1f) && (c[7] == 0x5b))
732 [c_cv_fp_layout_need_nothing="yes"],
733 [c_cv_fp_layout_need_nothing="no"]
736 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
737 fp_layout_type="nothing"
740 if test "x$fp_layout_type" = "xunknown"; then
741 AC_CACHE_CHECK([if endianflip converts to x86 representation],
742 [c_cv_fp_layout_need_endianflip],
753 # include <stdbool.h>
755 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
756 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
757 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
758 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
759 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
760 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
761 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
762 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
771 memcpy ((void *) &i0, (void *) &d, 8);
773 i1 = endianflip (i0);
774 memcpy ((void *) c, (void *) &i1, 8);
776 if ((c[0] == 0x2f) && (c[1] == 0x25)
777 && (c[2] == 0xc0) && (c[3] == 0xc7)
778 && (c[4] == 0x43) && (c[5] == 0x2b)
779 && (c[6] == 0x1f) && (c[7] == 0x5b))
784 [c_cv_fp_layout_need_endianflip="yes"],
785 [c_cv_fp_layout_need_endianflip="no"]
788 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
789 fp_layout_type="endianflip"
792 if test "x$fp_layout_type" = "xunknown"; then
793 AC_CACHE_CHECK([if intswap converts to x86 representation],
794 [c_cv_fp_layout_need_intswap],
805 # include <stdbool.h>
807 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
808 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
817 memcpy ((void *) &i0, (void *) &d, 8);
820 memcpy ((void *) c, (void *) &i1, 8);
822 if ((c[0] == 0x2f) && (c[1] == 0x25)
823 && (c[2] == 0xc0) && (c[3] == 0xc7)
824 && (c[4] == 0x43) && (c[5] == 0x2b)
825 && (c[6] == 0x1f) && (c[7] == 0x5b))
830 [c_cv_fp_layout_need_intswap="yes"],
831 [c_cv_fp_layout_need_intswap="no"]
834 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
835 fp_layout_type="intswap"
839 if test "x$fp_layout_type" = "xnothing"; then
840 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
841 [Define if doubles are stored in x86 representation.])
842 else if test "x$fp_layout_type" = "xendianflip"; then
843 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
844 [Define if endianflip is needed to convert to x86 representation.])
845 else if test "x$fp_layout_type" = "xintswap"; then
846 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
847 [Define if intswap is needed to convert to x86 representation.])
849 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
853 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
855 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
857 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
860 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
861 if test "x$have_getmntent" = "xno"; then
862 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
864 if test "x$have_getmntent" = "xno"; then
865 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
867 if test "x$have_getmntent" = "xno"; then
868 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
871 if test "x$have_getmntent" = "xc"; then
872 AC_CACHE_CHECK([whether getmntent takes one argument],
873 [c_cv_have_one_getmntent],
875 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
876 #include "$srcdir/src/utils_mount.h"]],
880 fh = setmntent ("/etc/mtab", "r");
884 [c_cv_have_one_getmntent="yes"],
885 [c_cv_have_one_getmntent="no"]
888 AC_CACHE_CHECK([whether getmntent takes two arguments],
889 [c_cv_have_two_getmntent],
891 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
892 #include "$srcdir/src/utils_mount.h"]],
897 fh = fopen ("/etc/mnttab", "r");
898 status = getmntent (fh, &mt);
901 [c_cv_have_two_getmntent="yes"],
902 [c_cv_have_two_getmntent="no"]
907 # Check for different versions of `getmntent' here..
909 if test "x$have_getmntent" = "xc"; then
910 if test "x$c_cv_have_one_getmntent" = "xyes"; then
911 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
912 [Define if the function getmntent exists and takes one argument.])
914 if test "x$c_cv_have_two_getmntent" = "xyes"; then
915 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
916 [Define if the function getmntent exists and takes two arguments.])
919 if test "x$have_getmntent" = "xsun"; then
920 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
921 [Define if the function getmntent exists. It's the version from libsun.])
923 if test "x$have_getmntent" = "xseq"; then
924 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
925 [Define if the function getmntent exists. It's the version from libseq.])
927 if test "x$have_getmntent" = "xgen"; then
928 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
929 [Define if the function getmntent exists. It's the version from libgen.])
932 # Check for structures
933 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
934 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
937 #include <sys/types.h>
938 #include <sys/socket.h>
941 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
942 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
945 #include <sys/types.h>
946 #include <sys/socket.h>
947 #include <linux/if.h>
948 #include <linux/netdevice.h>
951 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
953 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
954 [Define if struct kinfo_proc exists in the FreeBSD variant.])
955 have_struct_kinfo_proc_freebsd="yes"
958 have_struct_kinfo_proc_freebsd="no"
962 #include <sys/param.h>
963 #include <sys/sysctl.h>
964 #include <sys/user.h>
967 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
969 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
970 [Define if struct kinfo_proc exists in the OpenBSD variant.])
971 have_struct_kinfo_proc_openbsd="yes"
974 have_struct_kinfo_proc_openbsd="no"
977 #include <sys/param.h>
978 #include <sys/sysctl.h>
982 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
988 # include <sys/types.h>
990 #if HAVE_NETINET_IN_SYSTM_H
991 # include <netinet/in_systm.h>
993 #if HAVE_NETINET_IN_H
994 # include <netinet/in.h>
996 #if HAVE_NETINET_IP_H
997 # include <netinet/ip.h>
999 #if HAVE_NETINET_UDP_H
1000 # include <netinet/udp.h>
1003 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
1004 [#define _BSD_SOURCE
1006 # include <stdint.h>
1008 #if HAVE_SYS_TYPES_H
1009 # include <sys/types.h>
1011 #if HAVE_NETINET_IN_SYSTM_H
1012 # include <netinet/in_systm.h>
1014 #if HAVE_NETINET_IN_H
1015 # include <netinet/in.h>
1017 #if HAVE_NETINET_IP_H
1018 # include <netinet/ip.h>
1020 #if HAVE_NETINET_UDP_H
1021 # include <netinet/udp.h>
1025 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
1035 # Checks for libraries begin here
1037 with_libresolv="yes"
1038 AC_CHECK_LIB(resolv, res_search,
1040 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
1042 [with_libresolv="no"])
1043 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
1045 dnl Check for HAL (hardware abstraction library)
1047 AC_CHECK_LIB(hal,libhal_device_property_exists,
1048 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
1050 if test "x$with_libhal" = "xyes"; then
1051 if test "x$PKG_CONFIG" != "x"; then
1052 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
1053 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
1054 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
1055 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
1059 m4_divert_once([HELP_WITH], [
1060 collectd additional packages:])
1062 AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
1064 if test "x$ac_system" = "xAIX"
1069 with_perfstat="no (AIX only)"
1070 with_procinfo="no (AIX only)"
1073 if test "x$with_perfstat" = "xyes"
1075 AC_CHECK_LIB(perfstat, perfstat_reset, [with_perfstat="yes"], [with_perfstat="no (perfstat not found)"], [])
1076 # AC_CHECK_HEADERS(sys/protosw.h libperfstat.h,, [with_perfstat="no (perfstat not found)"])
1078 if test "x$with_perfstat" = "xyes"
1080 AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)])
1082 AM_CONDITIONAL(BUILD_WITH_PERFSTAT, test "x$with_perfstat" = "xyes")
1084 if test "x$with_procinfo" = "xyes"
1086 AC_CHECK_HEADERS(procinfo.h,, [with_procinfo="no (procinfo.h not found)"])
1088 if test "x$with_procinfo" = "xyes"
1090 AC_DEFINE(HAVE_PROCINFO_H, 1, [Define to 1 if you have the procinfo.h])
1092 AM_CONDITIONAL(BUILD_WITH_PROCINFO_H, test "x$with_procinfo" = "xyes")
1094 if test "x$ac_system" = "xSolaris"
1099 with_kstat="no (Solaris only)"
1100 with_devinfo="no (Solaris only)"
1103 if test "x$with_kstat" = "xyes"
1105 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1107 if test "x$with_kstat" = "xyes"
1109 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1110 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1112 if test "x$with_kstat" = "xyes"
1114 AC_DEFINE(HAVE_LIBKSTAT, 1,
1115 [Define to 1 if you have the 'kstat' library (-lkstat)])
1117 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1118 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1121 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1128 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1131 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1132 if test "x$with_kvm_getprocs" = "xyes"
1134 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1135 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1138 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1140 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1141 if test "x$with_kvm_getswapinfo" = "xyes"
1143 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1144 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1147 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1149 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1150 if test "x$with_kvm_nlist" = "xyes"
1152 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1153 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1156 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1158 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1159 if test "x$with_kvm_openfiles" = "xyes"
1161 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1162 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1165 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1167 # --with-libcurl {{{
1168 with_curl_config="curl-config"
1171 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1173 if test "x$withval" = "xno"
1176 else if test "x$withval" = "xyes"
1180 if test -f "$withval" && test -x "$withval"
1182 with_curl_config="$withval"
1184 else if test -x "$withval/bin/curl-config"
1186 with_curl_config="$withval/bin/curl-config"
1195 if test "x$with_libcurl" = "xyes"
1197 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1198 curl_config_status=$?
1200 if test $curl_config_status -ne 0
1202 with_libcurl="no ($with_curl_config failed)"
1204 SAVE_CPPFLAGS="$CPPFLAGS"
1205 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1207 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1209 CPPFLAGS="$SAVE_CPPFLAGS"
1212 if test "x$with_libcurl" = "xyes"
1214 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1215 curl_config_status=$?
1217 if test $curl_config_status -ne 0
1219 with_libcurl="no ($with_curl_config failed)"
1221 AC_CHECK_LIB(curl, curl_easy_init,
1222 [with_libcurl="yes"],
1223 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1227 if test "x$with_libcurl" = "xyes"
1229 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1230 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1231 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1232 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1234 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1238 with_libdbi_cppflags=""
1239 with_libdbi_ldflags=""
1240 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1242 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1244 with_libdbi_cppflags="-I$withval/include"
1245 with_libdbi_ldflags="-L$withval/lib"
1248 with_libdbi="$withval"
1254 if test "x$with_libdbi" = "xyes"
1256 SAVE_CPPFLAGS="$CPPFLAGS"
1257 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1259 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1261 CPPFLAGS="$SAVE_CPPFLAGS"
1263 if test "x$with_libdbi" = "xyes"
1265 SAVE_CPPFLAGS="$CPPFLAGS"
1266 SAVE_LDFLAGS="$LDFLAGS"
1267 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1268 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1270 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1272 CPPFLAGS="$SAVE_CPPFLAGS"
1273 LDFLAGS="$SAVE_LDFLAGS"
1275 if test "x$with_libdbi" = "xyes"
1277 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1278 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1279 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1280 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1281 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1282 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1284 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1287 # --with-libesmtp {{{
1288 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1290 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1292 LDFLAGS="$LDFLAGS -L$withval/lib"
1293 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1296 with_libesmtp="$withval"
1302 if test "x$with_libesmtp" = "xyes"
1304 AC_CHECK_LIB(esmtp, smtp_create_session,
1306 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1307 ], [with_libesmtp="no (libesmtp not found)"])
1309 if test "x$with_libesmtp" = "xyes"
1311 AC_CHECK_HEADERS(libesmtp.h,
1313 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1314 ], [with_libesmtp="no (libesmtp.h not found)"])
1316 if test "x$with_libesmtp" = "xyes"
1322 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1323 [Wether or not to use the esmtp library])
1324 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1327 # --with-libganglia {{{
1328 AC_ARG_WITH(libganglia, [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
1330 if test -f "$withval" && test -x "$withval"
1332 with_libganglia_config="$withval"
1333 with_libganglia="yes"
1334 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"
1336 with_libganglia_config="$withval/bin/ganglia-config"
1337 with_libganglia="yes"
1338 else if test -d "$withval"
1340 GANGLIA_CPPFLAGS="-I$withval/include"
1341 GANGLIA_LDFLAGS="-L$withval/lib"
1342 with_libganglia="yes"
1344 with_libganglia_config="ganglia-config"
1345 with_libganglia="$withval"
1349 with_libganglia_config="ganglia-config"
1350 with_libganglia="yes"
1353 if test "x$with_libganglia" = "xyes" && test "x$with_libganglia_config" != "x"
1355 if test "x$GANGLIA_CPPFLAGS" = "x"
1357 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
1360 if test "x$GANGLIA_LDFLAGS" = "x"
1362 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
1365 if test "x$GANGLIA_LIBS" = "x"
1367 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
1371 SAVE_CPPFLAGS="$CPPFLAGS"
1372 SAVE_LDFLAGS="$LDFLAGS"
1373 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
1374 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
1376 if test "x$with_libganglia" = "xyes"
1378 AC_CHECK_HEADERS(gm_protocol.h,
1380 AC_DEFINE(HAVE_GM_PROTOCOL_H, 1,
1381 [Define to 1 if you have the <gm_protocol.h> header file.])
1382 ], [with_libganglia="no (gm_protocol.h not found)"])
1385 if test "x$with_libganglia" = "xyes"
1387 AC_CHECK_LIB(ganglia, xdr_Ganglia_value_msg,
1389 AC_DEFINE(HAVE_LIBGANGLIA, 1,
1390 [Define to 1 if you have the ganglia library (-lganglia).])
1391 ], [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"])
1394 CPPFLAGS="$SAVE_CPPFLAGS"
1395 LDFLAGS="$SAVE_LDFLAGS"
1397 AC_SUBST(GANGLIA_CPPFLAGS)
1398 AC_SUBST(GANGLIA_LDFLAGS)
1399 AC_SUBST(GANGLIA_LIBS)
1400 AM_CONDITIONAL(BUILD_WITH_LIBGANGLIA, test "x$with_libganglia" = "xyes")
1403 # --with-libgcrypt {{{
1404 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
1405 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
1406 GCRYPT_LIBS="$GCRYPT_LIBS"
1407 AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
1409 if test -f "$withval" && test -x "$withval"
1411 with_libgcrypt_config="$withval"
1412 with_libgcrypt="yes"
1413 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"
1415 with_libgcrypt_config="$withval/bin/gcrypt-config"
1416 with_libgcrypt="yes"
1417 else if test -d "$withval"
1419 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
1420 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
1421 with_libgcrypt="yes"
1423 with_libgcrypt_config="gcrypt-config"
1424 with_libgcrypt="$withval"
1428 with_libgcrypt_config="libgcrypt-config"
1429 with_libgcrypt="yes"
1432 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"
1434 if test "x$GCRYPT_CPPFLAGS" = "x"
1436 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
1439 if test "x$GCRYPT_LDFLAGS" = "x"
1441 gcrypt_exec_prefix=`"$with_libgcrypt_config" --exec-prefix 2>/dev/null`
1442 GCRYPT_LDFLAGS="-L$gcrypt_exec_prefix/lib"
1445 if test "x$GCRYPT_LIBS" = "x"
1447 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
1451 SAVE_CPPFLAGS="$CPPFLAGS"
1452 SAVE_LDFLAGS="$LDFLAGS"
1453 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
1454 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
1456 if test "x$with_libgcrypt" = "xyes"
1458 if test "x$GCRYPT_CPPFLAGS" != "x"
1460 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
1462 AC_CHECK_HEADERS(gcrypt.h,
1463 [with_libgcrypt="yes"],
1464 [with_libgcrypt="no (gcrypt.h not found)"])
1467 if test "x$with_libgcrypt" = "xyes"
1469 if test "x$GCRYPT_LDFLAGS" != "x"
1471 AC_MSG_NOTICE([gcrypt LDFLAGS: $GCRYPT_LDFLAGS])
1473 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
1474 [with_libgcrypt="yes"],
1475 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
1477 if test "$with_libgcrypt" != "no"; then
1478 AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")
1482 CPPFLAGS="$SAVE_CPPFLAGS"
1483 LDFLAGS="$SAVE_LDFLAGS"
1485 if test "x$with_libgcrypt" = "xyes"
1487 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to 1 if you have the gcrypt library (-lgcrypt).])
1490 AC_SUBST(GCRYPT_CPPFLAGS)
1491 AC_SUBST(GCRYPT_LDFLAGS)
1492 AC_SUBST(GCRYPT_LIBS)
1493 AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes")
1496 # --with-libiptc {{{
1497 with_own_libiptc="no"
1498 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1500 if test "x$withval" = "xshipped"
1502 with_own_libiptc="yes"
1504 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1506 LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
1507 LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
1510 with_libiptc="$withval"
1514 if test "x$ac_system" = "xLinux"
1518 with_libiptc="no (Linux only)"
1521 SAVE_CPPFLAGS="$CPPFLAGS"
1522 SAVE_LDFLAGS="$LDFLAGS"
1523 CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
1524 LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS"
1525 # check whether the header file for libiptc is available.
1526 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1528 AC_CHECK_HEADERS(libiptc/libiptc.h,
1530 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1534 with_own_libiptc="yes"
1537 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1539 AC_CHECK_HEADERS(libiptc/libip6tc.h,
1541 AC_DEFINE(HAVE_LIBIPTC_LIBIP6TC_H, 1, [Define to 1 if you have the <libiptc/libip6tc.h> header file.])
1545 with_own_libiptc="yes"
1548 # If the header file is available, check for the required type declaractions.
1549 # They may be missing in old versions of libiptc. In that case, they will be
1550 # declared in the iptables plugin.
1551 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1553 AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
1556 # include "$srcdir/src/owniptc/libiptc.h"
1557 # include "$srcdir/src/owniptc/libip6tc.h"
1559 # include <libiptc/libiptc.h>
1560 # include <libiptc/libip6tc.h>
1564 # Check for the iptc_init symbol in the library.
1565 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1567 AC_CHECK_LIB(iptc, iptc_init,
1569 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1573 with_own_libiptc="yes"
1576 # The system wide version failed for some reason. Check if we have the required
1577 # headers to build the shipped version.
1578 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
1580 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
1582 with_libiptc="no (Linux iptables headers not found)"
1583 with_own_libiptc="no"
1586 #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
1589 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1590 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1591 if test "x$with_libiptc" = "xyes"
1593 BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
1594 BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
1595 AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
1596 AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
1598 if test "x$with_own_libiptc" = "xyes"
1600 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1602 CPPFLAGS="$SAVE_CPPFLAGS"
1603 LDFLAGS="$SAVE_LDFLAGS"
1607 with_java_home="$JAVA_HOME"
1608 with_java_vmtype="client"
1612 AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
1614 if test "x$withval" = "xno"
1617 else if test "x$withval" = "xyes"
1621 with_java_home="$withval"
1626 if test "x$with_java" = "xyes"
1628 if test -d "$with_java_home"
1630 AC_MSG_CHECKING([for jni.h])
1631 TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1632 if test "x$TMPDIR" != "x"
1634 AC_MSG_RESULT([found in $TMPDIR])
1635 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1637 AC_MSG_RESULT([not found])
1640 AC_MSG_CHECKING([for jni_md.h])
1641 TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1642 if test "x$TMPDIR" != "x"
1644 AC_MSG_RESULT([found in $TMPDIR])
1645 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1647 AC_MSG_RESULT([not found])
1650 AC_MSG_CHECKING([for libjvm.so])
1651 TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
1652 if test "x$TMPDIR" != "x"
1654 AC_MSG_RESULT([found in $TMPDIR])
1655 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR"
1657 AC_MSG_RESULT([not found])
1660 if test "x$JAVAC" = "x"
1662 AC_MSG_CHECKING([for javac])
1663 TMPDIR=`find "$with_java_home" -name javac -type f | head -n 1`
1664 if test "x$TMPDIR" != "x"
1667 AC_MSG_RESULT([$JAVAC])
1669 AC_MSG_RESULT([not found])
1672 else if test "x$with_java_home" != "x"
1674 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
1678 if test "x$JAVA_CPPFLAGS" != "x"
1680 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
1682 if test "x$JAVA_CFLAGS" != "x"
1684 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
1686 if test "x$JAVA_LDFLAGS" != "x"
1688 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
1690 if test "x$JAVAC" = "x"
1692 with_javac_path="$PATH"
1693 if test "x$with_java_home" != "x"
1695 with_javac_path="$with_java_home:with_javac_path"
1696 if test -d "$with_java_home/bin"
1698 with_javac_path="$with_java_home/bin:with_javac_path"
1702 AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path")
1704 if test "x$JAVAC" = "x"
1706 with_java="no (javac not found)"
1709 SAVE_CPPFLAGS="$CPPFLAGS"
1710 SAVE_CFLAGS="$CFLAGS"
1711 SAVE_LDFLAGS="$LDFLAGS"
1712 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
1713 CFLAGS="$CFLAGS $JAVA_CFLAGS"
1714 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
1716 if test "x$with_java" = "xyes"
1718 AC_CHECK_HEADERS(jni.h, [], [with_java="no (jni.h not found)"])
1720 if test "x$with_java" = "xyes"
1722 AC_CHECK_LIB(jvm, JNI_CreateJavaVM,
1724 [with_java="no (libjvm not found)"],
1727 if test "x$with_java" = "xyes"
1729 JAVA_LIBS="$JAVA_LIBS -ljvm"
1730 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
1733 CPPFLAGS="$SAVE_CPPFLAGS"
1734 CFLAGS="$SAVE_CFLAGS"
1735 LDFLAGS="$SAVE_LDFLAGS"
1737 AC_SUBST(JAVA_CPPFLAGS)
1738 AC_SUBST(JAVA_CFLAGS)
1739 AC_SUBST(JAVA_LDFLAGS)
1741 AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
1744 # --with-libmemcached {{{
1745 with_libmemcached_cppflags=""
1746 with_libmemcached_ldflags=""
1747 AC_ARG_WITH(libmemcached, [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
1749 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1751 with_libmemcached_cppflags="-I$withval/include"
1752 with_libmemcached_ldflags="-L$withval/lib"
1753 with_libmemcached="yes"
1755 with_libmemcached="$withval"
1759 with_libmemcached="yes"
1761 if test "x$with_libmemcached" = "xyes"
1763 SAVE_CPPFLAGS="$CPPFLAGS"
1764 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1766 AC_CHECK_HEADERS(libmemcached/memcached.h, [with_libmemcached="yes"], [with_libmemcached="no (libmemcached/memcached.h not found)"])
1768 CPPFLAGS="$SAVE_CPPFLAGS"
1770 if test "x$with_libmemcached" = "xyes"
1772 SAVE_CPPFLAGS="$CPPFLAGS"
1773 SAVE_LDFLAGS="$LDFLAGS"
1774 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1775 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
1777 AC_CHECK_LIB(memcached, memcached_create, [with_libmemcached="yes"], [with_libmemcached="no (Symbol 'memcached_create' not found)"])
1779 CPPFLAGS="$SAVE_CPPFLAGS"
1780 LDFLAGS="$SAVE_LDFLAGS"
1782 if test "x$with_libmemcached" = "xyes"
1784 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
1785 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
1786 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
1787 AC_SUBST(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1788 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1789 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LIBS)
1790 AC_DEFINE(HAVE_LIBMEMCACHED, 1, [Define if libmemcached is present and usable.])
1792 AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
1795 # --with-libmysql {{{
1796 with_mysql_config="mysql_config"
1797 with_mysql_cflags=""
1799 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1801 if test "x$withval" = "xno"
1804 else if test "x$withval" = "xyes"
1808 if test -f "$withval" && test -x "$withval";
1810 with_mysql_config="$withval"
1811 else if test -x "$withval/bin/mysql_config"
1813 with_mysql_config="$withval/bin/mysql_config"
1821 if test "x$with_libmysql" = "xyes"
1823 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1824 mysql_config_status=$?
1826 if test $mysql_config_status -ne 0
1828 with_libmysql="no ($with_mysql_config failed)"
1830 SAVE_CPPFLAGS="$CPPFLAGS"
1831 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1834 have_mysql_mysql_h="no"
1835 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
1837 if test "x$have_mysql_h" = "xno"
1839 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
1842 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
1844 with_libmysql="no (mysql.h not found)"
1847 CPPFLAGS="$SAVE_CPPFLAGS"
1850 if test "x$with_libmysql" = "xyes"
1852 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1853 mysql_config_status=$?
1855 if test $mysql_config_status -ne 0
1857 with_libmysql="no ($with_mysql_config failed)"
1859 AC_CHECK_LIB(mysqlclient, mysql_init,
1860 [with_libmysql="yes"],
1861 [with_libmysql="no (symbol 'mysql_init' not found)"],
1864 AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
1865 [with_libmysql="yes"],
1866 [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
1870 if test "x$with_libmysql" = "xyes"
1872 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1873 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1874 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1875 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1877 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1880 # --with-libnetlink {{{
1881 with_libnetlink_cflags=""
1882 with_libnetlink_libs="-lnetlink"
1883 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1885 echo "libnetlink: withval = $withval"
1886 if test "x$withval" = "xyes"
1888 with_libnetlink="yes"
1889 else if test "x$withval" = "xno"
1891 with_libnetlink="no"
1893 if test -d "$withval/include"
1895 with_libnetlink_cflags="-I$withval/include"
1896 with_libnetlink_libs="-L$withval/lib -lnetlink"
1897 with_libnetlink="yes"
1899 AC_MSG_ERROR("no such directory: $withval/include")
1904 if test "x$ac_system" = "xLinux"
1906 with_libnetlink="yes"
1908 with_libnetlink="no (Linux only library)"
1911 if test "x$with_libnetlink" = "xyes"
1913 SAVE_CFLAGS="$CFLAGS"
1914 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1916 with_libnetlink="no (libnetlink.h not found)"
1918 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1920 with_libnetlink="yes"
1924 #include <sys/types.h>
1925 #include <asm/types.h>
1926 #include <sys/socket.h>
1927 #include <linux/netlink.h>
1928 #include <linux/rtnetlink.h>])
1929 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1931 #include <sys/types.h>
1932 #include <asm/types.h>
1933 #include <sys/socket.h>])
1937 #include <sys/types.h>
1938 #include <asm/types.h>
1939 #include <sys/socket.h>
1940 #include <linux/netlink.h>
1941 #include <linux/rtnetlink.h>
1945 int retval = TCA_STATS2;
1948 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1953 #include <sys/types.h>
1954 #include <asm/types.h>
1955 #include <sys/socket.h>
1956 #include <linux/netlink.h>
1957 #include <linux/rtnetlink.h>
1961 int retval = TCA_STATS;
1964 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1967 CFLAGS="$SAVE_CFLAGS"
1969 if test "x$with_libnetlink" = "xyes"
1971 AC_CHECK_LIB(netlink, rtnl_open,
1972 [with_libnetlink="yes"],
1973 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1974 [$with_libnetlink_libs])
1976 if test "x$with_libnetlink" = "xyes"
1978 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1979 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1980 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1981 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1983 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1986 # --with-libnetapp {{{
1987 AC_ARG_VAR([LIBNETAPP_CPPFLAGS], [C preprocessor flags required to build with libnetapp])
1988 AC_ARG_VAR([LIBNETAPP_LDFLAGS], [Linker flags required to build with libnetapp])
1989 AC_ARG_VAR([LIBNETAPP_LIBS], [Other libraries required to link against libnetapp])
1990 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS"
1991 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS"
1992 LIBNETAPP_LIBS="$LIBNETAPP_LIBS"
1993 AC_ARG_WITH(libnetapp, [AS_HELP_STRING([--with-libnetapp@<:@=PREFIX@:>@], [Path to libnetapp.])],
1995 if test -d "$withval"
1997 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS -I$withval/include"
1998 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS -L$withval/lib"
1999 with_libnetapp="yes"
2001 with_libnetapp="$withval"
2005 with_libnetapp="yes"
2008 SAVE_CPPFLAGS="$CPPFLAGS"
2009 SAVE_LDFLAGS="$LDFLAGS"
2010 CPPFLAGS="$CPPFLAGS $LIBNETAPP_CPPFLAGS"
2011 LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
2013 if test "x$with_libnetapp" = "xyes"
2015 if test "x$LIBNETAPP_CPPFLAGS" != "x"
2017 AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
2019 AC_CHECK_HEADERS(netapp_api.h,
2020 [with_libnetapp="yes"],
2021 [with_libnetapp="no (netapp_api.h not found)"])
2024 if test "x$with_libnetapp" = "xyes"
2026 if test "x$LIBNETAPP_LDFLAGS" != "x"
2028 AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
2031 if test "x$LIBNETAPP_LIBS" = "x"
2033 LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm -lcrypto -lz"
2035 AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
2037 AC_CHECK_LIB(netapp, na_server_invoke_elem,
2038 [with_libnetapp="yes"],
2039 [with_libnetapp="no (symbol na_server_invoke_elem not found)"],
2041 LIBNETAPP_LIBS="-lnetapp $LIBNETAPP_LIBS"
2044 CPPFLAGS="$SAVE_CPPFLAGS"
2045 LDFLAGS="$SAVE_LDFLAGS"
2047 if test "x$with_libnetapp" = "xyes"
2049 AC_DEFINE(HAVE_LIBNETAPP, 1, [Define to 1 if you have the netapp library (-lnetapp).])
2052 AC_SUBST(LIBNETAPP_CPPFLAGS)
2053 AC_SUBST(LIBNETAPP_LDFLAGS)
2054 AC_SUBST(LIBNETAPP_LIBS)
2055 AM_CONDITIONAL(BUILD_WITH_LIBNETAPP, test "x$with_libnetapp" = "xyes")
2058 # --with-libnetsnmp {{{
2059 with_snmp_config="net-snmp-config"
2062 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
2064 if test "x$withval" = "xno"
2066 with_libnetsnmp="no"
2067 else if test "x$withval" = "xyes"
2069 with_libnetsnmp="yes"
2071 if test -x "$withval"
2073 with_snmp_config="$withval"
2074 with_libnetsnmp="yes"
2076 with_snmp_config="$withval/bin/net-snmp-config"
2077 with_libnetsnmp="yes"
2081 [with_libnetsnmp="yes"])
2082 if test "x$with_libnetsnmp" = "xyes"
2084 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
2085 snmp_config_status=$?
2087 if test $snmp_config_status -ne 0
2089 with_libnetsnmp="no ($with_snmp_config failed)"
2091 SAVE_CPPFLAGS="$CPPFLAGS"
2092 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
2094 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
2096 CPPFLAGS="$SAVE_CPPFLAGS"
2099 if test "x$with_libnetsnmp" = "xyes"
2101 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
2102 snmp_config_status=$?
2104 if test $snmp_config_status -ne 0
2106 with_libnetsnmp="no ($with_snmp_config failed)"
2108 AC_CHECK_LIB(netsnmp, init_snmp,
2109 [with_libnetsnmp="yes"],
2110 [with_libnetsnmp="no (libnetsnmp not found)"],
2114 if test "x$with_libnetsnmp" = "xyes"
2116 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
2117 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
2118 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
2119 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
2121 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
2124 # --with-liboconfig {{{
2125 with_own_liboconfig="no"
2126 liboconfig_LDFLAGS="$LDFLAGS"
2127 liboconfig_CPPFLAGS="$CPPFLAGS"
2128 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
2130 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2132 if test -d "$withval/lib"
2134 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
2136 if test -d "$withval/include"
2138 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
2141 if test "x$withval" = "xno"
2143 AC_MSG_ERROR("liboconfig is required")
2147 with_liboconfig="yes"
2150 save_LDFLAGS="$LDFLAGS"
2151 save_CPPFLAGS="$CPPFLAGS"
2152 LDFLAGS="$liboconfig_LDFLAGS"
2153 CPPFLAGS="$liboconfig_CPPFLAGS"
2154 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
2156 with_liboconfig="yes"
2157 with_own_liboconfig="no"
2160 with_liboconfig="yes"
2161 with_own_liboconfig="yes"
2162 LDFLAGS="$save_LDFLAGS"
2163 CPPFLAGS="$save_CPPFLAGS"
2166 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
2167 if test "x$with_own_liboconfig" = "xyes"
2169 with_liboconfig="yes (shipped version)"
2173 # --with-liboping {{{
2174 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
2176 if test "x$withval" = "xyes"
2179 else if test "x$withval" = "xno"
2184 LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS -I$withval/include"
2185 LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS -L$withval/lib"
2188 [with_liboping="yes"])
2190 SAVE_CPPFLAGS="$CPPFLAGS"
2191 SAVE_LDFLAGS="$LDFLAGS"
2193 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
2194 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
2196 if test "x$with_liboping" = "xyes"
2198 if test "x$LIBOPING_CPPFLAGS" != "x"
2200 AC_MSG_NOTICE([liboping CPPFLAGS: $LIBOPING_CPPFLAGS])
2202 AC_CHECK_HEADERS(oping.h,
2203 [with_liboping="yes"],
2204 [with_liboping="no ('oping.h' not found)"])
2206 if test "x$with_liboping" = "xyes"
2208 if test "x$LIBOPING_LDFLAGS" != "x"
2210 AC_MSG_NOTICE([liboping LDFLAGS: $LIBOPING_LDFLAGS])
2212 AC_CHECK_LIB(oping, ping_construct,
2213 [with_liboping="yes"],
2214 [with_liboping="no (symbol 'ping_construct' not found)"])
2217 CPPFLAGS="$SAVE_CPPFLAGS"
2218 LDFLAGS="$SAVE_LDFLAGS"
2220 if test "x$with_liboping" = "xyes"
2222 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
2223 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
2224 AC_SUBST(BUILD_WITH_LIBOPING_CPPFLAGS)
2225 AC_SUBST(BUILD_WITH_LIBOPING_LDFLAGS)
2227 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
2231 with_oracle_cppflags=""
2233 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
2235 if test "x$withval" = "xyes"
2237 if test "x$ORACLE_HOME" = "x"
2239 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
2242 else if test "x$withval" = "xno"
2247 ORACLE_HOME="$withval"
2251 if test "x$ORACLE_HOME" = "x"
2253 with_oracle="no (ORACLE_HOME is not set)"
2258 if test "x$ORACLE_HOME" != "x"
2260 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
2262 if test -e "$ORACLE_HOME/lib/ldflags"
2264 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
2266 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
2267 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
2269 if test "x$with_oracle" = "xyes"
2271 SAVE_CPPFLAGS="$CPPFLAGS"
2272 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2274 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
2276 CPPFLAGS="$SAVE_CPPFLAGS"
2278 if test "x$with_oracle" = "xyes"
2280 SAVE_CPPFLAGS="$CPPFLAGS"
2281 SAVE_LDFLAGS="$LDFLAGS"
2282 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2283 LDFLAGS="$LDFLAGS $with_oracle_libs"
2285 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
2287 CPPFLAGS="$SAVE_CPPFLAGS"
2288 LDFLAGS="$SAVE_LDFLAGS"
2290 if test "x$with_oracle" = "xyes"
2292 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
2293 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
2294 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
2295 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
2299 # --with-libowcapi {{{
2300 with_libowcapi_cppflags=""
2301 with_libowcapi_libs="-lowcapi"
2302 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
2304 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2306 with_libowcapi_cppflags="-I$withval/include"
2307 with_libowcapi_libs="-L$withval/lib -lowcapi"
2308 with_libowcapi="yes"
2310 with_libowcapi="$withval"
2314 with_libowcapi="yes"
2316 if test "x$with_libowcapi" = "xyes"
2318 SAVE_CPPFLAGS="$CPPFLAGS"
2319 CPPFLAGS="$with_libowcapi_cppflags"
2321 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
2323 CPPFLAGS="$SAVE_CPPFLAGS"
2325 if test "x$with_libowcapi" = "xyes"
2327 SAVE_LDFLAGS="$LDFLAGS"
2328 SAVE_CPPFLAGS="$CPPFLAGS"
2329 LDFLAGS="$with_libowcapi_libs"
2330 CPPFLAGS="$with_libowcapi_cppflags"
2332 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
2334 LDFLAGS="$SAVE_LDFLAGS"
2335 CPPFLAGS="$SAVE_CPPFLAGS"
2337 if test "x$with_libowcapi" = "xyes"
2339 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
2340 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
2341 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
2342 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
2346 # --with-libpcap {{{
2347 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
2349 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2351 LDFLAGS="$LDFLAGS -L$withval/lib"
2352 CPPFLAGS="$CPPFLAGS -I$withval/include"
2355 with_libpcap="$withval"
2361 if test "x$with_libpcap" = "xyes"
2363 AC_CHECK_LIB(pcap, pcap_open_live,
2365 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
2366 ], [with_libpcap="no (libpcap not found)"])
2368 if test "x$with_libpcap" = "xyes"
2370 AC_CHECK_HEADERS(pcap.h,
2372 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
2373 ], [with_libpcap="no (pcap.h not found)"])
2375 if test "x$with_libpcap" = "xyes"
2381 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
2382 [Wether or not to use the pcap library])
2383 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
2386 # --with-libperl {{{
2387 perl_interpreter="perl"
2388 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
2390 if test -x "$withval"
2392 perl_interpreter="$withval"
2394 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
2396 LDFLAGS="$LDFLAGS -L$withval/lib"
2397 CPPFLAGS="$CPPFLAGS -I$withval/include"
2398 perl_interpreter="$withval/bin/perl"
2401 with_libperl="$withval"
2408 AC_MSG_CHECKING([for perl])
2409 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
2410 if test -x "$perl_interpreter"
2412 AC_MSG_RESULT([yes ($perl_interpreter)])
2418 AC_SUBST(PERL, "$perl_interpreter")
2420 if test "x$with_libperl" = "xyes" \
2421 && test -n "$perl_interpreter"
2423 SAVE_CFLAGS="$CFLAGS"
2424 SAVE_LDFLAGS="$LDFLAGS"
2425 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
2426 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
2427 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
2428 CFLAGS="$CFLAGS $PERL_CFLAGS"
2429 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2431 AC_CACHE_CHECK([for libperl],
2432 [c_cv_have_libperl],
2436 #define PERL_NO_GET_CONTEXT
2443 load_module (PERL_LOADMOD_NOIMPORT,
2444 newSVpv ("Collectd::Plugin::FooBar", 24),
2447 [c_cv_have_libperl="yes"],
2448 [c_cv_have_libperl="no"]
2452 if test "x$c_cv_have_libperl" = "xyes"
2454 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
2455 AC_SUBST(PERL_CFLAGS)
2456 AC_SUBST(PERL_LDFLAGS)
2461 CFLAGS="$SAVE_CFLAGS"
2462 LDFLAGS="$SAVE_LDFLAGS"
2463 else if test -z "$perl_interpreter"; then
2464 with_libperl="no (no perl interpreter found)"
2465 c_cv_have_libperl="no"
2467 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
2469 if test "x$with_libperl" = "xyes"
2471 SAVE_CFLAGS="$CFLAGS"
2472 SAVE_LDFLAGS="$LDFLAGS"
2473 CFLAGS="$CFLAGS $PERL_CFLAGS"
2474 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2476 AC_CACHE_CHECK([if perl supports ithreads],
2477 [c_cv_have_perl_ithreads],
2485 #if !defined(USE_ITHREADS)
2486 # error "Perl does not support ithreads!"
2487 #endif /* !defined(USE_ITHREADS) */
2490 [c_cv_have_perl_ithreads="yes"],
2491 [c_cv_have_perl_ithreads="no"]
2495 if test "x$c_cv_have_perl_ithreads" = "xyes"
2497 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
2500 CFLAGS="$SAVE_CFLAGS"
2501 LDFLAGS="$SAVE_LDFLAGS"
2504 if test "x$with_libperl" = "xyes"
2506 SAVE_CFLAGS="$CFLAGS"
2507 SAVE_LDFLAGS="$LDFLAGS"
2508 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
2509 # (see issues #41 and #42)
2510 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
2511 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2513 AC_CACHE_CHECK([for broken Perl_load_module()],
2514 [c_cv_have_broken_perl_load_module],
2518 #define PERL_NO_GET_CONTEXT
2525 load_module (PERL_LOADMOD_NOIMPORT,
2526 newSVpv ("Collectd::Plugin::FooBar", 24),
2529 [c_cv_have_broken_perl_load_module="no"],
2530 [c_cv_have_broken_perl_load_module="yes"]
2534 CFLAGS="$SAVE_CFLAGS"
2535 LDFLAGS="$SAVE_LDFLAGS"
2537 AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
2538 test "x$c_cv_have_broken_perl_load_module" = "xyes")
2540 if test "x$with_libperl" = "xyes"
2542 SAVE_CFLAGS="$CFLAGS"
2543 SAVE_LDFLAGS="$LDFLAGS"
2544 CFLAGS="$CFLAGS $PERL_CFLAGS"
2545 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2548 [struct mgvtbl.svt_local],
2549 [have_struct_mgvtbl_svt_local="yes"],
2550 [have_struct_mgvtbl_svt_local="no"],
2557 if test "x$have_struct_mgvtbl_svt_local" = "xyes"
2559 AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
2560 [Define if Perl's struct mgvtbl has member svt_local.])
2563 CFLAGS="$SAVE_CFLAGS"
2564 LDFLAGS="$SAVE_LDFLAGS"
2569 with_pg_config="pg_config"
2570 with_libpq_includedir=""
2571 with_libpq_libdir=""
2572 with_libpq_cppflags=""
2573 with_libpq_ldflags=""
2574 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2577 if test "x$withval" = "xno"
2580 else if test "x$withval" = "xyes"
2584 if test -f "$withval" && test -x "$withval";
2586 with_pg_config="$withval"
2587 else if test -x "$withval/bin/pg_config"
2589 with_pg_config="$withval/bin/pg_config"
2597 if test "x$with_libpq" = "xyes"
2599 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2602 if test $pg_config_status -eq 0
2604 if test -n "$with_libpq_includedir"; then
2605 for dir in $with_libpq_includedir; do
2606 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2610 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2613 SAVE_CPPFLAGS="$CPPFLAGS"
2614 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2616 AC_CHECK_HEADERS(libpq-fe.h, [],
2617 [with_libpq="no (libpq-fe.h not found)"], [])
2619 CPPFLAGS="$SAVE_CPPFLAGS"
2621 if test "x$with_libpq" = "xyes"
2623 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2626 if test $pg_config_status -eq 0
2628 if test -n "$with_libpq_libdir"; then
2629 for dir in $with_libpq_libdir; do
2630 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2634 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2637 SAVE_LDFLAGS="$LDFLAGS"
2638 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2640 AC_CHECK_LIB(pq, PQconnectdb,
2642 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2644 AC_CHECK_LIB(pq, PQserverVersion,
2646 [with_libpq="no (symbol 'PQserverVersion' not found)"])
2648 LDFLAGS="$SAVE_LDFLAGS"
2650 if test "x$with_libpq" = "xyes"
2652 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2653 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2654 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2655 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2657 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2660 # --with-libpthread {{{
2661 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
2662 [ if test "x$withval" != "xno" \
2663 && test "x$withval" != "xyes"
2665 LDFLAGS="$LDFLAGS -L$withval/lib"
2666 CPPFLAGS="$CPPFLAGS -I$withval/include"
2667 with_libpthread="yes"
2669 if test "x$withval" = "xno"
2671 with_libpthread="no (disabled)"
2674 ], [with_libpthread="yes"])
2675 if test "x$with_libpthread" = "xyes"
2677 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
2680 if test "x$with_libpthread" = "xyes"
2682 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
2684 if test "x$with_libpthread" = "xyes"
2690 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
2691 [Wether or not to use pthread (POSIX threads) library])
2692 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
2696 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
2699 librrd_threadsafe="yes"
2700 librrd_rrdc_update="no"
2701 AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
2702 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
2704 librrd_cflags="-I$withval/include"
2705 librrd_ldflags="-L$withval/lib"
2708 with_librrd="$withval"
2710 ], [with_librrd="yes"])
2711 if test "x$with_librrd" = "xyes"
2713 SAVE_CPPFLAGS="$CPPFLAGS"
2714 SAVE_LDFLAGS="$LDFLAGS"
2716 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2717 LDFLAGS="$LDFLAGS $librrd_ldflags"
2719 AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
2721 CPPFLAGS="$SAVE_CPPFLAGS"
2722 LDFLAGS="$SAVE_LDFLAGS"
2724 if test "x$with_librrd" = "xyes"
2726 SAVE_CPPFLAGS="$CPPFLAGS"
2727 SAVE_LDFLAGS="$LDFLAGS"
2729 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2730 LDFLAGS="$LDFLAGS $librrd_ldflags"
2732 AC_CHECK_LIB(rrd_th, rrd_update_r,
2734 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
2736 [librrd_threadsafe="no"
2737 AC_CHECK_LIB(rrd, rrd_update,
2739 librrd_ldflags="$librrd_ldflags -lrrd -lm"
2741 [with_librrd="no (symbol 'rrd_update' not found)"],
2746 if test "x$librrd_threadsafe" = "xyes"
2748 AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2750 AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2753 CPPFLAGS="$SAVE_CPPFLAGS"
2754 LDFLAGS="$SAVE_LDFLAGS"
2756 if test "x$with_librrd" = "xyes"
2758 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
2759 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
2760 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
2761 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
2763 if test "x$librrd_threadsafe" = "xyes"
2765 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
2769 # --with-libsensors {{{
2770 with_sensors_cflags=""
2771 with_sensors_ldflags=""
2772 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
2774 if test "x$withval" = "xno"
2776 with_libsensors="no"
2778 with_libsensors="yes"
2779 if test "x$withval" != "xyes"
2781 with_sensors_cflags="-I$withval/include"
2782 with_sensors_ldflags="-L$withval/lib"
2783 with_libsensors="yes"
2788 if test "x$ac_system" = "xLinux"
2790 with_libsensors="yes"
2792 with_libsensors="no (Linux only library)"
2795 if test "x$with_libsensors" = "xyes"
2797 SAVE_CPPFLAGS="$CPPFLAGS"
2798 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2800 # AC_CHECK_HEADERS(sensors/sensors.h,
2802 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
2804 # [with_libsensors="no (sensors/sensors.h not found)"])
2805 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
2807 CPPFLAGS="$SAVE_CPPFLAGS"
2809 if test "x$with_libsensors" = "xyes"
2811 SAVE_CPPFLAGS="$CPPFLAGS"
2812 SAVE_LDFLAGS="$LDFLAGS"
2813 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2814 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
2816 AC_CHECK_LIB(sensors, sensors_init,
2818 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
2820 [with_libsensors="no (libsensors not found)"])
2822 CPPFLAGS="$SAVE_CPPFLAGS"
2823 LDFLAGS="$SAVE_LDFLAGS"
2825 if test "x$with_libsensors" = "xyes"
2827 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
2828 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
2829 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
2830 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
2832 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
2835 # --with-libstatgrab {{{
2836 with_libstatgrab_cflags=""
2837 with_libstatgrab_ldflags=""
2838 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
2840 if test "x$withval" != "xno" \
2841 && test "x$withval" != "xyes"
2843 with_libstatgrab_cflags="-I$withval/include"
2844 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
2845 with_libstatgrab="yes"
2846 with_libstatgrab_pkg_config="no"
2848 with_libstatgrab="$withval"
2849 with_libstatgrab_pkg_config="yes"
2853 with_libstatgrab="yes"
2854 with_libstatgrab_pkg_config="yes"
2857 if test "x$with_libstatgrab" = "xyes" \
2858 && test "x$with_libstatgrab_pkg_config" = "xyes"
2860 if test "x$PKG_CONFIG" != "x"
2862 AC_MSG_CHECKING([pkg-config for libstatgrab])
2864 $PKG_CONFIG --exists libstatgrab 2>/dev/null
2867 with_libstatgrab_pkg_config="no"
2868 with_libstatgrab="no ($PKG_CONFIG doesn't know libstatgrab)"
2869 temp_result="not found"
2871 AC_MSG_RESULT([$temp_result])
2873 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
2874 with_libstatgrab_pkg_config="no"
2875 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
2879 if test "x$with_libstatgrab" = "xyes" \
2880 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2881 && test "x$with_libstatgrab_cflags" = "x"
2883 AC_MSG_CHECKING([for libstatgrab CFLAGS])
2884 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
2887 with_libstatgrab_cflags="$temp_result"
2889 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
2890 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
2892 AC_MSG_RESULT([$temp_result])
2895 if test "x$with_libstatgrab" = "xyes" \
2896 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2897 && test "x$with_libstatgrab_ldflags" = "x"
2899 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
2900 temp_result="`$PKG_CONFIG --libs libstatgrab`"
2903 with_libstatgrab_ldflags="$temp_result"
2905 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
2906 temp_result="$PKG_CONFIG --libs libstatgrab failed"
2908 AC_MSG_RESULT([$temp_result])
2911 if test "x$with_libstatgrab" = "xyes"
2913 SAVE_CPPFLAGS="$CPPFLAGS"
2914 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
2916 AC_CHECK_HEADERS(statgrab.h,
2917 [with_libstatgrab="yes"],
2918 [with_libstatgrab="no (statgrab.h not found)"])
2920 CPPFLAGS="$SAVE_CPPFLAGS"
2923 if test "x$with_libstatgrab" = "xyes"
2925 SAVE_CFLAGS="$CFLAGS"
2926 SAVE_LDFLAGS="$LDFLAGS"
2928 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
2929 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
2931 AC_CHECK_LIB(statgrab, sg_init,
2932 [with_libstatgrab="yes"],
2933 [with_libstatgrab="no (symbol sg_init not found)"])
2935 CFLAGS="$SAVE_CFLAGS"
2936 LDFLAGS="$SAVE_LDFLAGS"
2939 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
2940 if test "x$with_libstatgrab" = "xyes"
2942 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
2943 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
2944 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
2945 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
2946 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
2950 # --with-libtokyotyrant {{{
2951 with_libtokyotyrant_cppflags=""
2952 with_libtokyotyrant_ldflags=""
2953 with_libtokyotyrant_libs=""
2954 AC_ARG_WITH(libtokyotyrant, [AS_HELP_STRING([--with-libtokyotyrant@<:@=PREFIX@:>@], [Path to libtokyotyrant.])],
2956 if test "x$withval" = "xno"
2958 with_libtokyotyrant="no"
2959 else if test "x$withval" = "xyes"
2961 with_libtokyotyrant="yes"
2963 with_libtokyotyrant_cppflags="-I$withval/include"
2964 with_libtokyotyrant_ldflags="-L$withval/include"
2965 with_libtokyotyrant_libs="-ltokyotyrant"
2966 with_libtokyotyrant="yes"
2970 with_libtokyotyrant="yes"
2973 if test "x$with_libtokyotyrant" = "xyes"
2975 if $PKG_CONFIG --exists tokyotyrant
2977 with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
2978 with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `pkg-config --libs-only-L tokyotyrant`"
2979 with_libtokyotyrant_libs="$with_libtokyotyrant_libs `pkg-config --libs-only-l tokyotyrant`"
2983 SAVE_CPPFLAGS="$CPPFLAGS"
2984 SAVE_LDFLAGS="$LDFLAGS"
2985 CPPFLAGS="$CPPFLAGS $with_libtokyotyrant_cppflags"
2986 LDFLAGS="$LDFLAGS $with_libtokyotyrant_ldflags"
2988 if test "x$with_libtokyotyrant" = "xyes"
2990 AC_CHECK_HEADERS(tcrdb.h,
2992 AC_DEFINE(HAVE_TCRDB_H, 1,
2993 [Define to 1 if you have the <tcrdb.h> header file.])
2994 ], [with_libtokyotyrant="no (tcrdb.h not found)"])
2997 if test "x$with_libtokyotyrant" = "xyes"
2999 AC_CHECK_LIB(tokyotyrant, tcrdbrnum,
3001 AC_DEFINE(HAVE_LIBTOKYOTYRANT, 1,
3002 [Define to 1 if you have the tokyotyrant library (-ltokyotyrant).])
3004 [with_libtokyotyrant="no (symbol tcrdbrnum not found)"],
3005 [$with_libtokyotyrant_libs])
3008 CPPFLAGS="$SAVE_CPPFLAGS"
3009 LDFLAGS="$SAVE_LDFLAGS"
3011 if test "x$with_libtokyotyrant" = "xyes"
3013 BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
3014 BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
3015 BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
3016 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
3017 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
3018 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
3020 AM_CONDITIONAL(BUILD_WITH_LIBTOKYOTYRANT, test "x$with_libtokyotyrant" = "xyes")
3023 # --with-libupsclient {{{
3024 with_libupsclient_config=""
3025 with_libupsclient_cflags=""
3026 with_libupsclient_libs=""
3027 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
3029 if test "x$withval" = "xno"
3031 with_libupsclient="no"
3032 else if test "x$withval" = "xyes"
3034 with_libupsclient="use_pkgconfig"
3036 if test -x "$withval"
3038 with_libupsclient_config="$withval"
3039 with_libupsclient="use_libupsclient_config"
3040 else if test -x "$withval/bin/libupsclient-config"
3042 with_libupsclient_config="$withval/bin/net-snmp-config"
3043 with_libupsclient="use_libupsclient_config"
3045 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
3046 with_libupsclient_cflags="-I$withval/include"
3047 with_libupsclient_libs="-L$withval/lib -lupsclient"
3048 with_libupsclient="yes"
3052 [with_libupsclient="use_pkgconfig"])
3054 # configure using libupsclient-config
3055 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3057 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
3058 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
3061 with_libupsclient="no ($with_libupsclient_config failed)"
3063 with_libupsclient_libs="`$with_libupsclient_config --libs`"
3066 with_libupsclient="no ($with_libupsclient_config failed)"
3069 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3071 with_libupsclient="yes"
3074 # configure using pkg-config
3075 if test "x$with_libupsclient" = "xuse_pkgconfig"
3077 if test "x$PKG_CONFIG" = "x"
3079 with_libupsclient="no (Don't have pkg-config)"
3082 if test "x$with_libupsclient" = "xuse_pkgconfig"
3084 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
3085 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
3088 with_libupsclient="no (pkg-config doesn't know library)"
3091 if test "x$with_libupsclient" = "xuse_pkgconfig"
3093 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
3096 with_libupsclient="no ($PKG_CONFIG failed)"
3098 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
3101 with_libupsclient="no ($PKG_CONFIG failed)"
3104 if test "x$with_libupsclient" = "xuse_pkgconfig"
3106 with_libupsclient="yes"
3109 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
3110 # the actual checks.
3111 if test "x$with_libupsclient" = "xyes"
3113 SAVE_CPPFLAGS="$CPPFLAGS"
3114 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3116 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
3118 CPPFLAGS="$SAVE_CPPFLAGS"
3120 if test "x$with_libupsclient" = "xyes"
3122 SAVE_CPPFLAGS="$CPPFLAGS"
3123 SAVE_LDFLAGS="$LDFLAGS"
3125 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3126 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
3128 AC_CHECK_LIB(upsclient, upscli_connect,
3129 [with_libupsclient="yes"],
3130 [with_libupsclient="no (symbol upscli_connect not found)"])
3132 CPPFLAGS="$SAVE_CPPFLAGS"
3133 LDFLAGS="$SAVE_LDFLAGS"
3135 if test "x$with_libupsclient" = "xyes"
3137 SAVE_CPPFLAGS="$CPPFLAGS"
3138 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3140 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
3141 [#include <stdlib.h>
3143 #include <upsclient.h>])
3145 CPPFLAGS="$SAVE_CPPFLAGS"
3147 if test "x$with_libupsclient" = "xyes"
3149 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
3150 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
3151 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
3152 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
3156 # --with-libxmms {{{
3157 with_xmms_config="xmms-config"
3160 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
3162 if test "x$withval" != "xno" \
3163 && test "x$withval" != "xyes"
3165 if test -f "$withval" && test -x "$withval";
3167 with_xmms_config="$withval"
3168 else if test -x "$withval/bin/xmms-config"
3170 with_xmms_config="$withval/bin/xmms-config"
3173 else if test "x$withval" = "xno"
3183 if test "x$with_libxmms" = "xyes"
3185 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
3186 xmms_config_status=$?
3188 if test $xmms_config_status -ne 0
3193 if test "x$with_libxmms" = "xyes"
3195 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
3196 xmms_config_status=$?
3198 if test $xmms_config_status -ne 0
3203 if test "x$with_libxmms" = "xyes"
3205 AC_CHECK_LIB(xmms, xmms_remote_get_info,
3207 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
3208 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
3209 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
3210 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
3217 with_libxmms_numeric=0
3218 if test "x$with_libxmms" = "xyes"
3220 with_libxmms_numeric=1
3222 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
3223 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
3226 # --with-libyajl {{{
3227 with_libyajl_cppflags=""
3228 with_libyajl_ldflags=""
3229 AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
3231 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3233 with_libyajl_cppflags="-I$withval/include"
3234 with_libyajl_ldflags="-L$withval/lib"
3237 with_libyajl="$withval"
3243 if test "x$with_libyajl" = "xyes"
3245 SAVE_CPPFLAGS="$CPPFLAGS"
3246 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3248 AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"])
3250 CPPFLAGS="$SAVE_CPPFLAGS"
3252 if test "x$with_libyajl" = "xyes"
3254 SAVE_CPPFLAGS="$CPPFLAGS"
3255 SAVE_LDFLAGS="$LDFLAGS"
3256 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3257 LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
3259 AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"])
3261 CPPFLAGS="$SAVE_CPPFLAGS"
3262 LDFLAGS="$SAVE_LDFLAGS"
3264 if test "x$with_libyajl" = "xyes"
3266 BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
3267 BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
3268 BUILD_WITH_LIBYAJL_LIBS="-lyajl"
3269 AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS)
3270 AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS)
3271 AC_SUBST(BUILD_WITH_LIBYAJL_LIBS)
3272 AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.])
3274 AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
3277 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
3278 with_libxml2="no (pkg-config isn't available)"
3279 with_libxml2_cflags=""
3280 with_libxml2_ldflags=""
3281 with_libvirt="no (pkg-config isn't available)"
3282 with_libvirt_cflags=""
3283 with_libvirt_ldflags=""
3284 if test "x$PKG_CONFIG" != "x"
3286 pkg-config --exists 'libxml-2.0' 2>/dev/null
3291 with_libxml2="no (pkg-config doesn't know library)"
3294 pkg-config --exists libvirt 2>/dev/null
3299 with_libvirt="no (pkg-config doesn't know library)"
3302 if test "x$with_libxml2" = "xyes"
3304 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
3309 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
3315 if test "x$with_libxml2" = "xyes"
3317 SAVE_CPPFLAGS="$CPPFLAGS"
3318 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
3320 AC_CHECK_HEADERS(libxml/parser.h, [],
3321 [with_libxml2="no (libxml/parser.h not found)"])
3323 CPPFLAGS="$SAVE_CPPFLAGS"
3325 if test "x$with_libxml2" = "xyes"
3327 SAVE_CFLAGS="$CFLAGS"
3328 SAVE_LDFLAGS="$LDFLAGS"
3330 CFLAGS="$CFLAGS $with_libxml2_cflags"
3331 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
3333 AC_CHECK_LIB(xml2, xmlXPathEval,
3334 [with_libxml2="yes"],
3335 [with_libxml2="no (symbol xmlXPathEval not found)"])
3337 CFLAGS="$SAVE_CFLAGS"
3338 LDFLAGS="$SAVE_LDFLAGS"
3340 dnl Add the right compiler flags and libraries.
3341 if test "x$with_libxml2" = "xyes"; then
3342 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
3343 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
3344 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
3345 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
3347 if test "x$with_libvirt" = "xyes"
3349 with_libvirt_cflags="`pkg-config --cflags libvirt`"
3354 with_libvirt_ldflags="`pkg-config --libs libvirt`"
3360 if test "x$with_libvirt" = "xyes"
3362 SAVE_CPPFLAGS="$CPPFLAGS"
3363 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
3365 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
3366 [with_libvirt="no (libvirt/libvirt.h not found)"])
3368 CPPFLAGS="$SAVE_CPPFLAGS"
3370 if test "x$with_libvirt" = "xyes"
3372 SAVE_CFLAGS="$CFLAGS"
3373 SAVE_LDFLAGS="$LDFLAGS"
3375 CFLAGS="$CFLAGS $with_libvirt_cflags"
3376 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
3378 AC_CHECK_LIB(virt, virDomainBlockStats,
3379 [with_libvirt="yes"],
3380 [with_libvirt="no (symbol virDomainBlockStats not found)"])
3382 CFLAGS="$SAVE_CFLAGS"
3383 LDFLAGS="$SAVE_LDFLAGS"
3385 dnl Add the right compiler flags and libraries.
3386 if test "x$with_libvirt" = "xyes"; then
3387 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
3388 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
3389 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
3390 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
3394 # $PKG_CONFIG --exists OpenIPMIpthread {{{
3395 with_libopenipmipthread="yes"
3396 with_libopenipmipthread_cflags=""
3397 with_libopenipmipthread_libs=""
3399 AC_MSG_CHECKING([for pkg-config])
3401 if test "x$PKG_CONFIG" = "x"
3403 with_libopenipmipthread="no"
3406 temp_result="$PKG_CONFIG"
3408 AC_MSG_RESULT([$temp_result])
3410 if test "x$with_libopenipmipthread" = "xyes"
3412 AC_MSG_CHECKING([for libOpenIPMIpthread])
3413 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
3416 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
3418 AC_MSG_RESULT([$with_libopenipmipthread])
3421 if test "x$with_libopenipmipthread" = "xyes"
3423 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
3424 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
3427 with_libopenipmipthread_cflags="$temp_result"
3429 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
3430 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
3432 AC_MSG_RESULT([$temp_result])
3435 if test "x$with_libopenipmipthread" = "xyes"
3437 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
3438 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
3441 with_libopenipmipthread_ldflags="$temp_result"
3443 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
3444 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
3446 AC_MSG_RESULT([$temp_result])
3449 if test "x$with_libopenipmipthread" = "xyes"
3451 SAVE_CPPFLAGS="$CPPFLAGS"
3452 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
3454 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
3455 [with_libopenipmipthread="yes"],
3456 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
3457 [#include <OpenIPMI/ipmiif.h>
3458 #include <OpenIPMI/ipmi_err.h>
3459 #include <OpenIPMI/ipmi_posix.h>
3460 #include <OpenIPMI/ipmi_conn.h>
3463 CPPFLAGS="$SAVE_CPPFLAGS"
3466 if test "x$with_libopenipmipthread" = "xyes"
3468 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
3469 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
3470 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
3471 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
3475 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
3476 [with_libnotify="yes"],
3477 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
3479 # Check for enabled/disabled features
3482 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
3483 # ------------------------------------------------------------
3485 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
3490 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
3495 m4_define([EnDis],[disabled])dnl
3496 m4_define([YesNo],[no])dnl
3502 m4_define([EnDis],[enabled])dnl
3503 m4_define([YesNo],[yes])dnl
3506 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
3510 m4_if([$3], [feature], [],
3514 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
3520 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
3522 enable_$1='[YesNo]'dnl
3524 if test "x$enable_$1" = "xno"
3528 if test "x$enable_$1" = "xyes"
3532 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
3537 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
3538 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
3540 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
3542 # AC_PLUGIN(name, default, info)
3543 # ------------------------------------------------------------
3550 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
3552 if test "x$enableval" = "xyes"
3555 else if test "x$enableval" = "xforce"
3564 if test "x$enable_all_plugins" = "xauto"
3566 if test "x$2" = "xyes"
3573 enable_plugin="$enable_all_plugins"
3576 if test "x$enable_plugin" = "xyes"
3578 if test "x$2" = "xyes" || test "x$force" = "xyes"
3580 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
3581 if test "x$2" != "xyes"
3583 dependency_warning="yes"
3585 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
3586 dependency_error="yes"
3587 enable_plugin="no (dependency error)"
3590 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
3591 enable_$1="$enable_plugin"
3593 )# AC_PLUGIN(name, default, info)
3595 m4_divert_once([HELP_ENABLE], [
3596 collectd features:])
3597 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
3598 AC_COLLECTD([debug], [enable], [feature], [debugging])
3599 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
3600 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
3602 dependency_warning="no"
3603 dependency_error="no"
3608 plugin_conntrack="no"
3609 plugin_contextswitch="no"
3612 plugin_curl_json="no"
3616 plugin_interface="no"
3623 plugin_multimeter="no"
3627 plugin_processes="no"
3628 plugin_protocols="no"
3632 plugin_tcpconns="no"
3639 plugin_wireless="no"
3643 if test "x$ac_system" = "xLinux"
3645 plugin_battery="yes"
3646 plugin_conntrack="yes"
3647 plugin_contextswitch="yes"
3649 plugin_cpufreq="yes"
3651 plugin_entropy="yes"
3652 plugin_interface="yes"
3657 plugin_fscache="yes"
3658 plugin_processes="yes"
3659 plugin_protocols="yes"
3662 plugin_tcpconns="yes"
3663 plugin_thermal="yes"
3666 plugin_vserver="yes"
3667 plugin_wireless="yes"
3669 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
3675 if test "x$ac_system" = "xOpenBSD"
3677 plugin_tcpconns="yes"
3681 if test "x$with_libiokit" = "xyes"
3683 plugin_battery="yes"
3688 if test "x$with_perfstat" = "xyes"
3694 plugin_interface="yes"
3698 if test "x$with_procinfo" = "xyes"
3700 plugin_processes="yes"
3704 if test "x$with_kstat" = "xyes"
3707 plugin_zfs_arc="yes"
3710 if test "x$with_devinfo$with_kstat" = "xyesyes"
3714 plugin_interface="yes"
3719 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
3725 if test "x$with_libstatgrab" = "xyes"
3729 plugin_interface="yes"
3736 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
3742 if test "x$with_libopenipmipthread" = "xyes"
3747 if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"
3749 plugin_curl_json="yes"
3752 if test "x$have_processor_info" = "xyes"
3756 if test "x$have_sysctl" = "xyes"
3763 if test "x$have_sysctlbyname" = "xyes"
3767 plugin_tcpconns="yes"
3770 # Df plugin: Check if we know how to determine mount points first.
3771 #if test "x$have_listmntent" = "xyes"; then
3774 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
3778 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
3782 #if test "x$have_getmntent" = "xseq"
3786 if test "x$c_cv_have_one_getmntent" = "xyes"
3791 # Df plugin: Check if we have either `statfs' or `statvfs' second.
3792 if test "x$plugin_df" = "xyes"
3795 if test "x$have_statfs" = "xyes"
3799 if test "x$have_statvfs" = "xyes"
3805 if test "x$have_getifaddrs" = "xyes"
3807 plugin_interface="yes"
3810 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
3812 plugin_libvirt="yes"
3815 if test "x$have_getloadavg" = "xyes"
3820 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
3825 # Mac OS X memory interface
3826 if test "x$have_host_statistics" = "xyes"
3831 if test "x$have_termios_h" = "xyes"
3833 plugin_multimeter="yes"
3837 if test "x$have_thread_info" = "xyes"
3839 plugin_processes="yes"
3842 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
3844 plugin_processes="yes"
3847 if test "x$with_kvm_getswapinfo" = "xyes"
3852 if test "x$have_swapctl" = "xyes"
3857 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
3859 plugin_tcpconns="yes"
3862 if test "x$have_getutent" = "xyes"
3866 if test "x$have_getutxent" = "xyes"
3871 m4_divert_once([HELP_ENABLE], [
3874 AC_ARG_ENABLE([all-plugins],
3875 AC_HELP_STRING([--enable-all-plugins],
3876 [enable all plugins (auto by def)]),
3878 if test "x$enableval" = "xyes"
3880 enable_all_plugins="yes"
3881 else if test "x$enableval" = "xauto"
3883 enable_all_plugins="auto"
3885 enable_all_plugins="no"
3888 [enable_all_plugins="auto"])
3890 m4_divert_once([HELP_ENABLE], [])
3892 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
3893 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
3894 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
3895 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
3896 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
3897 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
3898 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
3899 AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
3900 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
3901 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
3902 AC_PLUGIN([csv], [yes], [CSV output plugin])
3903 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
3904 AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics])
3905 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
3906 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
3907 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
3908 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
3909 AC_PLUGIN([email], [yes], [EMail statistics])
3910 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
3911 AC_PLUGIN([exec], [yes], [Execution of external programs])
3912 AC_PLUGIN([filecount], [yes], [Count files in directories])
3913 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
3914 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
3915 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
3916 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
3917 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
3918 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
3919 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
3920 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
3921 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
3922 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
3923 AC_PLUGIN([load], [$plugin_load], [System load])
3924 AC_PLUGIN([logfile], [yes], [File logging plugin])
3925 AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
3926 AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
3927 AC_PLUGIN([match_hashed], [yes], [The hashed match])
3928 AC_PLUGIN([match_regex], [yes], [The regex match])
3929 AC_PLUGIN([match_timediff], [yes], [The timediff match])
3930 AC_PLUGIN([match_value], [yes], [The value match])
3931 AC_PLUGIN([mbmon], [yes], [Query mbmond])
3932 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
3933 AC_PLUGIN([memcached], [yes], [memcached statistics])
3934 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
3935 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
3936 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
3937 AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
3938 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
3939 AC_PLUGIN([network], [yes], [Network communication plugin])
3940 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
3941 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
3942 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
3943 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
3944 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
3945 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
3946 AC_PLUGIN([olsrd], [yes], [olsrd statistics])
3947 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
3948 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
3949 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
3950 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
3951 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
3952 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
3953 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
3954 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
3955 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
3956 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
3957 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
3958 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
3959 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
3960 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
3961 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
3962 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
3963 AC_PLUGIN([table], [yes], [Parsing of tabular data])
3964 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
3965 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
3966 AC_PLUGIN([target_notification], [yes], [The notification target])
3967 AC_PLUGIN([target_replace], [yes], [The replace target])
3968 AC_PLUGIN([target_scale],[yes], [The scale target])
3969 AC_PLUGIN([target_set], [yes], [The set target])
3970 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
3971 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
3972 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
3973 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
3974 AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics])
3975 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
3976 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
3977 AC_PLUGIN([users], [$plugin_users], [User statistics])
3978 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
3979 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
3980 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
3981 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
3982 AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
3983 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
3984 AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
3986 dnl Default configuration file
3987 # Load either syslog or logfile
3988 LOAD_PLUGIN_SYSLOG=""
3989 LOAD_PLUGIN_LOGFILE=""
3991 AC_MSG_CHECKING([which default log plugin to load])
3992 default_log_plugin="none"
3993 if test "x$enable_syslog" = "xyes"
3995 default_log_plugin="syslog"
3997 LOAD_PLUGIN_SYSLOG="##"
4000 if test "x$enable_logfile" = "xyes"
4002 if test "x$default_log_plugin" = "xnone"
4004 default_log_plugin="logfile"
4006 LOAD_PLUGIN_LOGFILE="#"
4009 LOAD_PLUGIN_LOGFILE="##"
4011 AC_MSG_RESULT([$default_log_plugin])
4013 AC_SUBST(LOAD_PLUGIN_SYSLOG)
4014 AC_SUBST(LOAD_PLUGIN_LOGFILE)
4016 DEFAULT_LOG_LEVEL="info"
4017 if test "x$enable_debug" = "xyes"
4019 DEFAULT_LOG_LEVEL="debug"
4021 AC_SUBST(DEFAULT_LOG_LEVEL)
4023 # Load only one of rrdtool, network, csv in the default config.
4024 LOAD_PLUGIN_RRDTOOL=""
4025 LOAD_PLUGIN_NETWORK=""
4028 AC_MSG_CHECKING([which default write plugin to load])
4029 default_write_plugin="none"
4030 if test "x$enable_rrdtool" = "xyes"
4032 default_write_plugin="rrdtool"
4034 LOAD_PLUGIN_RRDTOOL="##"
4037 if test "x$enable_network" = "xyes"
4039 if test "x$default_write_plugin" = "xnone"
4041 default_write_plugin="network"
4043 LOAD_PLUGIN_NETWORK="#"
4046 LOAD_PLUGIN_NETWORK="##"
4049 if test "x$enable_csv" = "xyes"
4051 if test "x$default_write_plugin" = "xnone"
4053 default_write_plugin="csv"
4058 LOAD_PLUGIN_CSV="##"
4060 AC_MSG_RESULT([$default_write_plugin])
4062 AC_SUBST(LOAD_PLUGIN_RRDTOOL)
4063 AC_SUBST(LOAD_PLUGIN_NETWORK)
4064 AC_SUBST(LOAD_PLUGIN_CSV)
4067 if test "x$ac_system" = "xLinux" \
4068 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
4070 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
4074 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
4076 if test "x$withval" != "xno" && test "x$withval" != "xyes"
4078 PERL_BINDINGS_OPTIONS="$withval"
4079 with_perl_bindings="yes"
4081 PERL_BINDINGS_OPTIONS=""
4082 with_perl_bindings="$withval"
4086 PERL_BINDINGS_OPTIONS=""
4087 if test -n "$perl_interpreter"
4089 with_perl_bindings="yes"
4091 with_perl_bindings="no (no perl interpreter found)"
4094 if test "x$with_perl_bindings" = "xyes"
4096 PERL_BINDINGS="perl"
4100 AC_SUBST(PERL_BINDINGS)
4101 AC_SUBST(PERL_BINDINGS_OPTIONS)
4103 dnl libcollectdclient
4104 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
4105 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
4106 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
4108 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
4110 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
4112 AC_SUBST(LCC_VERSION_MAJOR)
4113 AC_SUBST(LCC_VERSION_MINOR)
4114 AC_SUBST(LCC_VERSION_PATCH)
4115 AC_SUBST(LCC_VERSION_EXTRA)
4116 AC_SUBST(LCC_VERSION_STRING)
4118 AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
4120 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/owniptc/Makefile src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile)
4122 if test "x$with_librrd" = "xyes" \
4123 && test "x$librrd_threadsafe" != "xyes"
4125 with_librrd="yes (warning: librrd is not thread-safe)"
4128 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes"
4130 with_libiptc="yes (shipped version)"
4133 if test "x$with_libperl" = "xyes"
4135 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
4137 enable_perl="no (needs libperl)"
4140 if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"
4142 enable_perl="no (libperl doesn't support ithreads)"
4145 if test "x$with_perl_bindings" = "xyes" \
4146 && test "x$PERL_BINDINGS_OPTIONS" != "x"
4148 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
4155 libcurl . . . . . . . $with_libcurl
4156 libdbi . . . . . . . $with_libdbi
4157 libesmtp . . . . . . $with_libesmtp
4158 libganglia . . . . . $with_libganglia
4159 libgcrypt . . . . . . $with_libgcrypt
4160 libiokit . . . . . . $with_libiokit
4161 libiptc . . . . . . . $with_libiptc
4162 libjvm . . . . . . . $with_java
4163 libkstat . . . . . . $with_kstat
4164 libkvm . . . . . . . $with_libkvm
4165 libmemcached . . . . $with_libmemcached
4166 libmysql . . . . . . $with_libmysql
4167 libnetapp . . . . . . $with_libnetapp
4168 libnetlink . . . . . $with_libnetlink
4169 libnetsnmp . . . . . $with_libnetsnmp
4170 libnotify . . . . . . $with_libnotify
4171 liboconfig . . . . . $with_liboconfig
4172 libopenipmi . . . . . $with_libopenipmipthread
4173 liboping . . . . . . $with_liboping
4174 libpcap . . . . . . . $with_libpcap
4175 libperl . . . . . . . $with_libperl
4176 libpq . . . . . . . . $with_libpq
4177 libpthread . . . . . $with_libpthread
4178 librrd . . . . . . . $with_librrd
4179 libsensors . . . . . $with_libsensors
4180 libstatgrab . . . . . $with_libstatgrab
4181 libtokyotyrant . . . $with_libtokyotyrant
4182 libupsclient . . . . $with_libupsclient
4183 libvirt . . . . . . . $with_libvirt
4184 libxml2 . . . . . . . $with_libxml2
4185 libxmms . . . . . . . $with_libxmms
4186 libyajl . . . . . . . $with_libyajl
4187 oracle . . . . . . . $with_oracle
4190 daemon mode . . . . . $enable_daemon
4191 debug . . . . . . . . $enable_debug
4194 perl . . . . . . . . $with_perl_bindings
4197 apache . . . . . . . $enable_apache
4198 apcups . . . . . . . $enable_apcups
4199 apple_sensors . . . . $enable_apple_sensors
4200 ascent . . . . . . . $enable_ascent
4201 battery . . . . . . . $enable_battery
4202 bind . . . . . . . . $enable_bind
4203 conntrack . . . . . . $enable_conntrack
4204 contextswitch . . . . $enable_contextswitch
4205 cpu . . . . . . . . . $enable_cpu
4206 cpufreq . . . . . . . $enable_cpufreq
4207 csv . . . . . . . . . $enable_csv
4208 curl . . . . . . . . $enable_curl
4209 curl_json . . . . . . $enable_curl_json
4210 dbi . . . . . . . . . $enable_dbi
4211 df . . . . . . . . . $enable_df
4212 disk . . . . . . . . $enable_disk
4213 dns . . . . . . . . . $enable_dns
4214 email . . . . . . . . $enable_email
4215 entropy . . . . . . . $enable_entropy
4216 exec . . . . . . . . $enable_exec
4217 filecount . . . . . . $enable_filecount
4218 fscache . . . . . . . $enable_fscache
4219 gmond . . . . . . . . $enable_gmond
4220 hddtemp . . . . . . . $enable_hddtemp
4221 interface . . . . . . $enable_interface
4222 ipmi . . . . . . . . $enable_ipmi
4223 iptables . . . . . . $enable_iptables
4224 ipvs . . . . . . . . $enable_ipvs
4225 irq . . . . . . . . . $enable_irq
4226 java . . . . . . . . $enable_java
4227 libvirt . . . . . . . $enable_libvirt
4228 load . . . . . . . . $enable_load
4229 logfile . . . . . . . $enable_logfile
4230 madwifi . . . . . . . $enable_madwifi
4231 match_empty_counter . $enable_match_empty_counter
4232 match_hashed . . . . $enable_match_hashed
4233 match_regex . . . . . $enable_match_regex
4234 match_timediff . . . $enable_match_timediff
4235 match_value . . . . . $enable_match_value
4236 mbmon . . . . . . . . $enable_mbmon
4237 memcachec . . . . . . $enable_memcachec
4238 memcached . . . . . . $enable_memcached
4239 memory . . . . . . . $enable_memory
4240 multimeter . . . . . $enable_multimeter
4241 mysql . . . . . . . . $enable_mysql
4242 netapp . . . . . . . $enable_netapp
4243 netlink . . . . . . . $enable_netlink
4244 network . . . . . . . $enable_network
4245 nfs . . . . . . . . . $enable_nfs
4246 nginx . . . . . . . . $enable_nginx
4247 notify_desktop . . . $enable_notify_desktop
4248 notify_email . . . . $enable_notify_email
4249 ntpd . . . . . . . . $enable_ntpd
4250 nut . . . . . . . . . $enable_nut
4251 olsrd . . . . . . . . $enable_olsrd
4252 onewire . . . . . . . $enable_onewire
4253 openvpn . . . . . . . $enable_openvpn
4254 oracle . . . . . . . $enable_oracle
4255 perl . . . . . . . . $enable_perl
4256 ping . . . . . . . . $enable_ping
4257 postgresql . . . . . $enable_postgresql
4258 powerdns . . . . . . $enable_powerdns
4259 processes . . . . . . $enable_processes
4260 protocols . . . . . . $enable_protocols
4261 rrdcached . . . . . . $enable_rrdcached
4262 rrdtool . . . . . . . $enable_rrdtool
4263 sensors . . . . . . . $enable_sensors
4264 serial . . . . . . . $enable_serial
4265 snmp . . . . . . . . $enable_snmp
4266 swap . . . . . . . . $enable_swap
4267 syslog . . . . . . . $enable_syslog
4268 table . . . . . . . . $enable_table
4269 tail . . . . . . . . $enable_tail
4270 tape . . . . . . . . $enable_tape
4271 target_notification . $enable_target_notification
4272 target_replace . . . $enable_target_replace
4273 target_scale . . . . $enable_target_scale
4274 target_set . . . . . $enable_target_set
4275 tcpconns . . . . . . $enable_tcpconns
4276 teamspeak2 . . . . . $enable_teamspeak2
4277 ted . . . . . . . . . $enable_ted
4278 thermal . . . . . . . $enable_thermal
4279 tokyotyrant . . . . . $enable_tokyotyrant
4280 unixsock . . . . . . $enable_unixsock
4281 uptime . . . . . . . $enable_uptime
4282 users . . . . . . . . $enable_users
4283 uuid . . . . . . . . $enable_uuid
4284 vmem . . . . . . . . $enable_vmem
4285 vserver . . . . . . . $enable_vserver
4286 wireless . . . . . . $enable_wireless
4287 write_http . . . . . $enable_write_http
4288 xmms . . . . . . . . $enable_xmms
4289 zfs_arc . . . . . . . $enable_zfs_arc
4293 if test "x$dependency_error" = "xyes"; then
4294 AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
4297 if test "x$dependency_warning" = "xyes"; then
4298 AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
4301 # vim: set fdm=marker :