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])
12 AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
17 AC_LIBLTDL_CONVENIENCE
21 AC_CONFIG_SUBDIRS(libltdl)
22 AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
26 AM_INIT_AUTOMAKE(dist-bzip2)
29 AC_PREFIX_DEFAULT("/opt/collectd")
34 # Checks for programs.
42 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
50 AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no])
51 AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes")
53 AC_MSG_CHECKING([for kernel type ($host_os)])
56 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
60 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
70 AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel])
76 AC_MSG_RESULT([$ac_system])
78 if test "x$ac_system" = "xLinux"
80 AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
81 if test -z "$KERNEL_DIR"
83 KERNEL_DIR="/lib/modules/`uname -r`/source"
86 KERNEL_CFLAGS="-I$KERNEL_DIR/include"
87 AC_SUBST(KERNEL_CFLAGS)
90 if test "x$ac_system" = "xSolaris"
92 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to enforce POSIX thread semantics under Solaris.])
94 if test "x$ac_system" = "xAIX"
96 AC_DEFINE(_THREAD_SAFE_ERRNO, 1, [Define to use the thread-safe version of errno under AIX.])
99 # Where to install .pc files.
100 pkgconfigdir="${libdir}/pkgconfig"
101 AC_SUBST(pkgconfigdir)
103 # Check for standards compliance mode
104 AC_ARG_ENABLE(standards,
105 AS_HELP_STRING([--enable-standards], [Enable standards compliance mode]),
106 [enable_standards="$enableval"],
107 [enable_standards="no"])
108 if test "x$enable_standards" = "xyes"
110 AC_DEFINE(_ISOC99_SOURCE, 1, [Define to enforce ISO C99 compliance.])
111 AC_DEFINE(_POSIX_C_SOURCE, 200809L, [Define to enforce POSIX.1-2008 compliance.])
112 AC_DEFINE(_XOPEN_SOURCE, 700, [Define to enforce X/Open 7 (XSI) compliance.])
113 AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.])
114 if test "x$GCC" = "xyes"
116 CFLAGS="$CFLAGS -std=c99"
119 AM_CONDITIONAL(BUILD_FEATURE_STANDARDS, test "x$enable_standards" = "xyes")
122 # Checks for header files.
129 AC_CHECK_HEADERS(stdio.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)
132 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
137 # include <sys/types.h>
140 AC_CHECK_HEADERS(netinet/in.h, [], [],
145 # include <sys/types.h>
147 #if HAVE_NETINET_IN_SYSTM_H
148 # include <netinet/in_systm.h>
151 AC_CHECK_HEADERS(netinet/ip.h, [], [],
156 # include <sys/types.h>
158 #if HAVE_NETINET_IN_SYSTM_H
159 # include <netinet/in_systm.h>
161 #if HAVE_NETINET_IN_H
162 # include <netinet/in.h>
165 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
170 # include <sys/types.h>
172 #if HAVE_NETINET_IN_SYSTM_H
173 # include <netinet/in_systm.h>
175 #if HAVE_NETINET_IN_H
176 # include <netinet/in.h>
178 #if HAVE_NETINET_IP_H
179 # include <netinet/ip.h>
182 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
187 # include <sys/types.h>
189 #if HAVE_NETINET_IN_SYSTM_H
190 # include <netinet/in_systm.h>
192 #if HAVE_NETINET_IN_H
193 # include <netinet/in.h>
195 #if HAVE_NETINET_IP_H
196 # include <netinet/ip.h>
199 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
204 # include <sys/types.h>
206 #if HAVE_NETINET_IN_SYSTM_H
207 # include <netinet/in_systm.h>
209 #if HAVE_NETINET_IN_H
210 # include <netinet/in.h>
213 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
218 # include <sys/types.h>
220 #if HAVE_NETINET_IN_SYSTM_H
221 # include <netinet/in_systm.h>
223 #if HAVE_NETINET_IN_H
224 # include <netinet/in.h>
226 #if HAVE_NETINET_IP6_H
227 # include <netinet/ip6.h>
230 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
235 # include <sys/types.h>
237 #if HAVE_NETINET_IN_SYSTM_H
238 # include <netinet/in_systm.h>
240 #if HAVE_NETINET_IN_H
241 # include <netinet/in.h>
243 #if HAVE_NETINET_IP_H
244 # include <netinet/ip.h>
247 AC_CHECK_HEADERS(netinet/udp.h, [], [],
252 # include <sys/types.h>
254 #if HAVE_NETINET_IN_SYSTM_H
255 # include <netinet/in_systm.h>
257 #if HAVE_NETINET_IN_H
258 # include <netinet/in.h>
260 #if HAVE_NETINET_IP_H
261 # include <netinet/ip.h>
266 AC_CHECK_HEADERS(sys/dkstat.h)
267 if test "x$ac_system" = "xDarwin"
269 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)
270 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
272 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
275 # include <sys/types.h>
278 # include <sys/param.h>
282 AC_MSG_CHECKING([for sysctl kern.cp_times])
283 if test -x /sbin/sysctl
285 /sbin/sysctl kern.cp_times 2>/dev/null
289 AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIMES, 1,
290 [Define if sysctl supports kern.cp_times])
299 AC_CHECK_HEADERS(linux/major.h libgen.h)
301 # For the battery plugin
302 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
304 #if HAVE_IOKIT_IOKITLIB_H
305 # include <IOKit/IOKitLib.h>
307 #if HAVE_IOKIT_IOTYPES_H
308 # include <IOKit/IOTypes.h>
312 # For the swap module
313 have_linux_wireless_h="no"
314 if test "x$ac_system" = "xLinux"
316 AC_CHECK_HEADERS(linux/wireless.h,
317 [have_linux_wireless_h="yes"],
318 [have_linux_wireless_h="no"],
321 #include <sys/ioctl.h>
322 #include <sys/socket.h>
326 # For the swap module
327 have_sys_swap_h="yes"
328 AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
330 #undef _FILE_OFFSET_BITS
331 #undef _LARGEFILE64_SOURCE
333 # include <sys/types.h>
336 # include <sys/param.h>
340 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
343 if test "x$GCC" = "xyes"
345 hint_64="CFLAGS='-m64'"
347 hint_64="CFLAGS='-xarch=v9'"
349 AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
353 # For the processes plugin
355 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
357 # For interface plugin
358 AC_CHECK_HEADERS(ifaddrs.h)
359 AC_CHECK_HEADERS(net/if.h, [], [],
362 # include <sys/types.h>
364 #if HAVE_SYS_SOCKET_H
365 # include <sys/socket.h>
368 AC_CHECK_HEADERS(linux/if.h, [], [],
371 # include <sys/types.h>
373 #if HAVE_SYS_SOCKET_H
374 # include <sys/socket.h>
377 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
380 # include <sys/types.h>
382 #if HAVE_SYS_SOCKET_H
383 # include <sys/socket.h>
386 # include <linux/if.h>
391 have_net_ip_vs_h="no"
393 if test "x$ac_system" = "xLinux"
395 SAVE_CFLAGS="$CFLAGS"
396 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
398 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
399 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
401 CFLAGS="$SAVE_CFLAGS"
405 AC_CHECK_HEADERS(sys/ucred.h, [], [],
408 # include <sys/types.h>
411 # include <sys/param.h>
415 # For mount interface
416 AC_CHECK_HEADERS(sys/mount.h, [], [],
419 # include <sys/types.h>
422 # include <sys/param.h>
426 # For the email plugin
427 AC_CHECK_HEADERS(linux/un.h, [], [],
429 #if HAVE_SYS_SOCKET_H
430 # include <sys/socket.h>
434 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)
437 AC_CHECK_HEADERS(arpa/nameser.h)
438 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
440 #if HAVE_ARPA_NAMESER_H
441 # include <arpa/nameser.h>
445 AC_CHECK_HEADERS(net/if_arp.h, [], [],
446 [#if HAVE_SYS_SOCKET_H
447 # include <sys/socket.h>
450 AC_CHECK_HEADERS(net/ppp_defs.h)
451 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
452 [#if HAVE_NET_PPP_DEFS_H
453 # include <net/ppp_defs.h>
456 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
461 # include <sys/types.h>
463 #if HAVE_SYS_SOCKET_H
464 # include <sys/socket.h>
469 #if HAVE_NETINET_IN_H
470 # include <netinet/in.h>
474 # For the multimeter plugin
476 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
479 # Checks for typedefs, structures, and compiler characteristics.
488 # Checks for library functions.
490 AC_PROG_GCC_TRADITIONAL
491 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname)
495 SAVE_CFLAGS="$CFLAGS"
496 # Emulate behavior of src/Makefile.am
497 if test "x$GCC" = "xyes"
499 CFLAGS="$CFLAGS -Wall -Werror"
502 AC_CACHE_CHECK([for strtok_r],
503 [c_cv_have_strtok_r_default],
512 char buffer[] = "foo,bar,baz";
519 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
522 printf ("token = %s;\n", token);
525 [c_cv_have_strtok_r_default="yes"],
526 [c_cv_have_strtok_r_default="no"]
530 if test "x$c_cv_have_strtok_r_default" = "xno"
532 CFLAGS="$CFLAGS -D_REENTRANT=1"
534 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
535 [c_cv_have_strtok_r_reentrant],
544 char buffer[] = "foo,bar,baz";
551 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
554 printf ("token = %s;\n", token);
557 [c_cv_have_strtok_r_reentrant="yes"],
558 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
563 CFLAGS="$SAVE_CFLAGS"
564 if test "x$c_cv_have_strtok_r_reentrant" = "xyes"
566 CFLAGS="$CFLAGS -D_REENTRANT=1"
569 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
571 socket_needs_socket="no"
572 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
573 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
575 clock_gettime_needs_rt="no"
576 clock_gettime_needs_posix4="no"
577 AC_CHECK_FUNCS(clock_gettime,
579 AC_CHECK_LIB(rt, clock_gettime,
580 [clock_gettime_needs_rt="yes"],
581 AC_CHECK_LIB(posix4, clock_gettime,
582 [clock_gettime_needs_posix4="yes"],
583 AC_MSG_ERROR(cannot find clock_gettime))))
585 nanosleep_needs_rt="no"
586 nanosleep_needs_posix4="no"
587 AC_CHECK_FUNCS(nanosleep,
589 AC_CHECK_LIB(rt, nanosleep,
590 [nanosleep_needs_rt="yes"],
591 AC_CHECK_LIB(posix4, nanosleep,
592 [nanosleep_needs_posix4="yes"],
593 AC_MSG_ERROR(cannot find nanosleep))))
595 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$clock_gettime_needs_rt" = "xyes" || test "x$nanosleep_needs_rt" = "xyes")
596 AM_CONDITIONAL(BUILD_WITH_LIBPOSIX4, test "x$clock_gettime_needs_posix4" = "xyes" || test "x$nanosleep_needs_posix4" = "xyes")
598 AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
599 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
600 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
601 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
602 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
603 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
604 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
605 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
606 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
607 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
608 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
609 AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
610 if test "x$have_swapctl" = "xyes"; then
611 AC_CACHE_CHECK([whether swapctl takes two arguments],
612 [c_cv_have_swapctl_two_args],
614 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
615 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
616 # undef _FILE_OFFSET_BITS
617 # undef _LARGEFILE64_SOURCE
619 #include <sys/stat.h>
620 #include <sys/swap.h>]],
622 int num = swapctl(0, NULL);
625 [c_cv_have_swapctl_two_args="yes"],
626 [c_cv_have_swapctl_two_args="no"]
629 AC_CACHE_CHECK([whether swapctl takes three arguments],
630 [c_cv_have_swapctl_three_args],
632 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
633 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
634 # undef _FILE_OFFSET_BITS
635 # undef _LARGEFILE64_SOURCE
637 #include <sys/stat.h>
638 #include <sys/swap.h>]],
640 int num = swapctl(0, NULL,0);
643 [c_cv_have_swapctl_three_args="yes"],
644 [c_cv_have_swapctl_three_args="no"]
648 # Check for different versions of `swapctl' here..
649 if test "x$have_swapctl" = "xyes"; then
650 if test "x$c_cv_have_swapctl_two_args" = "xyes"; then
651 AC_DEFINE(HAVE_SWAPCTL_TWO_ARGS, 1,
652 [Define if the function swapctl exists and takes two arguments.])
654 if test "x$c_cv_have_swapctl_three_args" = "xyes"; then
655 AC_DEFINE(HAVE_SWAPCTL_THREE_ARGS, 1,
656 [Define if the function swapctl exists and takes three arguments.])
661 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
664 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
666 if test "x$withval" = "xno"; then
668 else if test "x$withval" = "xyes"; then
675 if test "x$nan_type" = "xnone"; then
676 AC_CACHE_CHECK([whether NAN is defined by default],
677 [c_cv_have_nan_default],
683 static float foo = NAN;
691 [c_cv_have_nan_default="yes"],
692 [c_cv_have_nan_default="no"]
695 if test "x$c_cv_have_nan_default" = "xyes"
700 if test "x$nan_type" = "xnone"; then
701 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
702 [c_cv_have_nan_isoc],
707 #define __USE_ISOC99 1
709 static float foo = NAN;
717 [c_cv_have_nan_isoc="yes"],
718 [c_cv_have_nan_isoc="no"]
721 if test "x$c_cv_have_nan_isoc" = "xyes"
726 if test "x$nan_type" = "xnone"; then
727 SAVE_LDFLAGS=$LDFLAGS
728 LDFLAGS="$LDFLAGS -lm"
729 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
730 [c_cv_have_nan_zero],
739 #define NAN (0.0 / 0.0)
741 # define isnan(f) ((f) != (f))
743 static float foo = NAN;
751 [c_cv_have_nan_zero="yes"],
752 [c_cv_have_nan_zero="no"]
755 LDFLAGS=$SAVE_LDFLAGS
756 if test "x$c_cv_have_nan_zero" = "xyes"
762 if test "x$nan_type" = "xdefault"; then
763 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
764 [Define if NAN is defined by default and can initialize static variables.])
765 else if test "x$nan_type" = "xisoc99"; then
766 AC_DEFINE(NAN_STATIC_ISOC, 1,
767 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
768 else if test "x$nan_type" = "xzero"; then
769 AC_DEFINE(NAN_ZERO_ZERO, 1,
770 [Define if NAN can be defined as (0.0 / 0.0)])
772 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
775 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
777 if test "x$withval" = "xnothing"; then
778 fp_layout_type="nothing"
779 else if test "x$withval" = "xendianflip"; then
780 fp_layout_type="endianflip"
781 else if test "x$withval" = "xintswap"; then
782 fp_layout_type="intswap"
784 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
787 [fp_layout_type="unknown"])
789 if test "x$fp_layout_type" = "xunknown"; then
790 AC_CACHE_CHECK([if doubles are stored in x86 representation],
791 [c_cv_fp_layout_need_nothing],
802 # include <inttypes.h>
805 # include <stdbool.h>
815 memcpy ((void *) &i0, (void *) &d, 8);
818 memcpy ((void *) c, (void *) &i1, 8);
820 if ((c[0] == 0x2f) && (c[1] == 0x25)
821 && (c[2] == 0xc0) && (c[3] == 0xc7)
822 && (c[4] == 0x43) && (c[5] == 0x2b)
823 && (c[6] == 0x1f) && (c[7] == 0x5b))
828 [c_cv_fp_layout_need_nothing="yes"],
829 [c_cv_fp_layout_need_nothing="no"]
832 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
833 fp_layout_type="nothing"
836 if test "x$fp_layout_type" = "xunknown"; then
837 AC_CACHE_CHECK([if endianflip converts to x86 representation],
838 [c_cv_fp_layout_need_endianflip],
849 # include <inttypes.h>
852 # include <stdbool.h>
854 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
855 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
856 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
857 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
858 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
859 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
860 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
861 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
870 memcpy ((void *) &i0, (void *) &d, 8);
872 i1 = endianflip (i0);
873 memcpy ((void *) c, (void *) &i1, 8);
875 if ((c[0] == 0x2f) && (c[1] == 0x25)
876 && (c[2] == 0xc0) && (c[3] == 0xc7)
877 && (c[4] == 0x43) && (c[5] == 0x2b)
878 && (c[6] == 0x1f) && (c[7] == 0x5b))
883 [c_cv_fp_layout_need_endianflip="yes"],
884 [c_cv_fp_layout_need_endianflip="no"]
887 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
888 fp_layout_type="endianflip"
891 if test "x$fp_layout_type" = "xunknown"; then
892 AC_CACHE_CHECK([if intswap converts to x86 representation],
893 [c_cv_fp_layout_need_intswap],
904 # include <inttypes.h>
907 # include <stdbool.h>
909 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
910 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
919 memcpy ((void *) &i0, (void *) &d, 8);
922 memcpy ((void *) c, (void *) &i1, 8);
924 if ((c[0] == 0x2f) && (c[1] == 0x25)
925 && (c[2] == 0xc0) && (c[3] == 0xc7)
926 && (c[4] == 0x43) && (c[5] == 0x2b)
927 && (c[6] == 0x1f) && (c[7] == 0x5b))
932 [c_cv_fp_layout_need_intswap="yes"],
933 [c_cv_fp_layout_need_intswap="no"]
936 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
937 fp_layout_type="intswap"
941 if test "x$fp_layout_type" = "xnothing"; then
942 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
943 [Define if doubles are stored in x86 representation.])
944 else if test "x$fp_layout_type" = "xendianflip"; then
945 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
946 [Define if endianflip is needed to convert to x86 representation.])
947 else if test "x$fp_layout_type" = "xintswap"; then
948 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
949 [Define if intswap is needed to convert to x86 representation.])
951 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
955 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
957 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
959 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
962 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
963 if test "x$have_getmntent" = "xno"; then
964 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
966 if test "x$have_getmntent" = "xno"; then
967 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
969 if test "x$have_getmntent" = "xno"; then
970 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
973 if test "x$have_getmntent" = "xc"; then
974 AC_CACHE_CHECK([whether getmntent takes one argument],
975 [c_cv_have_one_getmntent],
977 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
978 #include "$srcdir/src/utils_mount.h"]],
982 fh = setmntent ("/etc/mtab", "r");
986 [c_cv_have_one_getmntent="yes"],
987 [c_cv_have_one_getmntent="no"]
990 AC_CACHE_CHECK([whether getmntent takes two arguments],
991 [c_cv_have_two_getmntent],
993 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
994 #include "$srcdir/src/utils_mount.h"]],
999 fh = fopen ("/etc/mnttab", "r");
1000 status = getmntent (fh, &mt);
1003 [c_cv_have_two_getmntent="yes"],
1004 [c_cv_have_two_getmntent="no"]
1009 # Check for different versions of `getmntent' here..
1011 if test "x$have_getmntent" = "xc"; then
1012 if test "x$c_cv_have_one_getmntent" = "xyes"; then
1013 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
1014 [Define if the function getmntent exists and takes one argument.])
1016 if test "x$c_cv_have_two_getmntent" = "xyes"; then
1017 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
1018 [Define if the function getmntent exists and takes two arguments.])
1021 if test "x$have_getmntent" = "xsun"; then
1022 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
1023 [Define if the function getmntent exists. It's the version from libsun.])
1025 if test "x$have_getmntent" = "xseq"; then
1026 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
1027 [Define if the function getmntent exists. It's the version from libseq.])
1029 if test "x$have_getmntent" = "xgen"; then
1030 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
1031 [Define if the function getmntent exists. It's the version from libgen.])
1035 AC_MSG_CHECKING([if have htonll defined])
1040 #include <sys/types.h>
1041 #include <netinet/in.h>
1043 # include <inttypes.h>
1050 AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.])
1053 AC_MSG_RESULT([$have_htonll])
1055 # Check for structures
1056 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
1057 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
1060 #include <sys/types.h>
1061 #include <sys/socket.h>
1064 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
1065 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
1068 #include <sys/types.h>
1069 #include <sys/socket.h>
1070 #include <linux/if.h>
1071 #include <linux/netdevice.h>
1074 AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [],
1077 #include <netinet/in.h>
1081 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
1083 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
1084 [Define if struct kinfo_proc exists in the FreeBSD variant.])
1085 have_struct_kinfo_proc_freebsd="yes"
1088 have_struct_kinfo_proc_freebsd="no"
1092 #include <sys/param.h>
1093 #include <sys/sysctl.h>
1094 #include <sys/user.h>
1097 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
1099 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
1100 [Define if struct kinfo_proc exists in the OpenBSD variant.])
1101 have_struct_kinfo_proc_openbsd="yes"
1104 have_struct_kinfo_proc_openbsd="no"
1107 #include <sys/param.h>
1108 #include <sys/sysctl.h>
1112 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
1113 [#define _BSD_SOURCE
1115 # include <stdint.h>
1117 #if HAVE_SYS_TYPES_H
1118 # include <sys/types.h>
1120 #if HAVE_NETINET_IN_SYSTM_H
1121 # include <netinet/in_systm.h>
1123 #if HAVE_NETINET_IN_H
1124 # include <netinet/in.h>
1126 #if HAVE_NETINET_IP_H
1127 # include <netinet/ip.h>
1129 #if HAVE_NETINET_UDP_H
1130 # include <netinet/udp.h>
1133 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
1134 [#define _BSD_SOURCE
1136 # include <stdint.h>
1138 #if HAVE_SYS_TYPES_H
1139 # include <sys/types.h>
1141 #if HAVE_NETINET_IN_SYSTM_H
1142 # include <netinet/in_systm.h>
1144 #if HAVE_NETINET_IN_H
1145 # include <netinet/in.h>
1147 #if HAVE_NETINET_IP_H
1148 # include <netinet/ip.h>
1150 #if HAVE_NETINET_UDP_H
1151 # include <netinet/udp.h>
1155 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
1165 # Checks for libraries begin here
1167 with_libresolv="yes"
1168 AC_CHECK_LIB(resolv, res_search,
1170 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
1172 [with_libresolv="no"])
1173 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
1175 dnl Check for HAL (hardware abstraction library)
1177 AC_CHECK_LIB(hal,libhal_device_property_exists,
1178 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
1180 if test "x$with_libhal" = "xyes"; then
1181 if test "x$PKG_CONFIG" != "x"; then
1182 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
1183 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
1184 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
1185 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
1189 m4_divert_once([HELP_WITH], [
1190 collectd additional packages:])
1192 AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
1194 if test "x$ac_system" = "xAIX"
1199 with_perfstat="no (AIX only)"
1200 with_procinfo="no (AIX only)"
1203 if test "x$with_perfstat" = "xyes"
1205 AC_CHECK_LIB(perfstat, perfstat_reset, [with_perfstat="yes"], [with_perfstat="no (perfstat not found)"], [])
1206 # AC_CHECK_HEADERS(sys/protosw.h libperfstat.h,, [with_perfstat="no (perfstat not found)"])
1208 if test "x$with_perfstat" = "xyes"
1210 AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)])
1211 # struct members pertaining to donation have been added to libperfstat somewhere between AIX5.3ML5 and AIX5.3ML9
1212 AC_CHECK_MEMBER([perfstat_partition_type_t.b.donate_enabled], [], [], [[#include <libperfstat.h]])
1213 if test "x$av_cv_member_perfstat_partition_type_t_b_donate_enabled" = "xyes"
1215 AC_DEFINE(PERFSTAT_SUPPORTS_DONATION, 1, [Define to 1 if your version of the 'perfstat' library supports donation])
1218 AM_CONDITIONAL(BUILD_WITH_PERFSTAT, test "x$with_perfstat" = "xyes")
1220 # Processes plugin under AIX.
1221 if test "x$with_procinfo" = "xyes"
1223 AC_CHECK_HEADERS(procinfo.h,, [with_procinfo="no (procinfo.h not found)"])
1225 if test "x$with_procinfo" = "xyes"
1227 AC_DEFINE(HAVE_PROCINFO_H, 1, [Define to 1 if you have the procinfo.h])
1230 if test "x$ac_system" = "xSolaris"
1235 with_kstat="no (Solaris only)"
1236 with_devinfo="no (Solaris only)"
1239 if test "x$with_kstat" = "xyes"
1241 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1243 if test "x$with_kstat" = "xyes"
1245 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1246 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1248 if test "x$with_kstat" = "xyes"
1250 AC_DEFINE(HAVE_LIBKSTAT, 1,
1251 [Define to 1 if you have the 'kstat' library (-lkstat)])
1253 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1254 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1257 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1264 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1267 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1268 if test "x$with_kvm_getprocs" = "xyes"
1270 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1271 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1274 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1276 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1277 if test "x$with_kvm_getswapinfo" = "xyes"
1279 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1280 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1283 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1285 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1286 if test "x$with_kvm_nlist" = "xyes"
1288 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1289 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1292 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1294 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1295 if test "x$with_kvm_openfiles" = "xyes"
1297 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1298 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1301 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1303 # --with-libcredis {{{
1304 AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])],
1306 if test "x$withval" = "xyes"
1308 with_libcredis="yes"
1309 else if test "x$withval" = "xno"
1313 with_libcredis="yes"
1314 LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS -I$withval/include"
1315 LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS -L$withval/lib"
1318 [with_libcredis="yes"])
1320 SAVE_CPPFLAGS="$CPPFLAGS"
1321 SAVE_LDFLAGS="$LDFLAGS"
1323 CPPFLAGS="$CPPFLAGS $LIBCREDIS_CPPFLAGS"
1324 LDFLAGS="$LDFLAGS $LIBCREDIS_LDFLAGS"
1326 if test "x$with_libcredis" = "xyes"
1328 if test "x$LIBCREDIS_CPPFLAGS" != "x"
1330 AC_MSG_NOTICE([libcredis CPPFLAGS: $LIBCREDIS_CPPFLAGS])
1332 AC_CHECK_HEADERS(credis.h,
1333 [with_libcredis="yes"],
1334 [with_libcredis="no ('credis.h' not found)"])
1336 if test "x$with_libcredis" = "xyes"
1338 if test "x$LIBCREDIS_LDFLAGS" != "x"
1340 AC_MSG_NOTICE([libcredis LDFLAGS: $LIBCREDIS_LDFLAGS])
1342 AC_CHECK_LIB(credis, credis_info,
1343 [with_libcredis="yes"],
1344 [with_libcredis="no (symbol 'credis_info' not found)"])
1348 CPPFLAGS="$SAVE_CPPFLAGS"
1349 LDFLAGS="$SAVE_LDFLAGS"
1351 if test "x$with_libcredis" = "xyes"
1353 BUILD_WITH_LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS"
1354 BUILD_WITH_LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS"
1355 AC_SUBST(BUILD_WITH_LIBCREDIS_CPPFLAGS)
1356 AC_SUBST(BUILD_WITH_LIBCREDIS_LDFLAGS)
1358 AM_CONDITIONAL(BUILD_WITH_LIBCREDIS, test "x$with_libcredis" = "xyes")
1361 # --with-libcurl {{{
1362 with_curl_config="curl-config"
1365 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1367 if test "x$withval" = "xno"
1370 else if test "x$withval" = "xyes"
1374 if test -f "$withval" && test -x "$withval"
1376 with_curl_config="$withval"
1378 else if test -x "$withval/bin/curl-config"
1380 with_curl_config="$withval/bin/curl-config"
1389 if test "x$with_libcurl" = "xyes"
1391 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1392 curl_config_status=$?
1394 if test $curl_config_status -ne 0
1396 with_libcurl="no ($with_curl_config failed)"
1398 SAVE_CPPFLAGS="$CPPFLAGS"
1399 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1401 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1403 CPPFLAGS="$SAVE_CPPFLAGS"
1406 if test "x$with_libcurl" = "xyes"
1408 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1409 curl_config_status=$?
1411 if test $curl_config_status -ne 0
1413 with_libcurl="no ($with_curl_config failed)"
1415 AC_CHECK_LIB(curl, curl_easy_init,
1416 [with_libcurl="yes"],
1417 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1421 if test "x$with_libcurl" = "xyes"
1423 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1424 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1425 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1426 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1428 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1432 with_libdbi_cppflags=""
1433 with_libdbi_ldflags=""
1434 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1436 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1438 with_libdbi_cppflags="-I$withval/include"
1439 with_libdbi_ldflags="-L$withval/lib"
1442 with_libdbi="$withval"
1448 if test "x$with_libdbi" = "xyes"
1450 SAVE_CPPFLAGS="$CPPFLAGS"
1451 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1453 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1455 CPPFLAGS="$SAVE_CPPFLAGS"
1457 if test "x$with_libdbi" = "xyes"
1459 SAVE_CPPFLAGS="$CPPFLAGS"
1460 SAVE_LDFLAGS="$LDFLAGS"
1461 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1462 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1464 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1466 CPPFLAGS="$SAVE_CPPFLAGS"
1467 LDFLAGS="$SAVE_LDFLAGS"
1469 if test "x$with_libdbi" = "xyes"
1471 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1472 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1473 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1474 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1475 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1476 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1478 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1481 # --with-libesmtp {{{
1482 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1484 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1486 LDFLAGS="$LDFLAGS -L$withval/lib"
1487 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1490 with_libesmtp="$withval"
1496 if test "x$with_libesmtp" = "xyes"
1498 AC_CHECK_LIB(esmtp, smtp_create_session,
1500 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1501 ], [with_libesmtp="no (libesmtp not found)"])
1503 if test "x$with_libesmtp" = "xyes"
1505 AC_CHECK_HEADERS(libesmtp.h,
1507 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1508 ], [with_libesmtp="no (libesmtp.h not found)"])
1510 if test "x$with_libesmtp" = "xyes"
1516 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1517 [Wether or not to use the esmtp library])
1518 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1521 # --with-libganglia {{{
1522 AC_ARG_WITH(libganglia, [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
1524 if test -f "$withval" && test -x "$withval"
1526 with_libganglia_config="$withval"
1527 with_libganglia="yes"
1528 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"
1530 with_libganglia_config="$withval/bin/ganglia-config"
1531 with_libganglia="yes"
1532 else if test -d "$withval"
1534 GANGLIA_CPPFLAGS="-I$withval/include"
1535 GANGLIA_LDFLAGS="-L$withval/lib"
1536 with_libganglia="yes"
1538 with_libganglia_config="ganglia-config"
1539 with_libganglia="$withval"
1543 with_libganglia_config="ganglia-config"
1544 with_libganglia="yes"
1547 if test "x$with_libganglia" = "xyes" && test "x$with_libganglia_config" != "x"
1549 if test "x$GANGLIA_CPPFLAGS" = "x"
1551 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
1554 if test "x$GANGLIA_LDFLAGS" = "x"
1556 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
1559 if test "x$GANGLIA_LIBS" = "x"
1561 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
1565 SAVE_CPPFLAGS="$CPPFLAGS"
1566 SAVE_LDFLAGS="$LDFLAGS"
1567 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
1568 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
1570 if test "x$with_libganglia" = "xyes"
1572 AC_CHECK_HEADERS(gm_protocol.h,
1574 AC_DEFINE(HAVE_GM_PROTOCOL_H, 1,
1575 [Define to 1 if you have the <gm_protocol.h> header file.])
1576 ], [with_libganglia="no (gm_protocol.h not found)"])
1579 if test "x$with_libganglia" = "xyes"
1581 AC_CHECK_LIB(ganglia, xdr_Ganglia_value_msg,
1583 AC_DEFINE(HAVE_LIBGANGLIA, 1,
1584 [Define to 1 if you have the ganglia library (-lganglia).])
1585 ], [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"])
1588 CPPFLAGS="$SAVE_CPPFLAGS"
1589 LDFLAGS="$SAVE_LDFLAGS"
1591 AC_SUBST(GANGLIA_CPPFLAGS)
1592 AC_SUBST(GANGLIA_LDFLAGS)
1593 AC_SUBST(GANGLIA_LIBS)
1594 AM_CONDITIONAL(BUILD_WITH_LIBGANGLIA, test "x$with_libganglia" = "xyes")
1597 # --with-libgcrypt {{{
1598 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
1599 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
1600 GCRYPT_LIBS="$GCRYPT_LIBS"
1601 AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
1603 if test -f "$withval" && test -x "$withval"
1605 with_libgcrypt_config="$withval"
1606 with_libgcrypt="yes"
1607 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"
1609 with_libgcrypt_config="$withval/bin/gcrypt-config"
1610 with_libgcrypt="yes"
1611 else if test -d "$withval"
1613 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
1614 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
1615 with_libgcrypt="yes"
1617 with_libgcrypt_config="gcrypt-config"
1618 with_libgcrypt="$withval"
1622 with_libgcrypt_config="libgcrypt-config"
1623 with_libgcrypt="yes"
1626 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"
1628 if test "x$GCRYPT_CPPFLAGS" = "x"
1630 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
1633 if test "x$GCRYPT_LDFLAGS" = "x"
1635 gcrypt_exec_prefix=`"$with_libgcrypt_config" --exec-prefix 2>/dev/null`
1636 GCRYPT_LDFLAGS="-L$gcrypt_exec_prefix/lib"
1639 if test "x$GCRYPT_LIBS" = "x"
1641 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
1645 SAVE_CPPFLAGS="$CPPFLAGS"
1646 SAVE_LDFLAGS="$LDFLAGS"
1647 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
1648 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
1650 if test "x$with_libgcrypt" = "xyes"
1652 if test "x$GCRYPT_CPPFLAGS" != "x"
1654 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
1656 AC_CHECK_HEADERS(gcrypt.h,
1657 [with_libgcrypt="yes"],
1658 [with_libgcrypt="no (gcrypt.h not found)"])
1661 if test "x$with_libgcrypt" = "xyes"
1663 if test "x$GCRYPT_LDFLAGS" != "x"
1665 AC_MSG_NOTICE([gcrypt LDFLAGS: $GCRYPT_LDFLAGS])
1667 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
1668 [with_libgcrypt="yes"],
1669 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
1671 if test "$with_libgcrypt" != "no"; then
1672 AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")
1676 CPPFLAGS="$SAVE_CPPFLAGS"
1677 LDFLAGS="$SAVE_LDFLAGS"
1679 if test "x$with_libgcrypt" = "xyes"
1681 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to 1 if you have the gcrypt library (-lgcrypt).])
1684 AC_SUBST(GCRYPT_CPPFLAGS)
1685 AC_SUBST(GCRYPT_LDFLAGS)
1686 AC_SUBST(GCRYPT_LIBS)
1687 AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes")
1690 # --with-libiptc {{{
1691 with_own_libiptc="no"
1692 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1694 if test "x$withval" = "xshipped"
1696 with_own_libiptc="yes"
1698 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1700 LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
1701 LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
1704 with_libiptc="$withval"
1708 if test "x$ac_system" = "xLinux"
1712 with_libiptc="no (Linux only)"
1715 SAVE_CPPFLAGS="$CPPFLAGS"
1716 SAVE_LDFLAGS="$LDFLAGS"
1717 CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
1718 LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS"
1719 # check whether the header file for libiptc is available.
1720 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1722 AC_CHECK_HEADERS(libiptc/libiptc.h,
1724 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1728 with_own_libiptc="yes"
1731 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1733 AC_CHECK_HEADERS(libiptc/libip6tc.h,
1735 AC_DEFINE(HAVE_LIBIPTC_LIBIP6TC_H, 1, [Define to 1 if you have the <libiptc/libip6tc.h> header file.])
1739 with_own_libiptc="yes"
1742 # If the header file is available, check for the required type declaractions.
1743 # They may be missing in old versions of libiptc. In that case, they will be
1744 # declared in the iptables plugin.
1745 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1747 AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
1750 # include "$srcdir/src/owniptc/libiptc.h"
1751 # include "$srcdir/src/owniptc/libip6tc.h"
1753 # include <libiptc/libiptc.h>
1754 # include <libiptc/libip6tc.h>
1758 # Check for the iptc_init symbol in the library.
1759 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1761 AC_CHECK_LIB(iptc, iptc_init,
1763 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1767 with_own_libiptc="yes"
1770 # The system wide version failed for some reason. Check if we have the required
1771 # headers to build the shipped version.
1772 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
1774 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
1776 with_libiptc="no (Linux iptables headers not found)"
1777 with_own_libiptc="no"
1780 #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
1783 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1784 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1785 if test "x$with_libiptc" = "xyes"
1787 BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
1788 BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
1789 AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
1790 AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
1792 if test "x$with_own_libiptc" = "xyes"
1794 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1796 CPPFLAGS="$SAVE_CPPFLAGS"
1797 LDFLAGS="$SAVE_LDFLAGS"
1801 with_java_home="$JAVA_HOME"
1802 with_java_vmtype="client"
1807 AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
1809 if test "x$withval" = "xno"
1812 else if test "x$withval" = "xyes"
1816 with_java_home="$withval"
1821 if test "x$with_java" = "xyes"
1823 if test -d "$with_java_home"
1825 AC_MSG_CHECKING([for jni.h])
1826 TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1827 if test "x$TMPDIR" != "x"
1829 AC_MSG_RESULT([found in $TMPDIR])
1830 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1832 AC_MSG_RESULT([not found])
1835 AC_MSG_CHECKING([for jni_md.h])
1836 TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1837 if test "x$TMPDIR" != "x"
1839 AC_MSG_RESULT([found in $TMPDIR])
1840 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1842 AC_MSG_RESULT([not found])
1845 AC_MSG_CHECKING([for libjvm.so])
1846 TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
1847 if test "x$TMPDIR" != "x"
1849 AC_MSG_RESULT([found in $TMPDIR])
1850 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR"
1852 AC_MSG_RESULT([not found])
1855 if test "x$JAVAC" = "x"
1857 AC_MSG_CHECKING([for javac])
1858 TMPDIR=`find "$with_java_home" -name javac -type f | head -n 1`
1859 if test "x$TMPDIR" != "x"
1862 AC_MSG_RESULT([$JAVAC])
1864 AC_MSG_RESULT([not found])
1867 if test "x$JAR" = "x"
1869 AC_MSG_CHECKING([for jar])
1870 TMPDIR=`find "$with_java_home" -name jar -type f | head -n 1`
1871 if test "x$TMPDIR" != "x"
1874 AC_MSG_RESULT([$JAR])
1876 AC_MSG_RESULT([not found])
1879 else if test "x$with_java_home" != "x"
1881 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
1885 if test "x$JAVA_CPPFLAGS" != "x"
1887 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
1889 if test "x$JAVA_CFLAGS" != "x"
1891 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
1893 if test "x$JAVA_LDFLAGS" != "x"
1895 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
1897 if test "x$JAVAC" = "x"
1899 with_javac_path="$PATH"
1900 if test "x$with_java_home" != "x"
1902 with_javac_path="$with_java_home:with_javac_path"
1903 if test -d "$with_java_home/bin"
1905 with_javac_path="$with_java_home/bin:with_javac_path"
1909 AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path")
1911 if test "x$JAVAC" = "x"
1913 with_java="no (javac not found)"
1915 if test "x$JAR" = "x"
1917 with_jar_path="$PATH"
1918 if test "x$with_java_home" != "x"
1920 with_jar_path="$with_java_home:$with_jar_path"
1921 if test -d "$with_java_home/bin"
1923 with_jar_path="$with_java_home/bin:$with_jar_path"
1927 AC_PATH_PROG(JAR, jar, [], "$with_jar_path")
1929 if test "x$JAR" = "x"
1931 with_java="no (jar not found)"
1934 SAVE_CPPFLAGS="$CPPFLAGS"
1935 SAVE_CFLAGS="$CFLAGS"
1936 SAVE_LDFLAGS="$LDFLAGS"
1937 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
1938 CFLAGS="$CFLAGS $JAVA_CFLAGS"
1939 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
1941 if test "x$with_java" = "xyes"
1943 AC_CHECK_HEADERS(jni.h, [], [with_java="no (jni.h not found)"])
1945 if test "x$with_java" = "xyes"
1947 AC_CHECK_LIB(jvm, JNI_CreateJavaVM,
1949 [with_java="no (libjvm not found)"],
1952 if test "x$with_java" = "xyes"
1954 JAVA_LIBS="$JAVA_LIBS -ljvm"
1955 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
1958 CPPFLAGS="$SAVE_CPPFLAGS"
1959 CFLAGS="$SAVE_CFLAGS"
1960 LDFLAGS="$SAVE_LDFLAGS"
1962 AC_SUBST(JAVA_CPPFLAGS)
1963 AC_SUBST(JAVA_CFLAGS)
1964 AC_SUBST(JAVA_LDFLAGS)
1966 AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
1969 # --with-libmemcached {{{
1970 with_libmemcached_cppflags=""
1971 with_libmemcached_ldflags=""
1972 AC_ARG_WITH(libmemcached, [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
1974 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1976 with_libmemcached_cppflags="-I$withval/include"
1977 with_libmemcached_ldflags="-L$withval/lib"
1978 with_libmemcached="yes"
1980 with_libmemcached="$withval"
1984 with_libmemcached="yes"
1986 if test "x$with_libmemcached" = "xyes"
1988 SAVE_CPPFLAGS="$CPPFLAGS"
1989 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1991 AC_CHECK_HEADERS(libmemcached/memcached.h, [with_libmemcached="yes"], [with_libmemcached="no (libmemcached/memcached.h not found)"])
1993 CPPFLAGS="$SAVE_CPPFLAGS"
1995 if test "x$with_libmemcached" = "xyes"
1997 SAVE_CPPFLAGS="$CPPFLAGS"
1998 SAVE_LDFLAGS="$LDFLAGS"
1999 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
2000 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
2002 AC_CHECK_LIB(memcached, memcached_create, [with_libmemcached="yes"], [with_libmemcached="no (Symbol 'memcached_create' not found)"])
2004 CPPFLAGS="$SAVE_CPPFLAGS"
2005 LDFLAGS="$SAVE_LDFLAGS"
2007 if test "x$with_libmemcached" = "xyes"
2009 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
2010 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
2011 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
2012 AC_SUBST(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
2013 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
2014 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LIBS)
2015 AC_DEFINE(HAVE_LIBMEMCACHED, 1, [Define if libmemcached is present and usable.])
2017 AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
2020 # --with-libmodbus {{{
2021 with_libmodbus_config=""
2022 with_libmodbus_cflags=""
2023 with_libmodbus_libs=""
2024 AC_ARG_WITH(libmodbus, [AS_HELP_STRING([--with-libmodbus@<:@=PREFIX@:>@], [Path to the modbus library.])],
2026 if test "x$withval" = "xno"
2029 else if test "x$withval" = "xyes"
2031 with_libmodbus="use_pkgconfig"
2032 else if test -d "$with_libmodbus/lib"
2034 AC_MSG_NOTICE([Not checking for libmodbus: Manually configured])
2035 with_libmodbus_cflags="-I$withval/include"
2036 with_libmodbus_libs="-L$withval/lib -lmodbus"
2037 with_libmodbus="yes"
2040 [with_libmodbus="use_pkgconfig"])
2042 # configure using pkg-config
2043 if test "x$with_libmodbus" = "xuse_pkgconfig"
2045 if test "x$PKG_CONFIG" = "x"
2047 with_libmodbus="no (Don't have pkg-config)"
2050 if test "x$with_libmodbus" = "xuse_pkgconfig"
2052 AC_MSG_NOTICE([Checking for modbus using $PKG_CONFIG])
2053 $PKG_CONFIG --exists 'modbus' 2>/dev/null
2056 with_libmodbus="no (pkg-config doesn't know library)"
2059 if test "x$with_libmodbus" = "xuse_pkgconfig"
2061 with_libmodbus_cflags="`$PKG_CONFIG --cflags 'modbus'`"
2064 with_libmodbus="no ($PKG_CONFIG failed)"
2066 with_libmodbus_libs="`$PKG_CONFIG --libs 'modbus'`"
2069 with_libmodbus="no ($PKG_CONFIG failed)"
2072 if test "x$with_libmodbus" = "xuse_pkgconfig"
2074 with_libmodbus="yes"
2077 # with_libmodbus_cflags and with_libmodbus_libs are set up now, let's do
2078 # the actual checks.
2079 if test "x$with_libmodbus" = "xyes"
2081 SAVE_CPPFLAGS="$CPPFLAGS"
2082 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
2084 AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
2086 CPPFLAGS="$SAVE_CPPFLAGS"
2088 if test "x$with_libmodbus" = "xyes"
2090 SAVE_CPPFLAGS="$CPPFLAGS"
2091 SAVE_LDFLAGS="$LDFLAGS"
2093 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
2094 LDFLAGS="$LDFLAGS $with_libmodbus_libs"
2096 AC_CHECK_LIB(modbus, modbus_init_tcp,
2097 [with_libmodbus="yes"],
2098 [with_libmodbus="no (symbol modbus_init_tcp not found)"])
2100 CPPFLAGS="$SAVE_CPPFLAGS"
2101 LDFLAGS="$SAVE_LDFLAGS"
2103 if test "x$with_libmodbus" = "xyes"
2105 BUILD_WITH_LIBMODBUS_CFLAGS="$with_libmodbus_cflags"
2106 BUILD_WITH_LIBMODBUS_LIBS="$with_libmodbus_libs"
2107 AC_SUBST(BUILD_WITH_LIBMODBUS_CFLAGS)
2108 AC_SUBST(BUILD_WITH_LIBMODBUS_LIBS)
2112 # --with-libmysql {{{
2113 with_mysql_config="mysql_config"
2114 with_mysql_cflags=""
2116 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
2118 if test "x$withval" = "xno"
2121 else if test "x$withval" = "xyes"
2125 if test -f "$withval" && test -x "$withval";
2127 with_mysql_config="$withval"
2128 else if test -x "$withval/bin/mysql_config"
2130 with_mysql_config="$withval/bin/mysql_config"
2138 if test "x$with_libmysql" = "xyes"
2140 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
2141 mysql_config_status=$?
2143 if test $mysql_config_status -ne 0
2145 with_libmysql="no ($with_mysql_config failed)"
2147 SAVE_CPPFLAGS="$CPPFLAGS"
2148 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
2151 have_mysql_mysql_h="no"
2152 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
2154 if test "x$have_mysql_h" = "xno"
2156 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
2159 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
2161 with_libmysql="no (mysql.h not found)"
2164 CPPFLAGS="$SAVE_CPPFLAGS"
2167 if test "x$with_libmysql" = "xyes"
2169 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
2170 mysql_config_status=$?
2172 if test $mysql_config_status -ne 0
2174 with_libmysql="no ($with_mysql_config failed)"
2176 AC_CHECK_LIB(mysqlclient, mysql_init,
2177 [with_libmysql="yes"],
2178 [with_libmysql="no (symbol 'mysql_init' not found)"],
2181 AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
2182 [with_libmysql="yes"],
2183 [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
2187 if test "x$with_libmysql" = "xyes"
2189 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
2190 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
2191 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
2192 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
2194 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
2197 # --with-libnetlink {{{
2198 with_libnetlink_cflags=""
2199 with_libnetlink_libs="-lnetlink"
2200 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
2202 echo "libnetlink: withval = $withval"
2203 if test "x$withval" = "xyes"
2205 with_libnetlink="yes"
2206 else if test "x$withval" = "xno"
2208 with_libnetlink="no"
2210 if test -d "$withval/include"
2212 with_libnetlink_cflags="-I$withval/include"
2213 with_libnetlink_libs="-L$withval/lib -lnetlink"
2214 with_libnetlink="yes"
2216 AC_MSG_ERROR("no such directory: $withval/include")
2221 if test "x$ac_system" = "xLinux"
2223 with_libnetlink="yes"
2225 with_libnetlink="no (Linux only library)"
2228 if test "x$with_libnetlink" = "xyes"
2230 SAVE_CFLAGS="$CFLAGS"
2231 CFLAGS="$CFLAGS $with_libnetlink_cflags"
2233 with_libnetlink="no (libnetlink.h not found)"
2235 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
2237 with_libnetlink="yes"
2241 #include <sys/types.h>
2242 #include <asm/types.h>
2243 #include <sys/socket.h>
2244 #include <linux/netlink.h>
2245 #include <linux/rtnetlink.h>])
2246 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
2248 #include <sys/types.h>
2249 #include <asm/types.h>
2250 #include <sys/socket.h>])
2254 #include <sys/types.h>
2255 #include <asm/types.h>
2256 #include <sys/socket.h>
2257 #include <linux/netlink.h>
2258 #include <linux/rtnetlink.h>
2262 int retval = TCA_STATS2;
2265 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
2270 #include <sys/types.h>
2271 #include <asm/types.h>
2272 #include <sys/socket.h>
2273 #include <linux/netlink.h>
2274 #include <linux/rtnetlink.h>
2278 int retval = TCA_STATS;
2281 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
2284 CFLAGS="$SAVE_CFLAGS"
2286 if test "x$with_libnetlink" = "xyes"
2288 AC_CHECK_LIB(netlink, rtnl_open,
2289 [with_libnetlink="yes"],
2290 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
2291 [$with_libnetlink_libs])
2293 if test "x$with_libnetlink" = "xyes"
2295 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
2296 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
2297 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
2298 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
2300 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
2303 # --with-libnetapp {{{
2304 AC_ARG_VAR([LIBNETAPP_CPPFLAGS], [C preprocessor flags required to build with libnetapp])
2305 AC_ARG_VAR([LIBNETAPP_LDFLAGS], [Linker flags required to build with libnetapp])
2306 AC_ARG_VAR([LIBNETAPP_LIBS], [Other libraries required to link against libnetapp])
2307 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS"
2308 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS"
2309 LIBNETAPP_LIBS="$LIBNETAPP_LIBS"
2310 AC_ARG_WITH(libnetapp, [AS_HELP_STRING([--with-libnetapp@<:@=PREFIX@:>@], [Path to libnetapp.])],
2312 if test -d "$withval"
2314 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS -I$withval/include"
2315 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS -L$withval/lib"
2316 with_libnetapp="yes"
2318 with_libnetapp="$withval"
2322 with_libnetapp="yes"
2325 SAVE_CPPFLAGS="$CPPFLAGS"
2326 SAVE_LDFLAGS="$LDFLAGS"
2327 CPPFLAGS="$CPPFLAGS $LIBNETAPP_CPPFLAGS"
2328 LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
2330 if test "x$with_libnetapp" = "xyes"
2332 if test "x$LIBNETAPP_CPPFLAGS" != "x"
2334 AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
2336 AC_CHECK_HEADERS(netapp_api.h,
2337 [with_libnetapp="yes"],
2338 [with_libnetapp="no (netapp_api.h not found)"])
2341 if test "x$with_libnetapp" = "xyes"
2343 if test "x$LIBNETAPP_LDFLAGS" != "x"
2345 AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
2348 if test "x$LIBNETAPP_LIBS" = "x"
2350 LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm -lcrypto -lz"
2352 AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
2354 AC_CHECK_LIB(netapp, na_server_invoke_elem,
2355 [with_libnetapp="yes"],
2356 [with_libnetapp="no (symbol na_server_invoke_elem not found)"],
2358 LIBNETAPP_LIBS="-lnetapp $LIBNETAPP_LIBS"
2361 CPPFLAGS="$SAVE_CPPFLAGS"
2362 LDFLAGS="$SAVE_LDFLAGS"
2364 if test "x$with_libnetapp" = "xyes"
2366 AC_DEFINE(HAVE_LIBNETAPP, 1, [Define to 1 if you have the netapp library (-lnetapp).])
2369 AC_SUBST(LIBNETAPP_CPPFLAGS)
2370 AC_SUBST(LIBNETAPP_LDFLAGS)
2371 AC_SUBST(LIBNETAPP_LIBS)
2372 AM_CONDITIONAL(BUILD_WITH_LIBNETAPP, test "x$with_libnetapp" = "xyes")
2375 # --with-libnetsnmp {{{
2376 with_snmp_config="net-snmp-config"
2379 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
2381 if test "x$withval" = "xno"
2383 with_libnetsnmp="no"
2384 else if test "x$withval" = "xyes"
2386 with_libnetsnmp="yes"
2388 if test -x "$withval"
2390 with_snmp_config="$withval"
2391 with_libnetsnmp="yes"
2393 with_snmp_config="$withval/bin/net-snmp-config"
2394 with_libnetsnmp="yes"
2398 [with_libnetsnmp="yes"])
2399 if test "x$with_libnetsnmp" = "xyes"
2401 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
2402 snmp_config_status=$?
2404 if test $snmp_config_status -ne 0
2406 with_libnetsnmp="no ($with_snmp_config failed)"
2408 SAVE_CPPFLAGS="$CPPFLAGS"
2409 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
2411 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
2413 CPPFLAGS="$SAVE_CPPFLAGS"
2416 if test "x$with_libnetsnmp" = "xyes"
2418 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
2419 snmp_config_status=$?
2421 if test $snmp_config_status -ne 0
2423 with_libnetsnmp="no ($with_snmp_config failed)"
2425 AC_CHECK_LIB(netsnmp, init_snmp,
2426 [with_libnetsnmp="yes"],
2427 [with_libnetsnmp="no (libnetsnmp not found)"],
2431 if test "x$with_libnetsnmp" = "xyes"
2433 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
2434 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
2435 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
2436 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
2438 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
2441 # --with-liboconfig {{{
2442 with_own_liboconfig="no"
2443 liboconfig_LDFLAGS="$LDFLAGS"
2444 liboconfig_CPPFLAGS="$CPPFLAGS"
2445 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
2447 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2449 if test -d "$withval/lib"
2451 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
2453 if test -d "$withval/include"
2455 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
2458 if test "x$withval" = "xno"
2460 AC_MSG_ERROR("liboconfig is required")
2464 with_liboconfig="yes"
2467 save_LDFLAGS="$LDFLAGS"
2468 save_CPPFLAGS="$CPPFLAGS"
2469 LDFLAGS="$liboconfig_LDFLAGS"
2470 CPPFLAGS="$liboconfig_CPPFLAGS"
2471 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
2473 with_liboconfig="yes"
2474 with_own_liboconfig="no"
2477 with_liboconfig="yes"
2478 with_own_liboconfig="yes"
2479 LDFLAGS="$save_LDFLAGS"
2480 CPPFLAGS="$save_CPPFLAGS"
2483 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
2484 if test "x$with_own_liboconfig" = "xyes"
2486 with_liboconfig="yes (shipped version)"
2490 # --with-liboping {{{
2491 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
2493 if test "x$withval" = "xyes"
2496 else if test "x$withval" = "xno"
2501 LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS -I$withval/include"
2502 LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS -L$withval/lib"
2505 [with_liboping="yes"])
2507 SAVE_CPPFLAGS="$CPPFLAGS"
2508 SAVE_LDFLAGS="$LDFLAGS"
2510 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
2511 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
2513 if test "x$with_liboping" = "xyes"
2515 if test "x$LIBOPING_CPPFLAGS" != "x"
2517 AC_MSG_NOTICE([liboping CPPFLAGS: $LIBOPING_CPPFLAGS])
2519 AC_CHECK_HEADERS(oping.h,
2520 [with_liboping="yes"],
2521 [with_liboping="no ('oping.h' not found)"])
2523 if test "x$with_liboping" = "xyes"
2525 if test "x$LIBOPING_LDFLAGS" != "x"
2527 AC_MSG_NOTICE([liboping LDFLAGS: $LIBOPING_LDFLAGS])
2529 AC_CHECK_LIB(oping, ping_construct,
2530 [with_liboping="yes"],
2531 [with_liboping="no (symbol 'ping_construct' not found)"])
2534 CPPFLAGS="$SAVE_CPPFLAGS"
2535 LDFLAGS="$SAVE_LDFLAGS"
2537 if test "x$with_liboping" = "xyes"
2539 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
2540 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
2541 AC_SUBST(BUILD_WITH_LIBOPING_CPPFLAGS)
2542 AC_SUBST(BUILD_WITH_LIBOPING_LDFLAGS)
2544 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
2548 with_oracle_cppflags=""
2550 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
2552 if test "x$withval" = "xyes"
2554 if test "x$ORACLE_HOME" = "x"
2556 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
2559 else if test "x$withval" = "xno"
2564 ORACLE_HOME="$withval"
2568 if test "x$ORACLE_HOME" = "x"
2570 with_oracle="no (ORACLE_HOME is not set)"
2575 if test "x$ORACLE_HOME" != "x"
2577 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
2579 if test -e "$ORACLE_HOME/lib/ldflags"
2581 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
2583 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
2584 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
2586 if test "x$with_oracle" = "xyes"
2588 SAVE_CPPFLAGS="$CPPFLAGS"
2589 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2591 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
2593 CPPFLAGS="$SAVE_CPPFLAGS"
2595 if test "x$with_oracle" = "xyes"
2597 SAVE_CPPFLAGS="$CPPFLAGS"
2598 SAVE_LDFLAGS="$LDFLAGS"
2599 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2600 LDFLAGS="$LDFLAGS $with_oracle_libs"
2602 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
2604 CPPFLAGS="$SAVE_CPPFLAGS"
2605 LDFLAGS="$SAVE_LDFLAGS"
2607 if test "x$with_oracle" = "xyes"
2609 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
2610 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
2611 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
2612 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
2616 # --with-libowcapi {{{
2617 with_libowcapi_cppflags=""
2618 with_libowcapi_libs="-lowcapi"
2619 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
2621 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2623 with_libowcapi_cppflags="-I$withval/include"
2624 with_libowcapi_libs="-L$withval/lib -lowcapi"
2625 with_libowcapi="yes"
2627 with_libowcapi="$withval"
2631 with_libowcapi="yes"
2633 if test "x$with_libowcapi" = "xyes"
2635 SAVE_CPPFLAGS="$CPPFLAGS"
2636 CPPFLAGS="$with_libowcapi_cppflags"
2638 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
2640 CPPFLAGS="$SAVE_CPPFLAGS"
2642 if test "x$with_libowcapi" = "xyes"
2644 SAVE_LDFLAGS="$LDFLAGS"
2645 SAVE_CPPFLAGS="$CPPFLAGS"
2646 LDFLAGS="$with_libowcapi_libs"
2647 CPPFLAGS="$with_libowcapi_cppflags"
2649 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
2651 LDFLAGS="$SAVE_LDFLAGS"
2652 CPPFLAGS="$SAVE_CPPFLAGS"
2654 if test "x$with_libowcapi" = "xyes"
2656 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
2657 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
2658 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
2659 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
2663 # --with-libpcap {{{
2664 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
2666 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2668 LDFLAGS="$LDFLAGS -L$withval/lib"
2669 CPPFLAGS="$CPPFLAGS -I$withval/include"
2672 with_libpcap="$withval"
2678 if test "x$with_libpcap" = "xyes"
2680 AC_CHECK_LIB(pcap, pcap_open_live,
2682 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
2683 ], [with_libpcap="no (libpcap not found)"])
2685 if test "x$with_libpcap" = "xyes"
2687 AC_CHECK_HEADERS(pcap.h,
2689 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
2690 ], [with_libpcap="no (pcap.h not found)"])
2692 if test "x$with_libpcap" = "xyes"
2698 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
2699 [Wether or not to use the pcap library])
2700 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
2703 # --with-libperl {{{
2704 perl_interpreter="perl"
2705 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
2707 if test -x "$withval"
2709 perl_interpreter="$withval"
2711 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
2713 LDFLAGS="$LDFLAGS -L$withval/lib"
2714 CPPFLAGS="$CPPFLAGS -I$withval/include"
2715 perl_interpreter="$withval/bin/perl"
2718 with_libperl="$withval"
2725 AC_MSG_CHECKING([for perl])
2726 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
2727 if test -x "$perl_interpreter"
2729 AC_MSG_RESULT([yes ($perl_interpreter)])
2735 AC_SUBST(PERL, "$perl_interpreter")
2737 if test "x$with_libperl" = "xyes" \
2738 && test -n "$perl_interpreter"
2740 SAVE_CFLAGS="$CFLAGS"
2741 SAVE_LDFLAGS="$LDFLAGS"
2742 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
2743 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
2744 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
2745 CFLAGS="$CFLAGS $PERL_CFLAGS"
2746 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2748 AC_CACHE_CHECK([for libperl],
2749 [c_cv_have_libperl],
2753 #define PERL_NO_GET_CONTEXT
2760 load_module (PERL_LOADMOD_NOIMPORT,
2761 newSVpv ("Collectd::Plugin::FooBar", 24),
2764 [c_cv_have_libperl="yes"],
2765 [c_cv_have_libperl="no"]
2769 if test "x$c_cv_have_libperl" = "xyes"
2771 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
2772 AC_SUBST(PERL_CFLAGS)
2773 AC_SUBST(PERL_LDFLAGS)
2778 CFLAGS="$SAVE_CFLAGS"
2779 LDFLAGS="$SAVE_LDFLAGS"
2780 else if test -z "$perl_interpreter"; then
2781 with_libperl="no (no perl interpreter found)"
2782 c_cv_have_libperl="no"
2784 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
2786 if test "x$with_libperl" = "xyes"
2788 SAVE_CFLAGS="$CFLAGS"
2789 SAVE_LDFLAGS="$LDFLAGS"
2790 CFLAGS="$CFLAGS $PERL_CFLAGS"
2791 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2793 AC_CACHE_CHECK([if perl supports ithreads],
2794 [c_cv_have_perl_ithreads],
2802 #if !defined(USE_ITHREADS)
2803 # error "Perl does not support ithreads!"
2804 #endif /* !defined(USE_ITHREADS) */
2807 [c_cv_have_perl_ithreads="yes"],
2808 [c_cv_have_perl_ithreads="no"]
2812 if test "x$c_cv_have_perl_ithreads" = "xyes"
2814 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
2817 CFLAGS="$SAVE_CFLAGS"
2818 LDFLAGS="$SAVE_LDFLAGS"
2821 if test "x$with_libperl" = "xyes"
2823 SAVE_CFLAGS="$CFLAGS"
2824 SAVE_LDFLAGS="$LDFLAGS"
2825 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
2826 # (see issues #41 and #42)
2827 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
2828 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2830 AC_CACHE_CHECK([for broken Perl_load_module()],
2831 [c_cv_have_broken_perl_load_module],
2835 #define PERL_NO_GET_CONTEXT
2842 load_module (PERL_LOADMOD_NOIMPORT,
2843 newSVpv ("Collectd::Plugin::FooBar", 24),
2846 [c_cv_have_broken_perl_load_module="no"],
2847 [c_cv_have_broken_perl_load_module="yes"]
2851 CFLAGS="$SAVE_CFLAGS"
2852 LDFLAGS="$SAVE_LDFLAGS"
2854 AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
2855 test "x$c_cv_have_broken_perl_load_module" = "xyes")
2857 if test "x$with_libperl" = "xyes"
2859 SAVE_CFLAGS="$CFLAGS"
2860 SAVE_LDFLAGS="$LDFLAGS"
2861 CFLAGS="$CFLAGS $PERL_CFLAGS"
2862 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2865 [struct mgvtbl.svt_local],
2866 [have_struct_mgvtbl_svt_local="yes"],
2867 [have_struct_mgvtbl_svt_local="no"],
2874 if test "x$have_struct_mgvtbl_svt_local" = "xyes"
2876 AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
2877 [Define if Perl's struct mgvtbl has member svt_local.])
2880 CFLAGS="$SAVE_CFLAGS"
2881 LDFLAGS="$SAVE_LDFLAGS"
2886 with_pg_config="pg_config"
2887 with_libpq_includedir=""
2888 with_libpq_libdir=""
2889 with_libpq_cppflags=""
2890 with_libpq_ldflags=""
2891 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2894 if test "x$withval" = "xno"
2897 else if test "x$withval" = "xyes"
2901 if test -f "$withval" && test -x "$withval";
2903 with_pg_config="$withval"
2904 else if test -x "$withval/bin/pg_config"
2906 with_pg_config="$withval/bin/pg_config"
2914 if test "x$with_libpq" = "xyes"
2916 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2919 if test $pg_config_status -eq 0
2921 if test -n "$with_libpq_includedir"; then
2922 for dir in $with_libpq_includedir; do
2923 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2927 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2930 SAVE_CPPFLAGS="$CPPFLAGS"
2931 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2933 AC_CHECK_HEADERS(libpq-fe.h, [],
2934 [with_libpq="no (libpq-fe.h not found)"], [])
2936 CPPFLAGS="$SAVE_CPPFLAGS"
2938 if test "x$with_libpq" = "xyes"
2940 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2943 if test $pg_config_status -eq 0
2945 if test -n "$with_libpq_libdir"; then
2946 for dir in $with_libpq_libdir; do
2947 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2951 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2954 SAVE_LDFLAGS="$LDFLAGS"
2955 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2957 AC_CHECK_LIB(pq, PQconnectdb,
2959 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2961 AC_CHECK_LIB(pq, PQserverVersion,
2963 [with_libpq="no (symbol 'PQserverVersion' not found)"])
2965 LDFLAGS="$SAVE_LDFLAGS"
2967 if test "x$with_libpq" = "xyes"
2969 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2970 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2971 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2972 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2974 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2977 # --with-libpthread {{{
2978 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
2979 [ if test "x$withval" != "xno" \
2980 && test "x$withval" != "xyes"
2982 LDFLAGS="$LDFLAGS -L$withval/lib"
2983 CPPFLAGS="$CPPFLAGS -I$withval/include"
2984 with_libpthread="yes"
2986 if test "x$withval" = "xno"
2988 with_libpthread="no (disabled)"
2991 ], [with_libpthread="yes"])
2992 if test "x$with_libpthread" = "xyes"
2994 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
2997 if test "x$with_libpthread" = "xyes"
2999 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
3001 if test "x$with_libpthread" = "xyes"
3007 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
3008 [Wether or not to use pthread (POSIX threads) library])
3009 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
3014 with_python_path="$PATH"
3015 AC_ARG_WITH(python, [AS_HELP_STRING([--with-python@<:@=PREFIX@:>@], [Path to the python interpreter.])],
3017 if test "x$withval" = "xyes" || test "x$withval" = "xno"
3019 with_python="$withval"
3020 else if test -x "$withval"
3022 with_python_prog="$withval"
3023 with_python_path="`dirname \"$withval\"`$PATH_SEPARATOR$with_python_path"
3025 else if test -d "$withval"
3027 with_python_path="$withval$PATH_SEPARATOR$with_python_path"
3030 AC_MSG_WARN([Argument not recognized: $withval])
3032 ], [with_python="yes"])
3035 SAVE_CPPFLAGS="$CPPFLAGS"
3036 SAVE_LDFLAGS="$LDFLAGS"
3039 PATH="$with_python_path"
3041 if test "x$with_python" = "xyes" && test "x$with_python_prog" = "x"
3043 AC_MSG_CHECKING([for python])
3044 with_python_prog="`which python 2>/dev/null`"
3045 if test "x$with_python_prog" = "x"
3047 AC_MSG_RESULT([not found])
3048 with_python="no (interpreter not found)"
3050 AC_MSG_RESULT([$with_python_prog])
3054 if test "x$with_python" = "xyes"
3056 AC_MSG_CHECKING([for Python CPPFLAGS])
3057 python_include_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_python_inc())" | "$with_python_prog" 2>&1`
3058 python_config_status=$?
3060 if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x"
3062 AC_MSG_RESULT([failed with status $python_config_status (output: $python_include_path)])
3065 AC_MSG_RESULT([$python_include_path])
3069 if test "x$with_python" = "xyes"
3071 CPPFLAGS="-I$python_include_path $CPPFLAGS"
3072 AC_CHECK_HEADERS(Python.h,
3073 [with_python="yes"],
3074 [with_python="no ('Python.h' not found)"])
3077 if test "x$with_python" = "xyes"
3079 AC_MSG_CHECKING([for Python LDFLAGS])
3080 python_library_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0))" | "$with_python_prog" 2>&1`
3081 python_config_status=$?
3083 if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x"
3085 AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_path)])
3088 AC_MSG_RESULT([$python_library_path])
3092 if test "x$with_python" = "xyes"
3094 AC_MSG_CHECKING([for Python LIBS])
3095 python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1`
3096 python_config_status=$?
3098 if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
3100 AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_flags)])
3103 AC_MSG_RESULT([$python_library_flags])
3107 if test "x$with_python" = "xyes"
3109 LDFLAGS="-L$python_library_path $LDFLAGS"
3110 LIBS="$python_library_flags $LIBS"
3112 AC_CHECK_FUNC(PyObject_CallFunction,
3113 [with_python="yes"],
3114 [with_python="no (Symbol 'PyObject_CallFunction' not found)"])
3118 CPPFLAGS="$SAVE_CPPFLAGS"
3119 LDFLAGS="$SAVE_LDFLAGS"
3122 if test "x$with_python" = "xyes"
3124 BUILD_WITH_PYTHON_CPPFLAGS="-I$python_include_path"
3125 BUILD_WITH_PYTHON_LDFLAGS="-L$python_library_path"
3126 BUILD_WITH_PYTHON_LIBS="$python_library_flags"
3127 AC_SUBST(BUILD_WITH_PYTHON_CPPFLAGS)
3128 AC_SUBST(BUILD_WITH_PYTHON_LDFLAGS)
3129 AC_SUBST(BUILD_WITH_PYTHON_LIBS)
3133 # --with-librabbitmq {{{
3134 with_librabbitmq_cppflags=""
3135 with_librabbitmq_ldflags=""
3136 AC_ARG_WITH(librabbitmq, [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])],
3138 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3140 with_librabbitmq_cppflags="-I$withval/include"
3141 with_librabbitmq_ldflags="-L$withval/lib"
3142 with_librabbitmq="yes"
3144 with_librabbitmq="$withval"
3148 with_librabbitmq="yes"
3150 if test "x$with_librabbitmq" = "xyes"
3152 SAVE_CPPFLAGS="$CPPFLAGS"
3153 CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
3155 AC_CHECK_HEADERS(amqp.h, [with_librabbitmq="yes"], [with_librabbitmq="no (amqp.h not found)"])
3157 CPPFLAGS="$SAVE_CPPFLAGS"
3159 if test "x$with_librabbitmq" = "xyes"
3161 SAVE_CPPFLAGS="$CPPFLAGS"
3162 SAVE_LDFLAGS="$LDFLAGS"
3163 CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
3164 LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags"
3166 AC_CHECK_LIB(rabbitmq, amqp_basic_publish, [with_librabbitmq="yes"], [with_librabbitmq="no (Symbol 'amqp_basic_publish' not found)"])
3168 CPPFLAGS="$SAVE_CPPFLAGS"
3169 LDFLAGS="$SAVE_LDFLAGS"
3171 if test "x$with_librabbitmq" = "xyes"
3173 BUILD_WITH_LIBRABBITMQ_CPPFLAGS="$with_librabbitmq_cppflags"
3174 BUILD_WITH_LIBRABBITMQ_LDFLAGS="$with_librabbitmq_ldflags"
3175 BUILD_WITH_LIBRABBITMQ_LIBS="-lrabbitmq"
3176 AC_SUBST(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
3177 AC_SUBST(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
3178 AC_SUBST(BUILD_WITH_LIBRABBITMQ_LIBS)
3179 AC_DEFINE(HAVE_LIBRABBITMQ, 1, [Define if librabbitmq is present and usable.])
3181 AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes")
3184 # --with-librouteros {{{
3185 AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
3187 if test "x$withval" = "xyes"
3189 with_librouteros="yes"
3190 else if test "x$withval" = "xno"
3192 with_librouteros="no"
3194 with_librouteros="yes"
3195 LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS -I$withval/include"
3196 LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS -L$withval/lib"
3199 [with_librouteros="yes"])
3201 SAVE_CPPFLAGS="$CPPFLAGS"
3202 SAVE_LDFLAGS="$LDFLAGS"
3204 CPPFLAGS="$CPPFLAGS $LIBROUTEROS_CPPFLAGS"
3205 LDFLAGS="$LDFLAGS $LIBROUTEROS_LDFLAGS"
3207 if test "x$with_librouteros" = "xyes"
3209 if test "x$LIBROUTEROS_CPPFLAGS" != "x"
3211 AC_MSG_NOTICE([librouteros CPPFLAGS: $LIBROUTEROS_CPPFLAGS])
3213 AC_CHECK_HEADERS(routeros_api.h,
3214 [with_librouteros="yes"],
3215 [with_librouteros="no ('routeros_api.h' not found)"])
3217 if test "x$with_librouteros" = "xyes"
3219 if test "x$LIBROUTEROS_LDFLAGS" != "x"
3221 AC_MSG_NOTICE([librouteros LDFLAGS: $LIBROUTEROS_LDFLAGS])
3223 AC_CHECK_LIB(routeros, ros_interface,
3224 [with_librouteros="yes"],
3225 [with_librouteros="no (symbol 'ros_interface' not found)"])
3228 CPPFLAGS="$SAVE_CPPFLAGS"
3229 LDFLAGS="$SAVE_LDFLAGS"
3231 if test "x$with_librouteros" = "xyes"
3233 BUILD_WITH_LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS"
3234 BUILD_WITH_LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS"
3235 AC_SUBST(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
3236 AC_SUBST(BUILD_WITH_LIBROUTEROS_LDFLAGS)
3238 AM_CONDITIONAL(BUILD_WITH_LIBROUTEROS, test "x$with_librouteros" = "xyes")
3242 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
3245 librrd_threadsafe="yes"
3246 librrd_rrdc_update="no"
3247 AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
3248 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
3250 librrd_cflags="-I$withval/include"
3251 librrd_ldflags="-L$withval/lib"
3254 with_librrd="$withval"
3256 ], [with_librrd="yes"])
3257 if test "x$with_librrd" = "xyes"
3259 SAVE_CPPFLAGS="$CPPFLAGS"
3260 SAVE_LDFLAGS="$LDFLAGS"
3262 CPPFLAGS="$CPPFLAGS $librrd_cflags"
3263 LDFLAGS="$LDFLAGS $librrd_ldflags"
3265 AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
3267 CPPFLAGS="$SAVE_CPPFLAGS"
3268 LDFLAGS="$SAVE_LDFLAGS"
3270 if test "x$with_librrd" = "xyes"
3272 SAVE_CPPFLAGS="$CPPFLAGS"
3273 SAVE_LDFLAGS="$LDFLAGS"
3275 CPPFLAGS="$CPPFLAGS $librrd_cflags"
3276 LDFLAGS="$LDFLAGS $librrd_ldflags"
3278 AC_CHECK_LIB(rrd_th, rrd_update_r,
3280 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
3282 [librrd_threadsafe="no"
3283 AC_CHECK_LIB(rrd, rrd_update,
3285 librrd_ldflags="$librrd_ldflags -lrrd -lm"
3287 [with_librrd="no (symbol 'rrd_update' not found)"],
3292 if test "x$librrd_threadsafe" = "xyes"
3294 AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
3296 AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
3299 CPPFLAGS="$SAVE_CPPFLAGS"
3300 LDFLAGS="$SAVE_LDFLAGS"
3302 if test "x$with_librrd" = "xyes"
3304 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
3305 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
3306 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
3307 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
3309 if test "x$librrd_threadsafe" = "xyes"
3311 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
3315 # --with-libsensors {{{
3316 with_sensors_cflags=""
3317 with_sensors_ldflags=""
3318 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
3320 if test "x$withval" = "xno"
3322 with_libsensors="no"
3324 with_libsensors="yes"
3325 if test "x$withval" != "xyes"
3327 with_sensors_cflags="-I$withval/include"
3328 with_sensors_ldflags="-L$withval/lib"
3329 with_libsensors="yes"
3334 if test "x$ac_system" = "xLinux"
3336 with_libsensors="yes"
3338 with_libsensors="no (Linux only library)"
3341 if test "x$with_libsensors" = "xyes"
3343 SAVE_CPPFLAGS="$CPPFLAGS"
3344 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
3346 # AC_CHECK_HEADERS(sensors/sensors.h,
3348 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
3350 # [with_libsensors="no (sensors/sensors.h not found)"])
3351 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
3353 CPPFLAGS="$SAVE_CPPFLAGS"
3355 if test "x$with_libsensors" = "xyes"
3357 SAVE_CPPFLAGS="$CPPFLAGS"
3358 SAVE_LDFLAGS="$LDFLAGS"
3359 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
3360 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
3362 AC_CHECK_LIB(sensors, sensors_init,
3364 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
3366 [with_libsensors="no (libsensors not found)"])
3368 CPPFLAGS="$SAVE_CPPFLAGS"
3369 LDFLAGS="$SAVE_LDFLAGS"
3371 if test "x$with_libsensors" = "xyes"
3373 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
3374 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
3375 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
3376 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
3378 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
3381 # --with-libstatgrab {{{
3382 with_libstatgrab_cflags=""
3383 with_libstatgrab_ldflags=""
3384 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
3386 if test "x$withval" != "xno" \
3387 && test "x$withval" != "xyes"
3389 with_libstatgrab_cflags="-I$withval/include"
3390 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
3391 with_libstatgrab="yes"
3392 with_libstatgrab_pkg_config="no"
3394 with_libstatgrab="$withval"
3395 with_libstatgrab_pkg_config="yes"
3399 with_libstatgrab="yes"
3400 with_libstatgrab_pkg_config="yes"
3403 if test "x$with_libstatgrab" = "xyes" \
3404 && test "x$with_libstatgrab_pkg_config" = "xyes"
3406 if test "x$PKG_CONFIG" != "x"
3408 AC_MSG_CHECKING([pkg-config for libstatgrab])
3410 $PKG_CONFIG --exists libstatgrab 2>/dev/null
3413 with_libstatgrab_pkg_config="no"
3414 with_libstatgrab="no ($PKG_CONFIG doesn't know libstatgrab)"
3415 temp_result="not found"
3417 AC_MSG_RESULT([$temp_result])
3419 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
3420 with_libstatgrab_pkg_config="no"
3421 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
3425 if test "x$with_libstatgrab" = "xyes" \
3426 && test "x$with_libstatgrab_pkg_config" = "xyes" \
3427 && test "x$with_libstatgrab_cflags" = "x"
3429 AC_MSG_CHECKING([for libstatgrab CFLAGS])
3430 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
3433 with_libstatgrab_cflags="$temp_result"
3435 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
3436 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
3438 AC_MSG_RESULT([$temp_result])
3441 if test "x$with_libstatgrab" = "xyes" \
3442 && test "x$with_libstatgrab_pkg_config" = "xyes" \
3443 && test "x$with_libstatgrab_ldflags" = "x"
3445 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
3446 temp_result="`$PKG_CONFIG --libs libstatgrab`"
3449 with_libstatgrab_ldflags="$temp_result"
3451 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
3452 temp_result="$PKG_CONFIG --libs libstatgrab failed"
3454 AC_MSG_RESULT([$temp_result])
3457 if test "x$with_libstatgrab" = "xyes"
3459 SAVE_CPPFLAGS="$CPPFLAGS"
3460 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
3462 AC_CHECK_HEADERS(statgrab.h,
3463 [with_libstatgrab="yes"],
3464 [with_libstatgrab="no (statgrab.h not found)"])
3466 CPPFLAGS="$SAVE_CPPFLAGS"
3469 if test "x$with_libstatgrab" = "xyes"
3471 SAVE_CFLAGS="$CFLAGS"
3472 SAVE_LDFLAGS="$LDFLAGS"
3474 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
3475 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
3477 AC_CHECK_LIB(statgrab, sg_init,
3478 [with_libstatgrab="yes"],
3479 [with_libstatgrab="no (symbol sg_init not found)"])
3481 CFLAGS="$SAVE_CFLAGS"
3482 LDFLAGS="$SAVE_LDFLAGS"
3485 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
3486 if test "x$with_libstatgrab" = "xyes"
3488 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
3489 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
3490 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
3491 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
3492 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
3496 # --with-libtokyotyrant {{{
3497 with_libtokyotyrant_cppflags=""
3498 with_libtokyotyrant_ldflags=""
3499 with_libtokyotyrant_libs=""
3500 AC_ARG_WITH(libtokyotyrant, [AS_HELP_STRING([--with-libtokyotyrant@<:@=PREFIX@:>@], [Path to libtokyotyrant.])],
3502 if test "x$withval" = "xno"
3504 with_libtokyotyrant="no"
3505 else if test "x$withval" = "xyes"
3507 with_libtokyotyrant="yes"
3509 with_libtokyotyrant_cppflags="-I$withval/include"
3510 with_libtokyotyrant_ldflags="-L$withval/include"
3511 with_libtokyotyrant_libs="-ltokyotyrant"
3512 with_libtokyotyrant="yes"
3516 with_libtokyotyrant="yes"
3519 if test "x$with_libtokyotyrant" = "xyes"
3521 if $PKG_CONFIG --exists tokyotyrant
3523 with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
3524 with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `pkg-config --libs-only-L tokyotyrant`"
3525 with_libtokyotyrant_libs="$with_libtokyotyrant_libs `pkg-config --libs-only-l tokyotyrant`"
3529 SAVE_CPPFLAGS="$CPPFLAGS"
3530 SAVE_LDFLAGS="$LDFLAGS"
3531 CPPFLAGS="$CPPFLAGS $with_libtokyotyrant_cppflags"
3532 LDFLAGS="$LDFLAGS $with_libtokyotyrant_ldflags"
3534 if test "x$with_libtokyotyrant" = "xyes"
3536 AC_CHECK_HEADERS(tcrdb.h,
3538 AC_DEFINE(HAVE_TCRDB_H, 1,
3539 [Define to 1 if you have the <tcrdb.h> header file.])
3540 ], [with_libtokyotyrant="no (tcrdb.h not found)"])
3543 if test "x$with_libtokyotyrant" = "xyes"
3545 AC_CHECK_LIB(tokyotyrant, tcrdbrnum,
3547 AC_DEFINE(HAVE_LIBTOKYOTYRANT, 1,
3548 [Define to 1 if you have the tokyotyrant library (-ltokyotyrant).])
3550 [with_libtokyotyrant="no (symbol tcrdbrnum not found)"],
3551 [$with_libtokyotyrant_libs])
3554 CPPFLAGS="$SAVE_CPPFLAGS"
3555 LDFLAGS="$SAVE_LDFLAGS"
3557 if test "x$with_libtokyotyrant" = "xyes"
3559 BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
3560 BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
3561 BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
3562 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
3563 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
3564 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
3566 AM_CONDITIONAL(BUILD_WITH_LIBTOKYOTYRANT, test "x$with_libtokyotyrant" = "xyes")
3569 # --with-libupsclient {{{
3570 with_libupsclient_config=""
3571 with_libupsclient_cflags=""
3572 with_libupsclient_libs=""
3573 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
3575 if test "x$withval" = "xno"
3577 with_libupsclient="no"
3578 else if test "x$withval" = "xyes"
3580 with_libupsclient="use_pkgconfig"
3582 if test -x "$withval"
3584 with_libupsclient_config="$withval"
3585 with_libupsclient="use_libupsclient_config"
3586 else if test -x "$withval/bin/libupsclient-config"
3588 with_libupsclient_config="$withval/bin/libupsclient-config"
3589 with_libupsclient="use_libupsclient_config"
3591 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
3592 with_libupsclient_cflags="-I$withval/include"
3593 with_libupsclient_libs="-L$withval/lib -lupsclient"
3594 with_libupsclient="yes"
3598 [with_libupsclient="use_pkgconfig"])
3600 # configure using libupsclient-config
3601 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3603 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
3604 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
3607 with_libupsclient="no ($with_libupsclient_config failed)"
3609 with_libupsclient_libs="`$with_libupsclient_config --libs`"
3612 with_libupsclient="no ($with_libupsclient_config failed)"
3615 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3617 with_libupsclient="yes"
3620 # configure using pkg-config
3621 if test "x$with_libupsclient" = "xuse_pkgconfig"
3623 if test "x$PKG_CONFIG" = "x"
3625 with_libupsclient="no (Don't have pkg-config)"
3628 if test "x$with_libupsclient" = "xuse_pkgconfig"
3630 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
3631 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
3634 with_libupsclient="no (pkg-config doesn't know library)"
3637 if test "x$with_libupsclient" = "xuse_pkgconfig"
3639 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
3642 with_libupsclient="no ($PKG_CONFIG failed)"
3644 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
3647 with_libupsclient="no ($PKG_CONFIG failed)"
3650 if test "x$with_libupsclient" = "xuse_pkgconfig"
3652 with_libupsclient="yes"
3655 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
3656 # the actual checks.
3657 if test "x$with_libupsclient" = "xyes"
3659 SAVE_CPPFLAGS="$CPPFLAGS"
3660 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3662 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
3664 CPPFLAGS="$SAVE_CPPFLAGS"
3666 if test "x$with_libupsclient" = "xyes"
3668 SAVE_CPPFLAGS="$CPPFLAGS"
3669 SAVE_LDFLAGS="$LDFLAGS"
3671 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3672 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
3674 AC_CHECK_LIB(upsclient, upscli_connect,
3675 [with_libupsclient="yes"],
3676 [with_libupsclient="no (symbol upscli_connect not found)"])
3678 CPPFLAGS="$SAVE_CPPFLAGS"
3679 LDFLAGS="$SAVE_LDFLAGS"
3681 if test "x$with_libupsclient" = "xyes"
3683 SAVE_CPPFLAGS="$CPPFLAGS"
3684 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3686 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
3687 [#include <stdlib.h>
3689 #include <upsclient.h>])
3691 CPPFLAGS="$SAVE_CPPFLAGS"
3693 if test "x$with_libupsclient" = "xyes"
3695 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
3696 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
3697 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
3698 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
3702 # --with-libxmms {{{
3703 with_xmms_config="xmms-config"
3706 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
3708 if test "x$withval" != "xno" \
3709 && test "x$withval" != "xyes"
3711 if test -f "$withval" && test -x "$withval";
3713 with_xmms_config="$withval"
3714 else if test -x "$withval/bin/xmms-config"
3716 with_xmms_config="$withval/bin/xmms-config"
3719 else if test "x$withval" = "xno"
3729 if test "x$with_libxmms" = "xyes"
3731 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
3732 xmms_config_status=$?
3734 if test $xmms_config_status -ne 0
3739 if test "x$with_libxmms" = "xyes"
3741 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
3742 xmms_config_status=$?
3744 if test $xmms_config_status -ne 0
3749 if test "x$with_libxmms" = "xyes"
3751 AC_CHECK_LIB(xmms, xmms_remote_get_info,
3753 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
3754 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
3755 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
3756 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
3763 with_libxmms_numeric=0
3764 if test "x$with_libxmms" = "xyes"
3766 with_libxmms_numeric=1
3768 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
3769 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
3772 # --with-libyajl {{{
3773 with_libyajl_cppflags=""
3774 with_libyajl_ldflags=""
3775 AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
3777 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3779 with_libyajl_cppflags="-I$withval/include"
3780 with_libyajl_ldflags="-L$withval/lib"
3783 with_libyajl="$withval"
3789 if test "x$with_libyajl" = "xyes"
3791 SAVE_CPPFLAGS="$CPPFLAGS"
3792 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3794 AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"])
3796 CPPFLAGS="$SAVE_CPPFLAGS"
3798 if test "x$with_libyajl" = "xyes"
3800 SAVE_CPPFLAGS="$CPPFLAGS"
3801 SAVE_LDFLAGS="$LDFLAGS"
3802 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3803 LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
3805 AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"])
3807 CPPFLAGS="$SAVE_CPPFLAGS"
3808 LDFLAGS="$SAVE_LDFLAGS"
3810 if test "x$with_libyajl" = "xyes"
3812 BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
3813 BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
3814 BUILD_WITH_LIBYAJL_LIBS="-lyajl"
3815 AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS)
3816 AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS)
3817 AC_SUBST(BUILD_WITH_LIBYAJL_LIBS)
3818 AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.])
3820 AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
3823 # --with-libvarnish {{{
3824 with_libvarnish_cppflags=""
3825 with_libvarnish_cflags=""
3826 with_libvarnish_libs=""
3827 AC_ARG_WITH(libvarnish, [AS_HELP_STRING([--with-libvarnish@<:@=PREFIX@:>@], [Path to libvarnish.])],
3829 if test "x$withval" = "xno"
3831 with_libvarnish="no"
3832 else if test "x$withval" = "xyes"
3834 with_libvarnish="use_pkgconfig"
3835 else if test -d "$with_libvarnish/lib"
3837 AC_MSG_NOTICE([Not checking for libvarnish: Manually configured])
3838 with_libvarnish_cflags="-I$withval/include"
3839 with_libvarnish_libs="-L$withval/lib -lvarnish -lvarnishcompat -lvarnishapi"
3840 with_libvarnish="yes"
3843 [with_libvarnish="use_pkgconfig"])
3845 # configure using pkg-config
3846 if test "x$with_libvarnish" = "xuse_pkgconfig"
3848 if test "x$PKG_CONFIG" = "x"
3850 with_libvarnish="no (Don't have pkg-config)"
3853 if test "x$with_libvarnish" = "xuse_pkgconfig"
3855 AC_MSG_NOTICE([Checking for varnishapi using $PKG_CONFIG])
3856 $PKG_CONFIG --exists 'varnishapi' 2>/dev/null
3859 with_libvarnish="no (pkg-config doesn't know library)"
3862 if test "x$with_libvarnish" = "xuse_pkgconfig"
3864 with_libvarnish_cflags="`$PKG_CONFIG --cflags 'varnishapi'`"
3867 with_libvarnish="no ($PKG_CONFIG failed)"
3869 with_libvarnish_libs="`$PKG_CONFIG --libs 'varnishapi'`"
3872 with_libvarnish="no ($PKG_CONFIG failed)"
3875 if test "x$with_libvarnish" = "xuse_pkgconfig"
3877 with_libvarnish="yes"
3880 # with_libvarnish_cflags and with_libvarnish_libs are set up now, let's do
3881 # the actual checks.
3882 if test "x$with_libvarnish" = "xyes"
3884 SAVE_CPPFLAGS="$CPPFLAGS"
3885 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
3886 AC_CHECK_HEADERS(varnish/varnishapi.h, [], [with_libvarnish="no (varnish/varnishapi.h not found)"])
3888 CPPFLAGS="$SAVE_CPPFLAGS"
3890 if test "x$with_libvarnish" = "xyes"
3892 SAVE_CPPFLAGS="$CPPFLAGS"
3893 #SAVE_LDFLAGS="$LDFLAGS"
3895 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
3896 #LDFLAGS="$LDFLAGS $with_libvarnish_libs"
3898 AC_CHECK_LIB(varnishapi, VSL_OpenStats,
3899 [with_libvarnish="yes"],
3900 [with_libvarnish="no (symbol VSL_OpenStats not found)"],
3901 [$with_libvarnish_libs])
3903 CPPFLAGS="$SAVE_CPPFLAGS"
3904 #LDFLAGS="$SAVE_LDFLAGS"
3906 if test "x$with_libvarnish" = "xyes"
3908 BUILD_WITH_LIBVARNISH_CFLAGS="$with_libvarnish_cflags"
3909 BUILD_WITH_LIBVARNISH_LIBS="$with_libvarnish_libs"
3910 AC_SUBST(BUILD_WITH_LIBVARNISH_CFLAGS)
3911 AC_SUBST(BUILD_WITH_LIBVARNISH_LIBS)
3915 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
3916 with_libxml2="no (pkg-config isn't available)"
3917 with_libxml2_cflags=""
3918 with_libxml2_ldflags=""
3919 with_libvirt="no (pkg-config isn't available)"
3920 with_libvirt_cflags=""
3921 with_libvirt_ldflags=""
3922 if test "x$PKG_CONFIG" != "x"
3924 pkg-config --exists 'libxml-2.0' 2>/dev/null
3929 with_libxml2="no (pkg-config doesn't know library)"
3932 pkg-config --exists libvirt 2>/dev/null
3937 with_libvirt="no (pkg-config doesn't know library)"
3940 if test "x$with_libxml2" = "xyes"
3942 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
3947 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
3953 if test "x$with_libxml2" = "xyes"
3955 SAVE_CPPFLAGS="$CPPFLAGS"
3956 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
3958 AC_CHECK_HEADERS(libxml/parser.h, [],
3959 [with_libxml2="no (libxml/parser.h not found)"])
3961 CPPFLAGS="$SAVE_CPPFLAGS"
3963 if test "x$with_libxml2" = "xyes"
3965 SAVE_CFLAGS="$CFLAGS"
3966 SAVE_LDFLAGS="$LDFLAGS"
3968 CFLAGS="$CFLAGS $with_libxml2_cflags"
3969 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
3971 AC_CHECK_LIB(xml2, xmlXPathEval,
3972 [with_libxml2="yes"],
3973 [with_libxml2="no (symbol xmlXPathEval not found)"])
3975 CFLAGS="$SAVE_CFLAGS"
3976 LDFLAGS="$SAVE_LDFLAGS"
3978 dnl Add the right compiler flags and libraries.
3979 if test "x$with_libxml2" = "xyes"; then
3980 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
3981 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
3982 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
3983 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
3985 if test "x$with_libvirt" = "xyes"
3987 with_libvirt_cflags="`pkg-config --cflags libvirt`"
3992 with_libvirt_ldflags="`pkg-config --libs libvirt`"
3998 if test "x$with_libvirt" = "xyes"
4000 SAVE_CPPFLAGS="$CPPFLAGS"
4001 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
4003 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
4004 [with_libvirt="no (libvirt/libvirt.h not found)"])
4006 CPPFLAGS="$SAVE_CPPFLAGS"
4008 if test "x$with_libvirt" = "xyes"
4010 SAVE_CFLAGS="$CFLAGS"
4011 SAVE_LDFLAGS="$LDFLAGS"
4013 CFLAGS="$CFLAGS $with_libvirt_cflags"
4014 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
4016 AC_CHECK_LIB(virt, virDomainBlockStats,
4017 [with_libvirt="yes"],
4018 [with_libvirt="no (symbol virDomainBlockStats not found)"])
4020 CFLAGS="$SAVE_CFLAGS"
4021 LDFLAGS="$SAVE_LDFLAGS"
4023 dnl Add the right compiler flags and libraries.
4024 if test "x$with_libvirt" = "xyes"; then
4025 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
4026 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
4027 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
4028 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
4032 # $PKG_CONFIG --exists OpenIPMIpthread {{{
4033 with_libopenipmipthread="yes"
4034 with_libopenipmipthread_cflags=""
4035 with_libopenipmipthread_libs=""
4037 AC_MSG_CHECKING([for pkg-config])
4039 if test "x$PKG_CONFIG" = "x"
4041 with_libopenipmipthread="no"
4044 temp_result="$PKG_CONFIG"
4046 AC_MSG_RESULT([$temp_result])
4048 if test "x$with_libopenipmipthread" = "xyes"
4050 AC_MSG_CHECKING([for libOpenIPMIpthread])
4051 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
4054 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
4056 AC_MSG_RESULT([$with_libopenipmipthread])
4059 if test "x$with_libopenipmipthread" = "xyes"
4061 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
4062 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
4065 with_libopenipmipthread_cflags="$temp_result"
4067 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
4068 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
4070 AC_MSG_RESULT([$temp_result])
4073 if test "x$with_libopenipmipthread" = "xyes"
4075 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
4076 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
4079 with_libopenipmipthread_ldflags="$temp_result"
4081 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
4082 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
4084 AC_MSG_RESULT([$temp_result])
4087 if test "x$with_libopenipmipthread" = "xyes"
4089 SAVE_CPPFLAGS="$CPPFLAGS"
4090 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
4092 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
4093 [with_libopenipmipthread="yes"],
4094 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
4095 [#include <OpenIPMI/ipmiif.h>
4096 #include <OpenIPMI/ipmi_err.h>
4097 #include <OpenIPMI/ipmi_posix.h>
4098 #include <OpenIPMI/ipmi_conn.h>
4101 CPPFLAGS="$SAVE_CPPFLAGS"
4104 if test "x$with_libopenipmipthread" = "xyes"
4106 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
4107 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
4108 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
4109 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
4113 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
4114 [with_libnotify="yes"],
4115 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
4117 # Check for enabled/disabled features
4120 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
4121 # ------------------------------------------------------------
4123 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
4128 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
4133 m4_define([EnDis],[disabled])dnl
4134 m4_define([YesNo],[no])dnl
4140 m4_define([EnDis],[enabled])dnl
4141 m4_define([YesNo],[yes])dnl
4144 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
4148 m4_if([$3], [feature], [],
4152 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
4158 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
4160 enable_$1='[YesNo]'dnl
4162 if test "x$enable_$1" = "xno"
4166 if test "x$enable_$1" = "xyes"
4170 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
4175 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
4176 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
4178 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
4180 # AC_PLUGIN(name, default, info)
4181 # ------------------------------------------------------------
4188 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
4190 if test "x$enableval" = "xyes"
4193 else if test "x$enableval" = "xforce"
4198 enable_plugin="no (disabled on command line)"
4202 if test "x$enable_all_plugins" = "xauto"
4204 if test "x$2" = "xyes"
4211 enable_plugin="$enable_all_plugins"
4214 if test "x$enable_plugin" = "xyes"
4216 if test "x$2" = "xyes" || test "x$force" = "xyes"
4218 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
4219 if test "x$2" != "xyes"
4221 dependency_warning="yes"
4223 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
4224 dependency_error="yes"
4225 enable_plugin="no (dependency error)"
4228 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
4229 enable_$1="$enable_plugin"
4231 )# AC_PLUGIN(name, default, info)
4233 m4_divert_once([HELP_ENABLE], [
4234 collectd features:])
4235 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
4236 AC_COLLECTD([debug], [enable], [feature], [debugging])
4237 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
4238 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
4240 dependency_warning="no"
4241 dependency_error="no"
4246 plugin_conntrack="no"
4247 plugin_contextswitch="no"
4250 plugin_curl_json="no"
4251 plugin_curl_xml="no"
4255 plugin_interface="no"
4262 plugin_multimeter="no"
4266 plugin_processes="no"
4267 plugin_protocols="no"
4271 plugin_tcpconns="no"
4278 plugin_wireless="no"
4282 if test "x$ac_system" = "xLinux"
4284 plugin_battery="yes"
4285 plugin_conntrack="yes"
4286 plugin_contextswitch="yes"
4288 plugin_cpufreq="yes"
4290 plugin_entropy="yes"
4291 plugin_interface="yes"
4296 plugin_fscache="yes"
4297 plugin_processes="yes"
4298 plugin_protocols="yes"
4301 plugin_tcpconns="yes"
4302 plugin_thermal="yes"
4305 plugin_vserver="yes"
4306 plugin_wireless="yes"
4308 if test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"
4314 if test "x$ac_system" = "xOpenBSD"
4316 plugin_tcpconns="yes"
4320 if test "x$with_libiokit" = "xyes"
4322 plugin_battery="yes"
4327 if test "x$with_perfstat" = "xyes"
4333 plugin_interface="yes"
4337 if test "x$with_procinfo" = "xyes"
4339 plugin_processes="yes"
4343 if test "x$with_kstat" = "xyes"
4346 plugin_zfs_arc="yes"
4349 if test "x$with_devinfo$with_kstat" = "xyesyes"
4353 plugin_interface="yes"
4358 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
4364 if test "x$with_libstatgrab" = "xyes"
4368 plugin_interface="yes"
4375 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
4381 if test "x$with_libopenipmipthread" = "xyes"
4386 if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"
4388 plugin_curl_json="yes"
4391 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
4393 plugin_curl_xml="yes"
4396 if test "x$have_processor_info" = "xyes"
4400 if test "x$have_sysctl" = "xyes"
4407 if test "x$have_sysctlbyname" = "xyes"
4409 plugin_contextswitch="yes"
4412 plugin_tcpconns="yes"
4415 # Df plugin: Check if we know how to determine mount points first.
4416 #if test "x$have_listmntent" = "xyes"; then
4419 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
4423 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
4427 #if test "x$have_getmntent" = "xseq"
4431 if test "x$c_cv_have_one_getmntent" = "xyes"
4436 # Df plugin: Check if we have either `statfs' or `statvfs' second.
4437 if test "x$plugin_df" = "xyes"
4440 if test "x$have_statfs" = "xyes"
4444 if test "x$have_statvfs" = "xyes"
4450 if test "x$have_getifaddrs" = "xyes"
4452 plugin_interface="yes"
4455 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
4457 plugin_libvirt="yes"
4460 if test "x$have_getloadavg" = "xyes"
4465 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
4470 # Mac OS X memory interface
4471 if test "x$have_host_statistics" = "xyes"
4476 if test "x$have_termios_h" = "xyes"
4478 plugin_multimeter="yes"
4482 if test "x$have_thread_info" = "xyes"
4484 plugin_processes="yes"
4487 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
4489 plugin_processes="yes"
4492 if test "x$with_kvm_getswapinfo" = "xyes"
4497 if test "x$have_swapctl" = "xyes"
4502 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
4504 plugin_tcpconns="yes"
4507 if test "x$have_getutent" = "xyes"
4511 if test "x$have_getutxent" = "xyes"
4516 m4_divert_once([HELP_ENABLE], [
4519 AC_ARG_ENABLE([all-plugins],
4520 AC_HELP_STRING([--enable-all-plugins],
4521 [enable all plugins (auto by def)]),
4523 if test "x$enableval" = "xyes"
4525 enable_all_plugins="yes"
4526 else if test "x$enableval" = "xauto"
4528 enable_all_plugins="auto"
4530 enable_all_plugins="no"
4533 [enable_all_plugins="auto"])
4535 m4_divert_once([HELP_ENABLE], [])
4537 AC_PLUGIN([amqp], [$with_librabbitmq], [AMQP output plugin])
4538 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
4539 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
4540 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
4541 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
4542 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
4543 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
4544 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
4545 AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
4546 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
4547 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
4548 AC_PLUGIN([csv], [yes], [CSV output plugin])
4549 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
4550 AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics])
4551 AC_PLUGIN([curl_xml], [$plugin_curl_xml], [CURL generic xml statistics])
4552 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
4553 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
4554 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
4555 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
4556 AC_PLUGIN([email], [yes], [EMail statistics])
4557 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
4558 AC_PLUGIN([exec], [yes], [Execution of external programs])
4559 AC_PLUGIN([filecount], [yes], [Count files in directories])
4560 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
4561 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
4562 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
4563 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
4564 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
4565 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
4566 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
4567 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
4568 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
4569 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
4570 AC_PLUGIN([load], [$plugin_load], [System load])
4571 AC_PLUGIN([logfile], [yes], [File logging plugin])
4572 AC_PLUGIN([lpar], [$with_perfstat], [AIX logical partitions statistics])
4573 AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
4574 AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
4575 AC_PLUGIN([match_hashed], [yes], [The hashed match])
4576 AC_PLUGIN([match_regex], [yes], [The regex match])
4577 AC_PLUGIN([match_timediff], [yes], [The timediff match])
4578 AC_PLUGIN([match_value], [yes], [The value match])
4579 AC_PLUGIN([mbmon], [yes], [Query mbmond])
4580 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
4581 AC_PLUGIN([memcached], [yes], [memcached statistics])
4582 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
4583 AC_PLUGIN([modbus], [$with_libmodbus], [Modbus plugin])
4584 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
4585 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
4586 AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
4587 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
4588 AC_PLUGIN([network], [yes], [Network communication plugin])
4589 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
4590 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
4591 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
4592 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
4593 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
4594 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
4595 AC_PLUGIN([olsrd], [yes], [olsrd statistics])
4596 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
4597 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
4598 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
4599 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
4600 # FIXME: Check for libevent, too.
4601 AC_PLUGIN([pinba], [$have_protoc_c], [Pinba statistics])
4602 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
4603 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
4604 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
4605 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
4606 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
4607 AC_PLUGIN([python], [$with_python], [Embed a Python interpreter])
4608 AC_PLUGIN([redis], [$with_libcredis], [Redis plugin])
4609 AC_PLUGIN([routeros], [$with_librouteros], [RouterOS plugin])
4610 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
4611 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
4612 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
4613 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
4614 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
4615 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
4616 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
4617 AC_PLUGIN([table], [yes], [Parsing of tabular data])
4618 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
4619 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
4620 AC_PLUGIN([target_notification], [yes], [The notification target])
4621 AC_PLUGIN([target_replace], [yes], [The replace target])
4622 AC_PLUGIN([target_scale],[yes], [The scale target])
4623 AC_PLUGIN([target_set], [yes], [The set target])
4624 AC_PLUGIN([target_v5upgrade], [yes], [The v5upgrade target])
4625 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
4626 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
4627 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
4628 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
4629 AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics])
4630 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
4631 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
4632 AC_PLUGIN([users], [$plugin_users], [User statistics])
4633 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
4634 AC_PLUGIN([varnish], [$with_libvarnish], [Varnish cache statistics])
4635 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
4636 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
4637 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
4638 AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
4639 AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin])
4640 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
4641 AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
4643 dnl Default configuration file
4644 # Load either syslog or logfile
4645 LOAD_PLUGIN_SYSLOG=""
4646 LOAD_PLUGIN_LOGFILE=""
4648 AC_MSG_CHECKING([which default log plugin to load])
4649 default_log_plugin="none"
4650 if test "x$enable_syslog" = "xyes"
4652 default_log_plugin="syslog"
4654 LOAD_PLUGIN_SYSLOG="##"
4657 if test "x$enable_logfile" = "xyes"
4659 if test "x$default_log_plugin" = "xnone"
4661 default_log_plugin="logfile"
4663 LOAD_PLUGIN_LOGFILE="#"
4666 LOAD_PLUGIN_LOGFILE="##"
4668 AC_MSG_RESULT([$default_log_plugin])
4670 AC_SUBST(LOAD_PLUGIN_SYSLOG)
4671 AC_SUBST(LOAD_PLUGIN_LOGFILE)
4673 DEFAULT_LOG_LEVEL="info"
4674 if test "x$enable_debug" = "xyes"
4676 DEFAULT_LOG_LEVEL="debug"
4678 AC_SUBST(DEFAULT_LOG_LEVEL)
4680 # Load only one of rrdtool, network, csv in the default config.
4681 LOAD_PLUGIN_RRDTOOL=""
4682 LOAD_PLUGIN_NETWORK=""
4685 AC_MSG_CHECKING([which default write plugin to load])
4686 default_write_plugin="none"
4687 if test "x$enable_rrdtool" = "xyes"
4689 default_write_plugin="rrdtool"
4691 LOAD_PLUGIN_RRDTOOL="##"
4694 if test "x$enable_network" = "xyes"
4696 if test "x$default_write_plugin" = "xnone"
4698 default_write_plugin="network"
4700 LOAD_PLUGIN_NETWORK="#"
4703 LOAD_PLUGIN_NETWORK="##"
4706 if test "x$enable_csv" = "xyes"
4708 if test "x$default_write_plugin" = "xnone"
4710 default_write_plugin="csv"
4715 LOAD_PLUGIN_CSV="##"
4717 AC_MSG_RESULT([$default_write_plugin])
4719 AC_SUBST(LOAD_PLUGIN_RRDTOOL)
4720 AC_SUBST(LOAD_PLUGIN_NETWORK)
4721 AC_SUBST(LOAD_PLUGIN_CSV)
4724 if test "x$ac_system" = "xLinux" \
4725 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
4727 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
4731 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
4733 if test "x$withval" != "xno" && test "x$withval" != "xyes"
4735 PERL_BINDINGS_OPTIONS="$withval"
4736 with_perl_bindings="yes"
4738 PERL_BINDINGS_OPTIONS=""
4739 with_perl_bindings="$withval"
4743 PERL_BINDINGS_OPTIONS=""
4744 if test -n "$perl_interpreter"
4746 with_perl_bindings="yes"
4748 with_perl_bindings="no (no perl interpreter found)"
4751 if test "x$with_perl_bindings" = "xyes"
4753 PERL_BINDINGS="perl"
4757 AC_SUBST(PERL_BINDINGS)
4758 AC_SUBST(PERL_BINDINGS_OPTIONS)
4760 dnl libcollectdclient
4761 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
4762 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
4763 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
4765 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
4767 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
4769 AC_SUBST(LCC_VERSION_MAJOR)
4770 AC_SUBST(LCC_VERSION_MINOR)
4771 AC_SUBST(LCC_VERSION_PATCH)
4772 AC_SUBST(LCC_VERSION_EXTRA)
4773 AC_SUBST(LCC_VERSION_STRING)
4775 AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
4777 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)
4779 if test "x$with_librrd" = "xyes" \
4780 && test "x$librrd_threadsafe" != "xyes"
4782 with_librrd="yes (warning: librrd is not thread-safe)"
4785 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
4787 with_libiptc="yes (shipped version)"
4790 if test "x$with_libperl" = "xyes"
4792 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
4794 enable_perl="no (needs libperl)"
4797 if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"
4799 enable_perl="no (libperl doesn't support ithreads)"
4802 if test "x$with_perl_bindings" = "xyes" \
4803 && test "x$PERL_BINDINGS_OPTIONS" != "x"
4805 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
4812 libcurl . . . . . . . $with_libcurl
4813 libdbi . . . . . . . $with_libdbi
4814 libcredis . . . . . . $with_libcredis
4815 libesmtp . . . . . . $with_libesmtp
4816 libganglia . . . . . $with_libganglia
4817 libgcrypt . . . . . . $with_libgcrypt
4818 libiokit . . . . . . $with_libiokit
4819 libiptc . . . . . . . $with_libiptc
4820 libjvm . . . . . . . $with_java
4821 libkstat . . . . . . $with_kstat
4822 libkvm . . . . . . . $with_libkvm
4823 libmemcached . . . . $with_libmemcached
4824 libmodbus . . . . . . $with_libmodbus
4825 libmysql . . . . . . $with_libmysql
4826 libnetapp . . . . . . $with_libnetapp
4827 libnetlink . . . . . $with_libnetlink
4828 libnetsnmp . . . . . $with_libnetsnmp
4829 libnotify . . . . . . $with_libnotify
4830 liboconfig . . . . . $with_liboconfig
4831 libopenipmi . . . . . $with_libopenipmipthread
4832 liboping . . . . . . $with_liboping
4833 libpcap . . . . . . . $with_libpcap
4834 libperfstat . . . . . $with_perfstat
4835 libperl . . . . . . . $with_libperl
4836 libpq . . . . . . . . $with_libpq
4837 libpthread . . . . . $with_libpthread
4838 librabbitmq . . . . . $with_librabbitmq
4839 librouteros . . . . . $with_librouteros
4840 librrd . . . . . . . $with_librrd
4841 libsensors . . . . . $with_libsensors
4842 libstatgrab . . . . . $with_libstatgrab
4843 libtokyotyrant . . . $with_libtokyotyrant
4844 libupsclient . . . . $with_libupsclient
4845 libvarnish . . . . . $with_libvarnish
4846 libvirt . . . . . . . $with_libvirt
4847 libxml2 . . . . . . . $with_libxml2
4848 libxmms . . . . . . . $with_libxmms
4849 libyajl . . . . . . . $with_libyajl
4850 libevent . . . . . . $with_libevent
4851 protobuf-c . . . . . $have_protoc_c
4852 oracle . . . . . . . $with_oracle
4853 python . . . . . . . $with_python
4856 daemon mode . . . . . $enable_daemon
4857 debug . . . . . . . . $enable_debug
4860 perl . . . . . . . . $with_perl_bindings
4863 amqp . . . . . . . $enable_amqp
4864 apache . . . . . . . $enable_apache
4865 apcups . . . . . . . $enable_apcups
4866 apple_sensors . . . . $enable_apple_sensors
4867 ascent . . . . . . . $enable_ascent
4868 battery . . . . . . . $enable_battery
4869 bind . . . . . . . . $enable_bind
4870 conntrack . . . . . . $enable_conntrack
4871 contextswitch . . . . $enable_contextswitch
4872 cpu . . . . . . . . . $enable_cpu
4873 cpufreq . . . . . . . $enable_cpufreq
4874 csv . . . . . . . . . $enable_csv
4875 curl . . . . . . . . $enable_curl
4876 curl_json . . . . . . $enable_curl_json
4877 curl_xml . . . . . . $enable_curl_xml
4878 dbi . . . . . . . . . $enable_dbi
4879 df . . . . . . . . . $enable_df
4880 disk . . . . . . . . $enable_disk
4881 dns . . . . . . . . . $enable_dns
4882 email . . . . . . . . $enable_email
4883 entropy . . . . . . . $enable_entropy
4884 exec . . . . . . . . $enable_exec
4885 filecount . . . . . . $enable_filecount
4886 fscache . . . . . . . $enable_fscache
4887 gmond . . . . . . . . $enable_gmond
4888 hddtemp . . . . . . . $enable_hddtemp
4889 interface . . . . . . $enable_interface
4890 ipmi . . . . . . . . $enable_ipmi
4891 iptables . . . . . . $enable_iptables
4892 ipvs . . . . . . . . $enable_ipvs
4893 irq . . . . . . . . . $enable_irq
4894 java . . . . . . . . $enable_java
4895 libvirt . . . . . . . $enable_libvirt
4896 load . . . . . . . . $enable_load
4897 logfile . . . . . . . $enable_logfile
4898 lpar... . . . . . . . $enable_lpar
4899 madwifi . . . . . . . $enable_madwifi
4900 match_empty_counter . $enable_match_empty_counter
4901 match_hashed . . . . $enable_match_hashed
4902 match_regex . . . . . $enable_match_regex
4903 match_timediff . . . $enable_match_timediff
4904 match_value . . . . . $enable_match_value
4905 mbmon . . . . . . . . $enable_mbmon
4906 memcachec . . . . . . $enable_memcachec
4907 memcached . . . . . . $enable_memcached
4908 memory . . . . . . . $enable_memory
4909 modbus . . . . . . . $enable_modbus
4910 multimeter . . . . . $enable_multimeter
4911 mysql . . . . . . . . $enable_mysql
4912 netapp . . . . . . . $enable_netapp
4913 netlink . . . . . . . $enable_netlink
4914 network . . . . . . . $enable_network
4915 nfs . . . . . . . . . $enable_nfs
4916 nginx . . . . . . . . $enable_nginx
4917 notify_desktop . . . $enable_notify_desktop
4918 notify_email . . . . $enable_notify_email
4919 ntpd . . . . . . . . $enable_ntpd
4920 nut . . . . . . . . . $enable_nut
4921 olsrd . . . . . . . . $enable_olsrd
4922 onewire . . . . . . . $enable_onewire
4923 openvpn . . . . . . . $enable_openvpn
4924 oracle . . . . . . . $enable_oracle
4925 perl . . . . . . . . $enable_perl
4926 pinba . . . . . . . . $enable_pinba
4927 ping . . . . . . . . $enable_ping
4928 postgresql . . . . . $enable_postgresql
4929 powerdns . . . . . . $enable_powerdns
4930 processes . . . . . . $enable_processes
4931 protocols . . . . . . $enable_protocols
4932 python . . . . . . . $enable_python
4933 redis . . . . . . . . $enable_redis
4934 routeros . . . . . . $enable_routeros
4935 rrdcached . . . . . . $enable_rrdcached
4936 rrdtool . . . . . . . $enable_rrdtool
4937 sensors . . . . . . . $enable_sensors
4938 serial . . . . . . . $enable_serial
4939 snmp . . . . . . . . $enable_snmp
4940 swap . . . . . . . . $enable_swap
4941 syslog . . . . . . . $enable_syslog
4942 table . . . . . . . . $enable_table
4943 tail . . . . . . . . $enable_tail
4944 tape . . . . . . . . $enable_tape
4945 target_notification . $enable_target_notification
4946 target_replace . . . $enable_target_replace
4947 target_scale . . . . $enable_target_scale
4948 target_set . . . . . $enable_target_set
4949 target_v5upgrade . . $enable_target_v5upgrade
4950 tcpconns . . . . . . $enable_tcpconns
4951 teamspeak2 . . . . . $enable_teamspeak2
4952 ted . . . . . . . . . $enable_ted
4953 thermal . . . . . . . $enable_thermal
4954 tokyotyrant . . . . . $enable_tokyotyrant
4955 unixsock . . . . . . $enable_unixsock
4956 uptime . . . . . . . $enable_uptime
4957 users . . . . . . . . $enable_users
4958 uuid . . . . . . . . $enable_uuid
4959 varnish . . . . . . . $enable_varnish
4960 vmem . . . . . . . . $enable_vmem
4961 vserver . . . . . . . $enable_vserver
4962 wireless . . . . . . $enable_wireless
4963 write_http . . . . . $enable_write_http
4964 write_redis . . . . . $enable_write_redis
4965 xmms . . . . . . . . $enable_xmms
4966 zfs_arc . . . . . . . $enable_zfs_arc
4970 if test "x$dependency_error" = "xyes"; then
4971 AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
4974 if test "x$dependency_warning" = "xyes"; then
4975 AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
4978 # vim: set fdm=marker :