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.])
95 # Where to install .pc files.
96 pkgconfigdir="${libdir}/pkgconfig"
97 AC_SUBST(pkgconfigdir)
99 # Check for standards compliance mode
100 AC_ARG_ENABLE(standards,
101 AS_HELP_STRING([--enable-standards], [Enable standards compliance mode]),
102 [enable_standards="$enableval"],
103 [enable_standards="no"])
104 if test "x$enable_standards" = "xyes"
106 AC_DEFINE(_ISOC99_SOURCE, 1, [Define to enforce ISO C99 compliance.])
107 AC_DEFINE(_POSIX_C_SOURCE, 200809L, [Define to enforce POSIX.1-2008 compliance.])
108 AC_DEFINE(_XOPEN_SOURCE, 700, [Define to enforce X/Open 7 (XSI) compliance.])
109 AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.])
110 if test "x$GCC" = "xyes"
112 CFLAGS="$CFLAGS -std=c99"
115 AM_CONDITIONAL(BUILD_FEATURE_STANDARDS, test "x$enable_standards" = "xyes")
118 # Checks for header files.
125 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)
128 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
133 # include <sys/types.h>
136 AC_CHECK_HEADERS(netinet/in.h, [], [],
141 # include <sys/types.h>
143 #if HAVE_NETINET_IN_SYSTM_H
144 # include <netinet/in_systm.h>
147 AC_CHECK_HEADERS(netinet/ip.h, [], [],
152 # include <sys/types.h>
154 #if HAVE_NETINET_IN_SYSTM_H
155 # include <netinet/in_systm.h>
157 #if HAVE_NETINET_IN_H
158 # include <netinet/in.h>
161 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
166 # include <sys/types.h>
168 #if HAVE_NETINET_IN_SYSTM_H
169 # include <netinet/in_systm.h>
171 #if HAVE_NETINET_IN_H
172 # include <netinet/in.h>
174 #if HAVE_NETINET_IP_H
175 # include <netinet/ip.h>
178 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
183 # include <sys/types.h>
185 #if HAVE_NETINET_IN_SYSTM_H
186 # include <netinet/in_systm.h>
188 #if HAVE_NETINET_IN_H
189 # include <netinet/in.h>
191 #if HAVE_NETINET_IP_H
192 # include <netinet/ip.h>
195 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
200 # include <sys/types.h>
202 #if HAVE_NETINET_IN_SYSTM_H
203 # include <netinet/in_systm.h>
205 #if HAVE_NETINET_IN_H
206 # include <netinet/in.h>
209 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
214 # include <sys/types.h>
216 #if HAVE_NETINET_IN_SYSTM_H
217 # include <netinet/in_systm.h>
219 #if HAVE_NETINET_IN_H
220 # include <netinet/in.h>
222 #if HAVE_NETINET_IP6_H
223 # include <netinet/ip6.h>
226 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
231 # include <sys/types.h>
233 #if HAVE_NETINET_IN_SYSTM_H
234 # include <netinet/in_systm.h>
236 #if HAVE_NETINET_IN_H
237 # include <netinet/in.h>
239 #if HAVE_NETINET_IP_H
240 # include <netinet/ip.h>
243 AC_CHECK_HEADERS(netinet/udp.h, [], [],
248 # include <sys/types.h>
250 #if HAVE_NETINET_IN_SYSTM_H
251 # include <netinet/in_systm.h>
253 #if HAVE_NETINET_IN_H
254 # include <netinet/in.h>
256 #if HAVE_NETINET_IP_H
257 # include <netinet/ip.h>
262 AC_CHECK_HEADERS(sys/dkstat.h)
263 if test "x$ac_system" = "xDarwin"
265 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)
266 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
268 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
271 # include <sys/types.h>
274 # include <sys/param.h>
278 AC_MSG_CHECKING([for sysctl kern.cp_times])
279 if test -x /sbin/sysctl
281 /sbin/sysctl kern.cp_times 2>/dev/null
285 AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIMES, 1,
286 [Define if sysctl supports kern.cp_times])
295 AC_CHECK_HEADERS(linux/major.h libgen.h)
297 # For the battery plugin
298 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
300 #if HAVE_IOKIT_IOKITLIB_H
301 # include <IOKit/IOKitLib.h>
303 #if HAVE_IOKIT_IOTYPES_H
304 # include <IOKit/IOTypes.h>
308 # For the swap module
309 have_linux_wireless_h="no"
310 if test "x$ac_system" = "xLinux"
312 AC_CHECK_HEADERS(linux/wireless.h,
313 [have_linux_wireless_h="yes"],
314 [have_linux_wireless_h="no"],
317 #include <sys/ioctl.h>
318 #include <sys/socket.h>
322 # For the swap module
323 have_sys_swap_h="yes"
324 AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
326 #undef _FILE_OFFSET_BITS
327 #undef _LARGEFILE64_SOURCE
329 # include <sys/types.h>
332 # include <sys/param.h>
336 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
339 if test "x$GCC" = "xyes"
341 hint_64="CFLAGS='-m64'"
343 hint_64="CFLAGS='-xarch=v9'"
345 AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
349 # For the processes plugin
351 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
353 # For interface plugin
354 AC_CHECK_HEADERS(ifaddrs.h)
355 AC_CHECK_HEADERS(net/if.h, [], [],
358 # include <sys/types.h>
360 #if HAVE_SYS_SOCKET_H
361 # include <sys/socket.h>
364 AC_CHECK_HEADERS(linux/if.h, [], [],
367 # include <sys/types.h>
369 #if HAVE_SYS_SOCKET_H
370 # include <sys/socket.h>
373 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
376 # include <sys/types.h>
378 #if HAVE_SYS_SOCKET_H
379 # include <sys/socket.h>
382 # include <linux/if.h>
387 have_net_ip_vs_h="no"
389 if test "x$ac_system" = "xLinux"
391 SAVE_CFLAGS="$CFLAGS"
392 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
394 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
395 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
397 CFLAGS="$SAVE_CFLAGS"
401 AC_CHECK_HEADERS(sys/ucred.h, [], [],
404 # include <sys/types.h>
407 # include <sys/param.h>
411 # For mount interface
412 AC_CHECK_HEADERS(sys/mount.h, [], [],
415 # include <sys/types.h>
418 # include <sys/param.h>
422 # For the email plugin
423 AC_CHECK_HEADERS(linux/un.h, [], [],
425 #if HAVE_SYS_SOCKET_H
426 # include <sys/socket.h>
430 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)
433 AC_CHECK_HEADERS(arpa/nameser.h)
434 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
436 #if HAVE_ARPA_NAMESER_H
437 # include <arpa/nameser.h>
441 AC_CHECK_HEADERS(net/if_arp.h, [], [],
442 [#if HAVE_SYS_SOCKET_H
443 # include <sys/socket.h>
446 AC_CHECK_HEADERS(net/ppp_defs.h)
447 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
448 [#if HAVE_NET_PPP_DEFS_H
449 # include <net/ppp_defs.h>
452 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
457 # include <sys/types.h>
459 #if HAVE_SYS_SOCKET_H
460 # include <sys/socket.h>
465 #if HAVE_NETINET_IN_H
466 # include <netinet/in.h>
470 # For the multimeter plugin
472 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
475 # Checks for typedefs, structures, and compiler characteristics.
484 # Checks for library functions.
486 AC_PROG_GCC_TRADITIONAL
487 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname)
491 SAVE_CFLAGS="$CFLAGS"
492 # Emulate behavior of src/Makefile.am
493 if test "x$GCC" = "xyes"
495 CFLAGS="$CFLAGS -Wall -Werror"
498 AC_CACHE_CHECK([for strtok_r],
499 [c_cv_have_strtok_r_default],
508 char buffer[] = "foo,bar,baz";
515 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
518 printf ("token = %s;\n", token);
521 [c_cv_have_strtok_r_default="yes"],
522 [c_cv_have_strtok_r_default="no"]
526 if test "x$c_cv_have_strtok_r_default" = "xno"
528 CFLAGS="$CFLAGS -D_REENTRANT=1"
530 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
531 [c_cv_have_strtok_r_reentrant],
540 char buffer[] = "foo,bar,baz";
547 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
550 printf ("token = %s;\n", token);
553 [c_cv_have_strtok_r_reentrant="yes"],
554 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
559 CFLAGS="$SAVE_CFLAGS"
560 if test "x$c_cv_have_strtok_r_reentrant" = "xyes"
562 CFLAGS="$CFLAGS -D_REENTRANT=1"
565 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
567 socket_needs_socket="no"
568 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
569 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
571 nanosleep_needs_rt="no"
572 nanosleep_needs_posix4="no"
573 AC_CHECK_FUNCS(nanosleep,
575 AC_CHECK_LIB(rt, nanosleep,
576 [nanosleep_needs_rt="yes"],
577 AC_CHECK_LIB(posix4, nanosleep,
578 [nanosleep_needs_posix4="yes"],
579 AC_MSG_ERROR(cannot find nanosleep))))
580 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
581 AM_CONDITIONAL(BUILD_WITH_LIBPOSIX4, test "x$nanosleep_needs_posix4" = "xyes")
583 AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
584 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
585 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
586 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
587 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
588 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
589 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
590 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
591 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
592 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
593 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
594 AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
595 if test "x$have_swapctl" = "xyes"; then
596 AC_CACHE_CHECK([whether swapctl takes two arguments],
597 [c_cv_have_swapctl_two_args],
599 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
600 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
601 # undef _FILE_OFFSET_BITS
602 # undef _LARGEFILE64_SOURCE
604 #include <sys/stat.h>
605 #include <sys/swap.h>]],
607 int num = swapctl(0, NULL);
610 [c_cv_have_swapctl_two_args="yes"],
611 [c_cv_have_swapctl_two_args="no"]
614 AC_CACHE_CHECK([whether swapctl takes three arguments],
615 [c_cv_have_swapctl_three_args],
617 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
618 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
619 # undef _FILE_OFFSET_BITS
620 # undef _LARGEFILE64_SOURCE
622 #include <sys/stat.h>
623 #include <sys/swap.h>]],
625 int num = swapctl(0, NULL,0);
628 [c_cv_have_swapctl_three_args="yes"],
629 [c_cv_have_swapctl_three_args="no"]
633 # Check for different versions of `swapctl' here..
634 if test "x$have_swapctl" = "xyes"; then
635 if test "x$c_cv_have_swapctl_two_args" = "xyes"; then
636 AC_DEFINE(HAVE_SWAPCTL_TWO_ARGS, 1,
637 [Define if the function swapctl exists and takes two arguments.])
639 if test "x$c_cv_have_swapctl_three_args" = "xyes"; then
640 AC_DEFINE(HAVE_SWAPCTL_THREE_ARGS, 1,
641 [Define if the function swapctl exists and takes three arguments.])
646 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
649 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
651 if test "x$withval" = "xno"; then
653 else if test "x$withval" = "xyes"; then
660 if test "x$nan_type" = "xnone"; then
661 AC_CACHE_CHECK([whether NAN is defined by default],
662 [c_cv_have_nan_default],
668 static float foo = NAN;
676 [c_cv_have_nan_default="yes"],
677 [c_cv_have_nan_default="no"]
680 if test "x$c_cv_have_nan_default" = "xyes"
685 if test "x$nan_type" = "xnone"; then
686 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
687 [c_cv_have_nan_isoc],
692 #define __USE_ISOC99 1
694 static float foo = NAN;
702 [c_cv_have_nan_isoc="yes"],
703 [c_cv_have_nan_isoc="no"]
706 if test "x$c_cv_have_nan_isoc" = "xyes"
711 if test "x$nan_type" = "xnone"; then
712 SAVE_LDFLAGS=$LDFLAGS
713 LDFLAGS="$LDFLAGS -lm"
714 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
715 [c_cv_have_nan_zero],
724 #define NAN (0.0 / 0.0)
726 # define isnan(f) ((f) != (f))
728 static float foo = NAN;
736 [c_cv_have_nan_zero="yes"],
737 [c_cv_have_nan_zero="no"]
740 LDFLAGS=$SAVE_LDFLAGS
741 if test "x$c_cv_have_nan_zero" = "xyes"
747 if test "x$nan_type" = "xdefault"; then
748 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
749 [Define if NAN is defined by default and can initialize static variables.])
750 else if test "x$nan_type" = "xisoc99"; then
751 AC_DEFINE(NAN_STATIC_ISOC, 1,
752 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
753 else if test "x$nan_type" = "xzero"; then
754 AC_DEFINE(NAN_ZERO_ZERO, 1,
755 [Define if NAN can be defined as (0.0 / 0.0)])
757 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
760 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
762 if test "x$withval" = "xnothing"; then
763 fp_layout_type="nothing"
764 else if test "x$withval" = "xendianflip"; then
765 fp_layout_type="endianflip"
766 else if test "x$withval" = "xintswap"; then
767 fp_layout_type="intswap"
769 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
772 [fp_layout_type="unknown"])
774 if test "x$fp_layout_type" = "xunknown"; then
775 AC_CACHE_CHECK([if doubles are stored in x86 representation],
776 [c_cv_fp_layout_need_nothing],
787 # include <inttypes.h>
790 # include <stdbool.h>
800 memcpy ((void *) &i0, (void *) &d, 8);
803 memcpy ((void *) c, (void *) &i1, 8);
805 if ((c[0] == 0x2f) && (c[1] == 0x25)
806 && (c[2] == 0xc0) && (c[3] == 0xc7)
807 && (c[4] == 0x43) && (c[5] == 0x2b)
808 && (c[6] == 0x1f) && (c[7] == 0x5b))
813 [c_cv_fp_layout_need_nothing="yes"],
814 [c_cv_fp_layout_need_nothing="no"]
817 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
818 fp_layout_type="nothing"
821 if test "x$fp_layout_type" = "xunknown"; then
822 AC_CACHE_CHECK([if endianflip converts to x86 representation],
823 [c_cv_fp_layout_need_endianflip],
834 # include <inttypes.h>
837 # include <stdbool.h>
839 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
840 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
841 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
842 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
843 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
844 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
845 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
846 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
855 memcpy ((void *) &i0, (void *) &d, 8);
857 i1 = endianflip (i0);
858 memcpy ((void *) c, (void *) &i1, 8);
860 if ((c[0] == 0x2f) && (c[1] == 0x25)
861 && (c[2] == 0xc0) && (c[3] == 0xc7)
862 && (c[4] == 0x43) && (c[5] == 0x2b)
863 && (c[6] == 0x1f) && (c[7] == 0x5b))
868 [c_cv_fp_layout_need_endianflip="yes"],
869 [c_cv_fp_layout_need_endianflip="no"]
872 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
873 fp_layout_type="endianflip"
876 if test "x$fp_layout_type" = "xunknown"; then
877 AC_CACHE_CHECK([if intswap converts to x86 representation],
878 [c_cv_fp_layout_need_intswap],
889 # include <inttypes.h>
892 # include <stdbool.h>
894 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
895 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
904 memcpy ((void *) &i0, (void *) &d, 8);
907 memcpy ((void *) c, (void *) &i1, 8);
909 if ((c[0] == 0x2f) && (c[1] == 0x25)
910 && (c[2] == 0xc0) && (c[3] == 0xc7)
911 && (c[4] == 0x43) && (c[5] == 0x2b)
912 && (c[6] == 0x1f) && (c[7] == 0x5b))
917 [c_cv_fp_layout_need_intswap="yes"],
918 [c_cv_fp_layout_need_intswap="no"]
921 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
922 fp_layout_type="intswap"
926 if test "x$fp_layout_type" = "xnothing"; then
927 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
928 [Define if doubles are stored in x86 representation.])
929 else if test "x$fp_layout_type" = "xendianflip"; then
930 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
931 [Define if endianflip is needed to convert to x86 representation.])
932 else if test "x$fp_layout_type" = "xintswap"; then
933 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
934 [Define if intswap is needed to convert to x86 representation.])
936 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
940 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
942 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
944 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
947 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
948 if test "x$have_getmntent" = "xno"; then
949 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
951 if test "x$have_getmntent" = "xno"; then
952 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
954 if test "x$have_getmntent" = "xno"; then
955 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
958 if test "x$have_getmntent" = "xc"; then
959 AC_CACHE_CHECK([whether getmntent takes one argument],
960 [c_cv_have_one_getmntent],
962 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
963 #include "$srcdir/src/utils_mount.h"]],
967 fh = setmntent ("/etc/mtab", "r");
971 [c_cv_have_one_getmntent="yes"],
972 [c_cv_have_one_getmntent="no"]
975 AC_CACHE_CHECK([whether getmntent takes two arguments],
976 [c_cv_have_two_getmntent],
978 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
979 #include "$srcdir/src/utils_mount.h"]],
984 fh = fopen ("/etc/mnttab", "r");
985 status = getmntent (fh, &mt);
988 [c_cv_have_two_getmntent="yes"],
989 [c_cv_have_two_getmntent="no"]
994 # Check for different versions of `getmntent' here..
996 if test "x$have_getmntent" = "xc"; then
997 if test "x$c_cv_have_one_getmntent" = "xyes"; then
998 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
999 [Define if the function getmntent exists and takes one argument.])
1001 if test "x$c_cv_have_two_getmntent" = "xyes"; then
1002 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
1003 [Define if the function getmntent exists and takes two arguments.])
1006 if test "x$have_getmntent" = "xsun"; then
1007 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
1008 [Define if the function getmntent exists. It's the version from libsun.])
1010 if test "x$have_getmntent" = "xseq"; then
1011 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
1012 [Define if the function getmntent exists. It's the version from libseq.])
1014 if test "x$have_getmntent" = "xgen"; then
1015 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
1016 [Define if the function getmntent exists. It's the version from libgen.])
1020 AC_MSG_CHECKING([if have htonll defined])
1025 #include <sys/types.h>
1026 #include <netinet/in.h>
1028 # include <inttypes.h>
1035 AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.])
1038 AC_MSG_RESULT([$have_htonll])
1040 # Check for structures
1041 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
1042 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
1045 #include <sys/types.h>
1046 #include <sys/socket.h>
1049 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
1050 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
1053 #include <sys/types.h>
1054 #include <sys/socket.h>
1055 #include <linux/if.h>
1056 #include <linux/netdevice.h>
1059 AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [],
1062 #include <netinet/in.h>
1066 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
1068 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
1069 [Define if struct kinfo_proc exists in the FreeBSD variant.])
1070 have_struct_kinfo_proc_freebsd="yes"
1073 have_struct_kinfo_proc_freebsd="no"
1077 #include <sys/param.h>
1078 #include <sys/sysctl.h>
1079 #include <sys/user.h>
1082 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
1084 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
1085 [Define if struct kinfo_proc exists in the OpenBSD variant.])
1086 have_struct_kinfo_proc_openbsd="yes"
1089 have_struct_kinfo_proc_openbsd="no"
1092 #include <sys/param.h>
1093 #include <sys/sysctl.h>
1097 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
1098 [#define _BSD_SOURCE
1100 # include <stdint.h>
1102 #if HAVE_SYS_TYPES_H
1103 # include <sys/types.h>
1105 #if HAVE_NETINET_IN_SYSTM_H
1106 # include <netinet/in_systm.h>
1108 #if HAVE_NETINET_IN_H
1109 # include <netinet/in.h>
1111 #if HAVE_NETINET_IP_H
1112 # include <netinet/ip.h>
1114 #if HAVE_NETINET_UDP_H
1115 # include <netinet/udp.h>
1118 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
1119 [#define _BSD_SOURCE
1121 # include <stdint.h>
1123 #if HAVE_SYS_TYPES_H
1124 # include <sys/types.h>
1126 #if HAVE_NETINET_IN_SYSTM_H
1127 # include <netinet/in_systm.h>
1129 #if HAVE_NETINET_IN_H
1130 # include <netinet/in.h>
1132 #if HAVE_NETINET_IP_H
1133 # include <netinet/ip.h>
1135 #if HAVE_NETINET_UDP_H
1136 # include <netinet/udp.h>
1140 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
1150 # Checks for libraries begin here
1152 with_libresolv="yes"
1153 AC_CHECK_LIB(resolv, res_search,
1155 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
1157 [with_libresolv="no"])
1158 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
1160 dnl Check for HAL (hardware abstraction library)
1162 AC_CHECK_LIB(hal,libhal_device_property_exists,
1163 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
1165 if test "x$with_libhal" = "xyes"; then
1166 if test "x$PKG_CONFIG" != "x"; then
1167 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
1168 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
1169 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
1170 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
1174 m4_divert_once([HELP_WITH], [
1175 collectd additional packages:])
1177 AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
1179 if test "x$ac_system" = "xAIX"
1184 with_perfstat="no (AIX only)"
1185 with_procinfo="no (AIX only)"
1188 if test "x$with_perfstat" = "xyes"
1190 AC_CHECK_LIB(perfstat, perfstat_reset, [with_perfstat="yes"], [with_perfstat="no (perfstat not found)"], [])
1191 # AC_CHECK_HEADERS(sys/protosw.h libperfstat.h,, [with_perfstat="no (perfstat not found)"])
1193 if test "x$with_perfstat" = "xyes"
1195 AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)])
1197 AM_CONDITIONAL(BUILD_WITH_PERFSTAT, test "x$with_perfstat" = "xyes")
1199 # Processes plugin under AIX.
1200 if test "x$with_procinfo" = "xyes"
1202 AC_CHECK_HEADERS(procinfo.h,, [with_procinfo="no (procinfo.h not found)"])
1204 if test "x$with_procinfo" = "xyes"
1206 AC_DEFINE(HAVE_PROCINFO_H, 1, [Define to 1 if you have the procinfo.h])
1209 if test "x$ac_system" = "xSolaris"
1214 with_kstat="no (Solaris only)"
1215 with_devinfo="no (Solaris only)"
1218 if test "x$with_kstat" = "xyes"
1220 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1222 if test "x$with_kstat" = "xyes"
1224 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1225 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1227 if test "x$with_kstat" = "xyes"
1229 AC_DEFINE(HAVE_LIBKSTAT, 1,
1230 [Define to 1 if you have the 'kstat' library (-lkstat)])
1232 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1233 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1236 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1243 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1246 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1247 if test "x$with_kvm_getprocs" = "xyes"
1249 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1250 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1253 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1255 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1256 if test "x$with_kvm_getswapinfo" = "xyes"
1258 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1259 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1262 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1264 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1265 if test "x$with_kvm_nlist" = "xyes"
1267 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1268 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1271 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1273 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1274 if test "x$with_kvm_openfiles" = "xyes"
1276 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1277 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1280 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1282 # --with-libcredis {{{
1283 AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])],
1285 if test "x$withval" = "xyes"
1287 with_libcredis="yes"
1288 else if test "x$withval" = "xno"
1292 with_libcredis="yes"
1293 LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS -I$withval/include"
1294 LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS -L$withval/lib"
1297 [with_libcredis="yes"])
1299 SAVE_CPPFLAGS="$CPPFLAGS"
1300 SAVE_LDFLAGS="$LDFLAGS"
1302 CPPFLAGS="$CPPFLAGS $LIBCREDIS_CPPFLAGS"
1303 LDFLAGS="$LDFLAGS $LIBCREDIS_LDFLAGS"
1305 if test "x$with_libcredis" = "xyes"
1307 if test "x$LIBCREDIS_CPPFLAGS" != "x"
1309 AC_MSG_NOTICE([libcredis CPPFLAGS: $LIBCREDIS_CPPFLAGS])
1311 AC_CHECK_HEADERS(credis.h,
1312 [with_libcredis="yes"],
1313 [with_libcredis="no ('credis.h' not found)"])
1315 if test "x$with_libcredis" = "xyes"
1317 if test "x$LIBCREDIS_LDFLAGS" != "x"
1319 AC_MSG_NOTICE([libcredis LDFLAGS: $LIBCREDIS_LDFLAGS])
1321 AC_CHECK_LIB(credis, credis_info,
1322 [with_libcredis="yes"],
1323 [with_libcredis="no (symbol 'credis_info' not found)"])
1327 CPPFLAGS="$SAVE_CPPFLAGS"
1328 LDFLAGS="$SAVE_LDFLAGS"
1330 if test "x$with_libcredis" = "xyes"
1332 BUILD_WITH_LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS"
1333 BUILD_WITH_LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS"
1334 AC_SUBST(BUILD_WITH_LIBCREDIS_CPPFLAGS)
1335 AC_SUBST(BUILD_WITH_LIBCREDIS_LDFLAGS)
1337 AM_CONDITIONAL(BUILD_WITH_LIBCREDIS, test "x$with_libcredis" = "xyes")
1340 # --with-libcurl {{{
1341 with_curl_config="curl-config"
1344 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1346 if test "x$withval" = "xno"
1349 else if test "x$withval" = "xyes"
1353 if test -f "$withval" && test -x "$withval"
1355 with_curl_config="$withval"
1357 else if test -x "$withval/bin/curl-config"
1359 with_curl_config="$withval/bin/curl-config"
1368 if test "x$with_libcurl" = "xyes"
1370 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1371 curl_config_status=$?
1373 if test $curl_config_status -ne 0
1375 with_libcurl="no ($with_curl_config failed)"
1377 SAVE_CPPFLAGS="$CPPFLAGS"
1378 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1380 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1382 CPPFLAGS="$SAVE_CPPFLAGS"
1385 if test "x$with_libcurl" = "xyes"
1387 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1388 curl_config_status=$?
1390 if test $curl_config_status -ne 0
1392 with_libcurl="no ($with_curl_config failed)"
1394 AC_CHECK_LIB(curl, curl_easy_init,
1395 [with_libcurl="yes"],
1396 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1400 if test "x$with_libcurl" = "xyes"
1402 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1403 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1404 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1405 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1407 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1411 with_libdbi_cppflags=""
1412 with_libdbi_ldflags=""
1413 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1415 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1417 with_libdbi_cppflags="-I$withval/include"
1418 with_libdbi_ldflags="-L$withval/lib"
1421 with_libdbi="$withval"
1427 if test "x$with_libdbi" = "xyes"
1429 SAVE_CPPFLAGS="$CPPFLAGS"
1430 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1432 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1434 CPPFLAGS="$SAVE_CPPFLAGS"
1436 if test "x$with_libdbi" = "xyes"
1438 SAVE_CPPFLAGS="$CPPFLAGS"
1439 SAVE_LDFLAGS="$LDFLAGS"
1440 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1441 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1443 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1445 CPPFLAGS="$SAVE_CPPFLAGS"
1446 LDFLAGS="$SAVE_LDFLAGS"
1448 if test "x$with_libdbi" = "xyes"
1450 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1451 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1452 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1453 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1454 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1455 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1457 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1460 # --with-libesmtp {{{
1461 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1463 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1465 LDFLAGS="$LDFLAGS -L$withval/lib"
1466 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1469 with_libesmtp="$withval"
1475 if test "x$with_libesmtp" = "xyes"
1477 AC_CHECK_LIB(esmtp, smtp_create_session,
1479 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1480 ], [with_libesmtp="no (libesmtp not found)"])
1482 if test "x$with_libesmtp" = "xyes"
1484 AC_CHECK_HEADERS(libesmtp.h,
1486 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1487 ], [with_libesmtp="no (libesmtp.h not found)"])
1489 if test "x$with_libesmtp" = "xyes"
1495 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1496 [Wether or not to use the esmtp library])
1497 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1500 # --with-libganglia {{{
1501 AC_ARG_WITH(libganglia, [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
1503 if test -f "$withval" && test -x "$withval"
1505 with_libganglia_config="$withval"
1506 with_libganglia="yes"
1507 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"
1509 with_libganglia_config="$withval/bin/ganglia-config"
1510 with_libganglia="yes"
1511 else if test -d "$withval"
1513 GANGLIA_CPPFLAGS="-I$withval/include"
1514 GANGLIA_LDFLAGS="-L$withval/lib"
1515 with_libganglia="yes"
1517 with_libganglia_config="ganglia-config"
1518 with_libganglia="$withval"
1522 with_libganglia_config="ganglia-config"
1523 with_libganglia="yes"
1526 if test "x$with_libganglia" = "xyes" && test "x$with_libganglia_config" != "x"
1528 if test "x$GANGLIA_CPPFLAGS" = "x"
1530 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
1533 if test "x$GANGLIA_LDFLAGS" = "x"
1535 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
1538 if test "x$GANGLIA_LIBS" = "x"
1540 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
1544 SAVE_CPPFLAGS="$CPPFLAGS"
1545 SAVE_LDFLAGS="$LDFLAGS"
1546 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
1547 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
1549 if test "x$with_libganglia" = "xyes"
1551 AC_CHECK_HEADERS(gm_protocol.h,
1553 AC_DEFINE(HAVE_GM_PROTOCOL_H, 1,
1554 [Define to 1 if you have the <gm_protocol.h> header file.])
1555 ], [with_libganglia="no (gm_protocol.h not found)"])
1558 if test "x$with_libganglia" = "xyes"
1560 AC_CHECK_LIB(ganglia, xdr_Ganglia_value_msg,
1562 AC_DEFINE(HAVE_LIBGANGLIA, 1,
1563 [Define to 1 if you have the ganglia library (-lganglia).])
1564 ], [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"])
1567 CPPFLAGS="$SAVE_CPPFLAGS"
1568 LDFLAGS="$SAVE_LDFLAGS"
1570 AC_SUBST(GANGLIA_CPPFLAGS)
1571 AC_SUBST(GANGLIA_LDFLAGS)
1572 AC_SUBST(GANGLIA_LIBS)
1573 AM_CONDITIONAL(BUILD_WITH_LIBGANGLIA, test "x$with_libganglia" = "xyes")
1576 # --with-libgcrypt {{{
1577 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
1578 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
1579 GCRYPT_LIBS="$GCRYPT_LIBS"
1580 AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
1582 if test -f "$withval" && test -x "$withval"
1584 with_libgcrypt_config="$withval"
1585 with_libgcrypt="yes"
1586 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"
1588 with_libgcrypt_config="$withval/bin/gcrypt-config"
1589 with_libgcrypt="yes"
1590 else if test -d "$withval"
1592 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
1593 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
1594 with_libgcrypt="yes"
1596 with_libgcrypt_config="gcrypt-config"
1597 with_libgcrypt="$withval"
1601 with_libgcrypt_config="libgcrypt-config"
1602 with_libgcrypt="yes"
1605 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"
1607 if test "x$GCRYPT_CPPFLAGS" = "x"
1609 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
1612 if test "x$GCRYPT_LDFLAGS" = "x"
1614 gcrypt_exec_prefix=`"$with_libgcrypt_config" --exec-prefix 2>/dev/null`
1615 GCRYPT_LDFLAGS="-L$gcrypt_exec_prefix/lib"
1618 if test "x$GCRYPT_LIBS" = "x"
1620 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
1624 SAVE_CPPFLAGS="$CPPFLAGS"
1625 SAVE_LDFLAGS="$LDFLAGS"
1626 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
1627 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
1629 if test "x$with_libgcrypt" = "xyes"
1631 if test "x$GCRYPT_CPPFLAGS" != "x"
1633 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
1635 AC_CHECK_HEADERS(gcrypt.h,
1636 [with_libgcrypt="yes"],
1637 [with_libgcrypt="no (gcrypt.h not found)"])
1640 if test "x$with_libgcrypt" = "xyes"
1642 if test "x$GCRYPT_LDFLAGS" != "x"
1644 AC_MSG_NOTICE([gcrypt LDFLAGS: $GCRYPT_LDFLAGS])
1646 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
1647 [with_libgcrypt="yes"],
1648 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
1650 if test "$with_libgcrypt" != "no"; then
1651 AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")
1655 CPPFLAGS="$SAVE_CPPFLAGS"
1656 LDFLAGS="$SAVE_LDFLAGS"
1658 if test "x$with_libgcrypt" = "xyes"
1660 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to 1 if you have the gcrypt library (-lgcrypt).])
1663 AC_SUBST(GCRYPT_CPPFLAGS)
1664 AC_SUBST(GCRYPT_LDFLAGS)
1665 AC_SUBST(GCRYPT_LIBS)
1666 AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes")
1669 # --with-libiptc {{{
1670 with_own_libiptc="no"
1671 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1673 if test "x$withval" = "xshipped"
1675 with_own_libiptc="yes"
1677 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1679 LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
1680 LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
1683 with_libiptc="$withval"
1687 if test "x$ac_system" = "xLinux"
1691 with_libiptc="no (Linux only)"
1694 SAVE_CPPFLAGS="$CPPFLAGS"
1695 SAVE_LDFLAGS="$LDFLAGS"
1696 CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
1697 LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS"
1698 # check whether the header file for libiptc is available.
1699 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1701 AC_CHECK_HEADERS(libiptc/libiptc.h,
1703 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1707 with_own_libiptc="yes"
1710 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1712 AC_CHECK_HEADERS(libiptc/libip6tc.h,
1714 AC_DEFINE(HAVE_LIBIPTC_LIBIP6TC_H, 1, [Define to 1 if you have the <libiptc/libip6tc.h> header file.])
1718 with_own_libiptc="yes"
1721 # If the header file is available, check for the required type declaractions.
1722 # They may be missing in old versions of libiptc. In that case, they will be
1723 # declared in the iptables plugin.
1724 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1726 AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
1729 # include "$srcdir/src/owniptc/libiptc.h"
1730 # include "$srcdir/src/owniptc/libip6tc.h"
1732 # include <libiptc/libiptc.h>
1733 # include <libiptc/libip6tc.h>
1737 # Check for the iptc_init symbol in the library.
1738 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1740 AC_CHECK_LIB(iptc, iptc_init,
1742 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1746 with_own_libiptc="yes"
1749 # The system wide version failed for some reason. Check if we have the required
1750 # headers to build the shipped version.
1751 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
1753 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
1755 with_libiptc="no (Linux iptables headers not found)"
1756 with_own_libiptc="no"
1759 #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
1762 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1763 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1764 if test "x$with_libiptc" = "xyes"
1766 BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
1767 BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
1768 AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
1769 AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
1771 if test "x$with_own_libiptc" = "xyes"
1773 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1775 CPPFLAGS="$SAVE_CPPFLAGS"
1776 LDFLAGS="$SAVE_LDFLAGS"
1780 with_java_home="$JAVA_HOME"
1781 with_java_vmtype="client"
1786 AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
1788 if test "x$withval" = "xno"
1791 else if test "x$withval" = "xyes"
1795 with_java_home="$withval"
1800 if test "x$with_java" = "xyes"
1802 if test -d "$with_java_home"
1804 AC_MSG_CHECKING([for jni.h])
1805 TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1806 if test "x$TMPDIR" != "x"
1808 AC_MSG_RESULT([found in $TMPDIR])
1809 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1811 AC_MSG_RESULT([not found])
1814 AC_MSG_CHECKING([for jni_md.h])
1815 TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1816 if test "x$TMPDIR" != "x"
1818 AC_MSG_RESULT([found in $TMPDIR])
1819 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1821 AC_MSG_RESULT([not found])
1824 AC_MSG_CHECKING([for libjvm.so])
1825 TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
1826 if test "x$TMPDIR" != "x"
1828 AC_MSG_RESULT([found in $TMPDIR])
1829 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR"
1831 AC_MSG_RESULT([not found])
1834 if test "x$JAVAC" = "x"
1836 AC_MSG_CHECKING([for javac])
1837 TMPDIR=`find "$with_java_home" -name javac -type f | head -n 1`
1838 if test "x$TMPDIR" != "x"
1841 AC_MSG_RESULT([$JAVAC])
1843 AC_MSG_RESULT([not found])
1846 if test "x$JAR" = "x"
1848 AC_MSG_CHECKING([for jar])
1849 TMPDIR=`find "$with_java_home" -name jar -type f | head -n 1`
1850 if test "x$TMPDIR" != "x"
1853 AC_MSG_RESULT([$JAR])
1855 AC_MSG_RESULT([not found])
1858 else if test "x$with_java_home" != "x"
1860 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
1864 if test "x$JAVA_CPPFLAGS" != "x"
1866 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
1868 if test "x$JAVA_CFLAGS" != "x"
1870 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
1872 if test "x$JAVA_LDFLAGS" != "x"
1874 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
1876 if test "x$JAVAC" = "x"
1878 with_javac_path="$PATH"
1879 if test "x$with_java_home" != "x"
1881 with_javac_path="$with_java_home:with_javac_path"
1882 if test -d "$with_java_home/bin"
1884 with_javac_path="$with_java_home/bin:with_javac_path"
1888 AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path")
1890 if test "x$JAVAC" = "x"
1892 with_java="no (javac not found)"
1894 if test "x$JAR" = "x"
1896 with_jar_path="$PATH"
1897 if test "x$with_java_home" != "x"
1899 with_jar_path="$with_java_home:$with_jar_path"
1900 if test -d "$with_java_home/bin"
1902 with_jar_path="$with_java_home/bin:$with_jar_path"
1906 AC_PATH_PROG(JAR, jar, [], "$with_jar_path")
1908 if test "x$JAR" = "x"
1910 with_java="no (jar not found)"
1913 SAVE_CPPFLAGS="$CPPFLAGS"
1914 SAVE_CFLAGS="$CFLAGS"
1915 SAVE_LDFLAGS="$LDFLAGS"
1916 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
1917 CFLAGS="$CFLAGS $JAVA_CFLAGS"
1918 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
1920 if test "x$with_java" = "xyes"
1922 AC_CHECK_HEADERS(jni.h, [], [with_java="no (jni.h not found)"])
1924 if test "x$with_java" = "xyes"
1926 AC_CHECK_LIB(jvm, JNI_CreateJavaVM,
1928 [with_java="no (libjvm not found)"],
1931 if test "x$with_java" = "xyes"
1933 JAVA_LIBS="$JAVA_LIBS -ljvm"
1934 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
1937 CPPFLAGS="$SAVE_CPPFLAGS"
1938 CFLAGS="$SAVE_CFLAGS"
1939 LDFLAGS="$SAVE_LDFLAGS"
1941 AC_SUBST(JAVA_CPPFLAGS)
1942 AC_SUBST(JAVA_CFLAGS)
1943 AC_SUBST(JAVA_LDFLAGS)
1945 AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
1948 # --with-libmemcached {{{
1949 with_libmemcached_cppflags=""
1950 with_libmemcached_ldflags=""
1951 AC_ARG_WITH(libmemcached, [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
1953 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1955 with_libmemcached_cppflags="-I$withval/include"
1956 with_libmemcached_ldflags="-L$withval/lib"
1957 with_libmemcached="yes"
1959 with_libmemcached="$withval"
1963 with_libmemcached="yes"
1965 if test "x$with_libmemcached" = "xyes"
1967 SAVE_CPPFLAGS="$CPPFLAGS"
1968 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1970 AC_CHECK_HEADERS(libmemcached/memcached.h, [with_libmemcached="yes"], [with_libmemcached="no (libmemcached/memcached.h not found)"])
1972 CPPFLAGS="$SAVE_CPPFLAGS"
1974 if test "x$with_libmemcached" = "xyes"
1976 SAVE_CPPFLAGS="$CPPFLAGS"
1977 SAVE_LDFLAGS="$LDFLAGS"
1978 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1979 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
1981 AC_CHECK_LIB(memcached, memcached_create, [with_libmemcached="yes"], [with_libmemcached="no (Symbol 'memcached_create' not found)"])
1983 CPPFLAGS="$SAVE_CPPFLAGS"
1984 LDFLAGS="$SAVE_LDFLAGS"
1986 if test "x$with_libmemcached" = "xyes"
1988 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
1989 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
1990 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
1991 AC_SUBST(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1992 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1993 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LIBS)
1994 AC_DEFINE(HAVE_LIBMEMCACHED, 1, [Define if libmemcached is present and usable.])
1996 AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
1999 # --with-libmodbus {{{
2000 with_libmodbus_config=""
2001 with_libmodbus_cflags=""
2002 with_libmodbus_libs=""
2003 AC_ARG_WITH(libmodbus, [AS_HELP_STRING([--with-libmodbus@<:@=PREFIX@:>@], [Path to the modbus library.])],
2005 if test "x$withval" = "xno"
2008 else if test "x$withval" = "xyes"
2010 with_libmodbus="use_pkgconfig"
2011 else if test -d "$with_libmodbus/lib"
2013 AC_MSG_NOTICE([Not checking for libmodbus: Manually configured])
2014 with_libmodbus_cflags="-I$withval/include"
2015 with_libmodbus_libs="-L$withval/lib -lmodbus"
2016 with_libmodbus="yes"
2019 [with_libmodbus="use_pkgconfig"])
2021 # configure using pkg-config
2022 if test "x$with_libmodbus" = "xuse_pkgconfig"
2024 if test "x$PKG_CONFIG" = "x"
2026 with_libmodbus="no (Don't have pkg-config)"
2029 if test "x$with_libmodbus" = "xuse_pkgconfig"
2031 AC_MSG_NOTICE([Checking for modbus using $PKG_CONFIG])
2032 $PKG_CONFIG --exists 'modbus' 2>/dev/null
2035 with_libmodbus="no (pkg-config doesn't know library)"
2038 if test "x$with_libmodbus" = "xuse_pkgconfig"
2040 with_libmodbus_cflags="`$PKG_CONFIG --cflags 'modbus'`"
2043 with_libmodbus="no ($PKG_CONFIG failed)"
2045 with_libmodbus_libs="`$PKG_CONFIG --libs 'modbus'`"
2048 with_libmodbus="no ($PKG_CONFIG failed)"
2051 if test "x$with_libmodbus" = "xuse_pkgconfig"
2053 with_libmodbus="yes"
2056 # with_libmodbus_cflags and with_libmodbus_libs are set up now, let's do
2057 # the actual checks.
2058 if test "x$with_libmodbus" = "xyes"
2060 SAVE_CPPFLAGS="$CPPFLAGS"
2061 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
2063 AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
2065 CPPFLAGS="$SAVE_CPPFLAGS"
2067 if test "x$with_libmodbus" = "xyes"
2069 SAVE_CPPFLAGS="$CPPFLAGS"
2070 SAVE_LDFLAGS="$LDFLAGS"
2072 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
2073 LDFLAGS="$LDFLAGS $with_libmodbus_libs"
2075 AC_CHECK_LIB(modbus, modbus_init_tcp,
2076 [with_libmodbus="yes"],
2077 [with_libmodbus="no (symbol modbus_init_tcp not found)"])
2079 CPPFLAGS="$SAVE_CPPFLAGS"
2080 LDFLAGS="$SAVE_LDFLAGS"
2082 if test "x$with_libmodbus" = "xyes"
2084 BUILD_WITH_LIBMODBUS_CFLAGS="$with_libmodbus_cflags"
2085 BUILD_WITH_LIBMODBUS_LIBS="$with_libmodbus_libs"
2086 AC_SUBST(BUILD_WITH_LIBMODBUS_CFLAGS)
2087 AC_SUBST(BUILD_WITH_LIBMODBUS_LIBS)
2091 # --with-libmysql {{{
2092 with_mysql_config="mysql_config"
2093 with_mysql_cflags=""
2095 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
2097 if test "x$withval" = "xno"
2100 else if test "x$withval" = "xyes"
2104 if test -f "$withval" && test -x "$withval";
2106 with_mysql_config="$withval"
2107 else if test -x "$withval/bin/mysql_config"
2109 with_mysql_config="$withval/bin/mysql_config"
2117 if test "x$with_libmysql" = "xyes"
2119 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
2120 mysql_config_status=$?
2122 if test $mysql_config_status -ne 0
2124 with_libmysql="no ($with_mysql_config failed)"
2126 SAVE_CPPFLAGS="$CPPFLAGS"
2127 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
2130 have_mysql_mysql_h="no"
2131 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
2133 if test "x$have_mysql_h" = "xno"
2135 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
2138 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
2140 with_libmysql="no (mysql.h not found)"
2143 CPPFLAGS="$SAVE_CPPFLAGS"
2146 if test "x$with_libmysql" = "xyes"
2148 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
2149 mysql_config_status=$?
2151 if test $mysql_config_status -ne 0
2153 with_libmysql="no ($with_mysql_config failed)"
2155 AC_CHECK_LIB(mysqlclient, mysql_init,
2156 [with_libmysql="yes"],
2157 [with_libmysql="no (symbol 'mysql_init' not found)"],
2160 AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
2161 [with_libmysql="yes"],
2162 [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
2166 if test "x$with_libmysql" = "xyes"
2168 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
2169 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
2170 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
2171 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
2173 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
2176 # --with-libnetlink {{{
2177 with_libnetlink_cflags=""
2178 with_libnetlink_libs="-lnetlink"
2179 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
2181 echo "libnetlink: withval = $withval"
2182 if test "x$withval" = "xyes"
2184 with_libnetlink="yes"
2185 else if test "x$withval" = "xno"
2187 with_libnetlink="no"
2189 if test -d "$withval/include"
2191 with_libnetlink_cflags="-I$withval/include"
2192 with_libnetlink_libs="-L$withval/lib -lnetlink"
2193 with_libnetlink="yes"
2195 AC_MSG_ERROR("no such directory: $withval/include")
2200 if test "x$ac_system" = "xLinux"
2202 with_libnetlink="yes"
2204 with_libnetlink="no (Linux only library)"
2207 if test "x$with_libnetlink" = "xyes"
2209 SAVE_CFLAGS="$CFLAGS"
2210 CFLAGS="$CFLAGS $with_libnetlink_cflags"
2212 with_libnetlink="no (libnetlink.h not found)"
2214 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
2216 with_libnetlink="yes"
2220 #include <sys/types.h>
2221 #include <asm/types.h>
2222 #include <sys/socket.h>
2223 #include <linux/netlink.h>
2224 #include <linux/rtnetlink.h>])
2225 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
2227 #include <sys/types.h>
2228 #include <asm/types.h>
2229 #include <sys/socket.h>])
2233 #include <sys/types.h>
2234 #include <asm/types.h>
2235 #include <sys/socket.h>
2236 #include <linux/netlink.h>
2237 #include <linux/rtnetlink.h>
2241 int retval = TCA_STATS2;
2244 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
2249 #include <sys/types.h>
2250 #include <asm/types.h>
2251 #include <sys/socket.h>
2252 #include <linux/netlink.h>
2253 #include <linux/rtnetlink.h>
2257 int retval = TCA_STATS;
2260 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
2263 CFLAGS="$SAVE_CFLAGS"
2265 if test "x$with_libnetlink" = "xyes"
2267 AC_CHECK_LIB(netlink, rtnl_open,
2268 [with_libnetlink="yes"],
2269 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
2270 [$with_libnetlink_libs])
2272 if test "x$with_libnetlink" = "xyes"
2274 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
2275 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
2276 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
2277 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
2279 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
2282 # --with-libnetapp {{{
2283 AC_ARG_VAR([LIBNETAPP_CPPFLAGS], [C preprocessor flags required to build with libnetapp])
2284 AC_ARG_VAR([LIBNETAPP_LDFLAGS], [Linker flags required to build with libnetapp])
2285 AC_ARG_VAR([LIBNETAPP_LIBS], [Other libraries required to link against libnetapp])
2286 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS"
2287 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS"
2288 LIBNETAPP_LIBS="$LIBNETAPP_LIBS"
2289 AC_ARG_WITH(libnetapp, [AS_HELP_STRING([--with-libnetapp@<:@=PREFIX@:>@], [Path to libnetapp.])],
2291 if test -d "$withval"
2293 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS -I$withval/include"
2294 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS -L$withval/lib"
2295 with_libnetapp="yes"
2297 with_libnetapp="$withval"
2301 with_libnetapp="yes"
2304 SAVE_CPPFLAGS="$CPPFLAGS"
2305 SAVE_LDFLAGS="$LDFLAGS"
2306 CPPFLAGS="$CPPFLAGS $LIBNETAPP_CPPFLAGS"
2307 LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
2309 if test "x$with_libnetapp" = "xyes"
2311 if test "x$LIBNETAPP_CPPFLAGS" != "x"
2313 AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
2315 AC_CHECK_HEADERS(netapp_api.h,
2316 [with_libnetapp="yes"],
2317 [with_libnetapp="no (netapp_api.h not found)"])
2320 if test "x$with_libnetapp" = "xyes"
2322 if test "x$LIBNETAPP_LDFLAGS" != "x"
2324 AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
2327 if test "x$LIBNETAPP_LIBS" = "x"
2329 LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm -lcrypto -lz"
2331 AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
2333 AC_CHECK_LIB(netapp, na_server_invoke_elem,
2334 [with_libnetapp="yes"],
2335 [with_libnetapp="no (symbol na_server_invoke_elem not found)"],
2337 LIBNETAPP_LIBS="-lnetapp $LIBNETAPP_LIBS"
2340 CPPFLAGS="$SAVE_CPPFLAGS"
2341 LDFLAGS="$SAVE_LDFLAGS"
2343 if test "x$with_libnetapp" = "xyes"
2345 AC_DEFINE(HAVE_LIBNETAPP, 1, [Define to 1 if you have the netapp library (-lnetapp).])
2348 AC_SUBST(LIBNETAPP_CPPFLAGS)
2349 AC_SUBST(LIBNETAPP_LDFLAGS)
2350 AC_SUBST(LIBNETAPP_LIBS)
2351 AM_CONDITIONAL(BUILD_WITH_LIBNETAPP, test "x$with_libnetapp" = "xyes")
2354 # --with-libnetsnmp {{{
2355 with_snmp_config="net-snmp-config"
2358 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
2360 if test "x$withval" = "xno"
2362 with_libnetsnmp="no"
2363 else if test "x$withval" = "xyes"
2365 with_libnetsnmp="yes"
2367 if test -x "$withval"
2369 with_snmp_config="$withval"
2370 with_libnetsnmp="yes"
2372 with_snmp_config="$withval/bin/net-snmp-config"
2373 with_libnetsnmp="yes"
2377 [with_libnetsnmp="yes"])
2378 if test "x$with_libnetsnmp" = "xyes"
2380 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
2381 snmp_config_status=$?
2383 if test $snmp_config_status -ne 0
2385 with_libnetsnmp="no ($with_snmp_config failed)"
2387 SAVE_CPPFLAGS="$CPPFLAGS"
2388 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
2390 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
2392 CPPFLAGS="$SAVE_CPPFLAGS"
2395 if test "x$with_libnetsnmp" = "xyes"
2397 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
2398 snmp_config_status=$?
2400 if test $snmp_config_status -ne 0
2402 with_libnetsnmp="no ($with_snmp_config failed)"
2404 AC_CHECK_LIB(netsnmp, init_snmp,
2405 [with_libnetsnmp="yes"],
2406 [with_libnetsnmp="no (libnetsnmp not found)"],
2410 if test "x$with_libnetsnmp" = "xyes"
2412 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
2413 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
2414 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
2415 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
2417 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
2420 # --with-liboconfig {{{
2421 with_own_liboconfig="no"
2422 liboconfig_LDFLAGS="$LDFLAGS"
2423 liboconfig_CPPFLAGS="$CPPFLAGS"
2424 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
2426 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2428 if test -d "$withval/lib"
2430 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
2432 if test -d "$withval/include"
2434 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
2437 if test "x$withval" = "xno"
2439 AC_MSG_ERROR("liboconfig is required")
2443 with_liboconfig="yes"
2446 save_LDFLAGS="$LDFLAGS"
2447 save_CPPFLAGS="$CPPFLAGS"
2448 LDFLAGS="$liboconfig_LDFLAGS"
2449 CPPFLAGS="$liboconfig_CPPFLAGS"
2450 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
2452 with_liboconfig="yes"
2453 with_own_liboconfig="no"
2456 with_liboconfig="yes"
2457 with_own_liboconfig="yes"
2458 LDFLAGS="$save_LDFLAGS"
2459 CPPFLAGS="$save_CPPFLAGS"
2462 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
2463 if test "x$with_own_liboconfig" = "xyes"
2465 with_liboconfig="yes (shipped version)"
2469 # --with-liboping {{{
2470 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
2472 if test "x$withval" = "xyes"
2475 else if test "x$withval" = "xno"
2480 LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS -I$withval/include"
2481 LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS -L$withval/lib"
2484 [with_liboping="yes"])
2486 SAVE_CPPFLAGS="$CPPFLAGS"
2487 SAVE_LDFLAGS="$LDFLAGS"
2489 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
2490 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
2492 if test "x$with_liboping" = "xyes"
2494 if test "x$LIBOPING_CPPFLAGS" != "x"
2496 AC_MSG_NOTICE([liboping CPPFLAGS: $LIBOPING_CPPFLAGS])
2498 AC_CHECK_HEADERS(oping.h,
2499 [with_liboping="yes"],
2500 [with_liboping="no ('oping.h' not found)"])
2502 if test "x$with_liboping" = "xyes"
2504 if test "x$LIBOPING_LDFLAGS" != "x"
2506 AC_MSG_NOTICE([liboping LDFLAGS: $LIBOPING_LDFLAGS])
2508 AC_CHECK_LIB(oping, ping_construct,
2509 [with_liboping="yes"],
2510 [with_liboping="no (symbol 'ping_construct' not found)"])
2513 CPPFLAGS="$SAVE_CPPFLAGS"
2514 LDFLAGS="$SAVE_LDFLAGS"
2516 if test "x$with_liboping" = "xyes"
2518 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
2519 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
2520 AC_SUBST(BUILD_WITH_LIBOPING_CPPFLAGS)
2521 AC_SUBST(BUILD_WITH_LIBOPING_LDFLAGS)
2523 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
2527 with_oracle_cppflags=""
2529 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
2531 if test "x$withval" = "xyes"
2533 if test "x$ORACLE_HOME" = "x"
2535 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
2538 else if test "x$withval" = "xno"
2543 ORACLE_HOME="$withval"
2547 if test "x$ORACLE_HOME" = "x"
2549 with_oracle="no (ORACLE_HOME is not set)"
2554 if test "x$ORACLE_HOME" != "x"
2556 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
2558 if test -e "$ORACLE_HOME/lib/ldflags"
2560 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
2562 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
2563 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
2565 if test "x$with_oracle" = "xyes"
2567 SAVE_CPPFLAGS="$CPPFLAGS"
2568 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2570 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
2572 CPPFLAGS="$SAVE_CPPFLAGS"
2574 if test "x$with_oracle" = "xyes"
2576 SAVE_CPPFLAGS="$CPPFLAGS"
2577 SAVE_LDFLAGS="$LDFLAGS"
2578 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2579 LDFLAGS="$LDFLAGS $with_oracle_libs"
2581 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
2583 CPPFLAGS="$SAVE_CPPFLAGS"
2584 LDFLAGS="$SAVE_LDFLAGS"
2586 if test "x$with_oracle" = "xyes"
2588 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
2589 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
2590 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
2591 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
2595 # --with-libowcapi {{{
2596 with_libowcapi_cppflags=""
2597 with_libowcapi_libs="-lowcapi"
2598 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
2600 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2602 with_libowcapi_cppflags="-I$withval/include"
2603 with_libowcapi_libs="-L$withval/lib -lowcapi"
2604 with_libowcapi="yes"
2606 with_libowcapi="$withval"
2610 with_libowcapi="yes"
2612 if test "x$with_libowcapi" = "xyes"
2614 SAVE_CPPFLAGS="$CPPFLAGS"
2615 CPPFLAGS="$with_libowcapi_cppflags"
2617 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
2619 CPPFLAGS="$SAVE_CPPFLAGS"
2621 if test "x$with_libowcapi" = "xyes"
2623 SAVE_LDFLAGS="$LDFLAGS"
2624 SAVE_CPPFLAGS="$CPPFLAGS"
2625 LDFLAGS="$with_libowcapi_libs"
2626 CPPFLAGS="$with_libowcapi_cppflags"
2628 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
2630 LDFLAGS="$SAVE_LDFLAGS"
2631 CPPFLAGS="$SAVE_CPPFLAGS"
2633 if test "x$with_libowcapi" = "xyes"
2635 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
2636 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
2637 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
2638 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
2643 AC_ARG_WITH(libzmq, [AS_HELP_STRING([--with-libzmq@<:@=PREFIX@:>@], [Path to libzmq.])],
2645 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2647 LDFLAGS="$LDFLAGS -L$withval/lib"
2648 CPPFLAGS="$CPPFLAGS -I$withval/include"
2651 with_libzmq="$withval"
2657 if test "x$with_libzmq" = "xyes"
2659 AC_CHECK_LIB(zmq, zmq_init,
2661 AC_DEFINE(HAVE_LIBZMQ, 1, [Define to 1 if you have the ZeroMQ library (-lzmq).])
2662 ], [with_libzmq="no (libzmq not found)"])
2664 if test "x$with_libzmq" = "xyes"
2666 AC_CHECK_HEADERS(zmq.h,
2668 AC_DEFINE(HAVE_ZMQ_H, 1, [Define to 1 if you have the <zmq.h> header file.])
2669 ], [with_libzmq="no (zmq.h not found)"])
2671 if test "x$with_libzmq" = "xyes"
2677 AC_DEFINE_UNQUOTED(COLLECT_LIBZMQ, [$collect_libzmq],
2678 [Wether or not to use the ZeroMQ library])
2679 AM_CONDITIONAL(BUILD_WITH_LIBZMQ, test "x$with_libzmq" = "xyes")
2682 # --with-libpcap {{{
2683 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
2685 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2687 LDFLAGS="$LDFLAGS -L$withval/lib"
2688 CPPFLAGS="$CPPFLAGS -I$withval/include"
2691 with_libpcap="$withval"
2697 if test "x$with_libpcap" = "xyes"
2699 AC_CHECK_LIB(pcap, pcap_open_live,
2701 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
2702 ], [with_libpcap="no (libpcap not found)"])
2704 if test "x$with_libpcap" = "xyes"
2706 AC_CHECK_HEADERS(pcap.h,
2708 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
2709 ], [with_libpcap="no (pcap.h not found)"])
2711 if test "x$with_libpcap" = "xyes"
2717 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
2718 [Wether or not to use the pcap library])
2719 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
2722 # --with-libperl {{{
2723 perl_interpreter="perl"
2724 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
2726 if test -x "$withval"
2728 perl_interpreter="$withval"
2730 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
2732 LDFLAGS="$LDFLAGS -L$withval/lib"
2733 CPPFLAGS="$CPPFLAGS -I$withval/include"
2734 perl_interpreter="$withval/bin/perl"
2737 with_libperl="$withval"
2744 AC_MSG_CHECKING([for perl])
2745 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
2746 if test -x "$perl_interpreter"
2748 AC_MSG_RESULT([yes ($perl_interpreter)])
2754 AC_SUBST(PERL, "$perl_interpreter")
2756 if test "x$with_libperl" = "xyes" \
2757 && test -n "$perl_interpreter"
2759 SAVE_CFLAGS="$CFLAGS"
2760 SAVE_LDFLAGS="$LDFLAGS"
2761 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
2762 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
2763 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
2764 CFLAGS="$CFLAGS $PERL_CFLAGS"
2765 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2767 AC_CACHE_CHECK([for libperl],
2768 [c_cv_have_libperl],
2772 #define PERL_NO_GET_CONTEXT
2779 load_module (PERL_LOADMOD_NOIMPORT,
2780 newSVpv ("Collectd::Plugin::FooBar", 24),
2783 [c_cv_have_libperl="yes"],
2784 [c_cv_have_libperl="no"]
2788 if test "x$c_cv_have_libperl" = "xyes"
2790 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
2791 AC_SUBST(PERL_CFLAGS)
2792 AC_SUBST(PERL_LDFLAGS)
2797 CFLAGS="$SAVE_CFLAGS"
2798 LDFLAGS="$SAVE_LDFLAGS"
2799 else if test -z "$perl_interpreter"; then
2800 with_libperl="no (no perl interpreter found)"
2801 c_cv_have_libperl="no"
2803 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
2805 if test "x$with_libperl" = "xyes"
2807 SAVE_CFLAGS="$CFLAGS"
2808 SAVE_LDFLAGS="$LDFLAGS"
2809 CFLAGS="$CFLAGS $PERL_CFLAGS"
2810 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2812 AC_CACHE_CHECK([if perl supports ithreads],
2813 [c_cv_have_perl_ithreads],
2821 #if !defined(USE_ITHREADS)
2822 # error "Perl does not support ithreads!"
2823 #endif /* !defined(USE_ITHREADS) */
2826 [c_cv_have_perl_ithreads="yes"],
2827 [c_cv_have_perl_ithreads="no"]
2831 if test "x$c_cv_have_perl_ithreads" = "xyes"
2833 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
2836 CFLAGS="$SAVE_CFLAGS"
2837 LDFLAGS="$SAVE_LDFLAGS"
2840 if test "x$with_libperl" = "xyes"
2842 SAVE_CFLAGS="$CFLAGS"
2843 SAVE_LDFLAGS="$LDFLAGS"
2844 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
2845 # (see issues #41 and #42)
2846 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
2847 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2849 AC_CACHE_CHECK([for broken Perl_load_module()],
2850 [c_cv_have_broken_perl_load_module],
2854 #define PERL_NO_GET_CONTEXT
2861 load_module (PERL_LOADMOD_NOIMPORT,
2862 newSVpv ("Collectd::Plugin::FooBar", 24),
2865 [c_cv_have_broken_perl_load_module="no"],
2866 [c_cv_have_broken_perl_load_module="yes"]
2870 CFLAGS="$SAVE_CFLAGS"
2871 LDFLAGS="$SAVE_LDFLAGS"
2873 AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
2874 test "x$c_cv_have_broken_perl_load_module" = "xyes")
2876 if test "x$with_libperl" = "xyes"
2878 SAVE_CFLAGS="$CFLAGS"
2879 SAVE_LDFLAGS="$LDFLAGS"
2880 CFLAGS="$CFLAGS $PERL_CFLAGS"
2881 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2884 [struct mgvtbl.svt_local],
2885 [have_struct_mgvtbl_svt_local="yes"],
2886 [have_struct_mgvtbl_svt_local="no"],
2893 if test "x$have_struct_mgvtbl_svt_local" = "xyes"
2895 AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
2896 [Define if Perl's struct mgvtbl has member svt_local.])
2899 CFLAGS="$SAVE_CFLAGS"
2900 LDFLAGS="$SAVE_LDFLAGS"
2905 with_pg_config="pg_config"
2906 with_libpq_includedir=""
2907 with_libpq_libdir=""
2908 with_libpq_cppflags=""
2909 with_libpq_ldflags=""
2910 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2913 if test "x$withval" = "xno"
2916 else if test "x$withval" = "xyes"
2920 if test -f "$withval" && test -x "$withval";
2922 with_pg_config="$withval"
2923 else if test -x "$withval/bin/pg_config"
2925 with_pg_config="$withval/bin/pg_config"
2933 if test "x$with_libpq" = "xyes"
2935 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2938 if test $pg_config_status -eq 0
2940 if test -n "$with_libpq_includedir"; then
2941 for dir in $with_libpq_includedir; do
2942 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2946 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2949 SAVE_CPPFLAGS="$CPPFLAGS"
2950 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2952 AC_CHECK_HEADERS(libpq-fe.h, [],
2953 [with_libpq="no (libpq-fe.h not found)"], [])
2955 CPPFLAGS="$SAVE_CPPFLAGS"
2957 if test "x$with_libpq" = "xyes"
2959 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2962 if test $pg_config_status -eq 0
2964 if test -n "$with_libpq_libdir"; then
2965 for dir in $with_libpq_libdir; do
2966 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2970 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2973 SAVE_LDFLAGS="$LDFLAGS"
2974 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2976 AC_CHECK_LIB(pq, PQconnectdb,
2978 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2980 AC_CHECK_LIB(pq, PQserverVersion,
2982 [with_libpq="no (symbol 'PQserverVersion' not found)"])
2984 LDFLAGS="$SAVE_LDFLAGS"
2986 if test "x$with_libpq" = "xyes"
2988 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2989 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2990 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2991 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2993 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2996 # --with-libpthread {{{
2997 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
2998 [ if test "x$withval" != "xno" \
2999 && test "x$withval" != "xyes"
3001 LDFLAGS="$LDFLAGS -L$withval/lib"
3002 CPPFLAGS="$CPPFLAGS -I$withval/include"
3003 with_libpthread="yes"
3005 if test "x$withval" = "xno"
3007 with_libpthread="no (disabled)"
3010 ], [with_libpthread="yes"])
3011 if test "x$with_libpthread" = "xyes"
3013 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
3016 if test "x$with_libpthread" = "xyes"
3018 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
3020 if test "x$with_libpthread" = "xyes"
3026 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
3027 [Wether or not to use pthread (POSIX threads) library])
3028 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
3033 with_python_path="$PATH"
3034 AC_ARG_WITH(python, [AS_HELP_STRING([--with-python@<:@=PREFIX@:>@], [Path to the python interpreter.])],
3036 if test "x$withval" = "xyes" || test "x$withval" = "xno"
3038 with_python="$withval"
3039 else if test -x "$withval"
3041 with_python_prog="$withval"
3042 with_python_path="`dirname \"$withval\"`$PATH_SEPARATOR$with_python_path"
3044 else if test -d "$withval"
3046 with_python_path="$withval$PATH_SEPARATOR$with_python_path"
3049 AC_MSG_WARN([Argument not recognized: $withval])
3051 ], [with_python="yes"])
3054 SAVE_CPPFLAGS="$CPPFLAGS"
3055 SAVE_LDFLAGS="$LDFLAGS"
3058 PATH="$with_python_path"
3060 if test "x$with_python" = "xyes" && test "x$with_python_prog" = "x"
3062 AC_MSG_CHECKING([for python])
3063 with_python_prog="`which python 2>/dev/null`"
3064 if test "x$with_python_prog" = "x"
3066 AC_MSG_RESULT([not found])
3067 with_python="no (interpreter not found)"
3069 AC_MSG_RESULT([$with_python_prog])
3073 if test "x$with_python" = "xyes"
3075 AC_MSG_CHECKING([for Python CPPFLAGS])
3076 python_include_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_python_inc())" | "$with_python_prog" 2>&1`
3077 python_config_status=$?
3079 if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x"
3081 AC_MSG_RESULT([failed with status $python_config_status (output: $python_include_path)])
3084 AC_MSG_RESULT([$python_include_path])
3088 if test "x$with_python" = "xyes"
3090 CPPFLAGS="-I$python_include_path $CPPFLAGS"
3091 AC_CHECK_HEADERS(Python.h,
3092 [with_python="yes"],
3093 [with_python="no ('Python.h' not found)"])
3096 if test "x$with_python" = "xyes"
3098 AC_MSG_CHECKING([for Python LDFLAGS])
3099 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`
3100 python_config_status=$?
3102 if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x"
3104 AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_path)])
3107 AC_MSG_RESULT([$python_library_path])
3111 if test "x$with_python" = "xyes"
3113 AC_MSG_CHECKING([for Python LIBS])
3114 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`
3115 python_config_status=$?
3117 if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
3119 AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_flags)])
3122 AC_MSG_RESULT([$python_library_flags])
3126 if test "x$with_python" = "xyes"
3128 LDFLAGS="-L$python_library_path $LDFLAGS"
3129 LIBS="$python_library_flags $LIBS"
3131 AC_CHECK_FUNC(PyObject_CallFunction,
3132 [with_python="yes"],
3133 [with_python="no (Symbol 'PyObject_CallFunction' not found)"])
3137 CPPFLAGS="$SAVE_CPPFLAGS"
3138 LDFLAGS="$SAVE_LDFLAGS"
3141 if test "x$with_python" = "xyes"
3143 BUILD_WITH_PYTHON_CPPFLAGS="-I$python_include_path"
3144 BUILD_WITH_PYTHON_LDFLAGS="-L$python_library_path"
3145 BUILD_WITH_PYTHON_LIBS="$python_library_flags"
3146 AC_SUBST(BUILD_WITH_PYTHON_CPPFLAGS)
3147 AC_SUBST(BUILD_WITH_PYTHON_LDFLAGS)
3148 AC_SUBST(BUILD_WITH_PYTHON_LIBS)
3152 # --with-librouteros {{{
3153 AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
3155 if test "x$withval" = "xyes"
3157 with_librouteros="yes"
3158 else if test "x$withval" = "xno"
3160 with_librouteros="no"
3162 with_librouteros="yes"
3163 LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS -I$withval/include"
3164 LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS -L$withval/lib"
3167 [with_librouteros="yes"])
3169 SAVE_CPPFLAGS="$CPPFLAGS"
3170 SAVE_LDFLAGS="$LDFLAGS"
3172 CPPFLAGS="$CPPFLAGS $LIBROUTEROS_CPPFLAGS"
3173 LDFLAGS="$LDFLAGS $LIBROUTEROS_LDFLAGS"
3175 if test "x$with_librouteros" = "xyes"
3177 if test "x$LIBROUTEROS_CPPFLAGS" != "x"
3179 AC_MSG_NOTICE([librouteros CPPFLAGS: $LIBROUTEROS_CPPFLAGS])
3181 AC_CHECK_HEADERS(routeros_api.h,
3182 [with_librouteros="yes"],
3183 [with_librouteros="no ('routeros_api.h' not found)"])
3185 if test "x$with_librouteros" = "xyes"
3187 if test "x$LIBROUTEROS_LDFLAGS" != "x"
3189 AC_MSG_NOTICE([librouteros LDFLAGS: $LIBROUTEROS_LDFLAGS])
3191 AC_CHECK_LIB(routeros, ros_interface,
3192 [with_librouteros="yes"],
3193 [with_librouteros="no (symbol 'ros_interface' not found)"])
3196 CPPFLAGS="$SAVE_CPPFLAGS"
3197 LDFLAGS="$SAVE_LDFLAGS"
3199 if test "x$with_librouteros" = "xyes"
3201 BUILD_WITH_LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS"
3202 BUILD_WITH_LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS"
3203 AC_SUBST(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
3204 AC_SUBST(BUILD_WITH_LIBROUTEROS_LDFLAGS)
3206 AM_CONDITIONAL(BUILD_WITH_LIBROUTEROS, test "x$with_librouteros" = "xyes")
3210 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
3213 librrd_threadsafe="yes"
3214 librrd_rrdc_update="no"
3215 AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
3216 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
3218 librrd_cflags="-I$withval/include"
3219 librrd_ldflags="-L$withval/lib"
3222 with_librrd="$withval"
3224 ], [with_librrd="yes"])
3225 if test "x$with_librrd" = "xyes"
3227 SAVE_CPPFLAGS="$CPPFLAGS"
3228 SAVE_LDFLAGS="$LDFLAGS"
3230 CPPFLAGS="$CPPFLAGS $librrd_cflags"
3231 LDFLAGS="$LDFLAGS $librrd_ldflags"
3233 AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
3235 CPPFLAGS="$SAVE_CPPFLAGS"
3236 LDFLAGS="$SAVE_LDFLAGS"
3238 if test "x$with_librrd" = "xyes"
3240 SAVE_CPPFLAGS="$CPPFLAGS"
3241 SAVE_LDFLAGS="$LDFLAGS"
3243 CPPFLAGS="$CPPFLAGS $librrd_cflags"
3244 LDFLAGS="$LDFLAGS $librrd_ldflags"
3246 AC_CHECK_LIB(rrd_th, rrd_update_r,
3248 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
3250 [librrd_threadsafe="no"
3251 AC_CHECK_LIB(rrd, rrd_update,
3253 librrd_ldflags="$librrd_ldflags -lrrd -lm"
3255 [with_librrd="no (symbol 'rrd_update' not found)"],
3260 if test "x$librrd_threadsafe" = "xyes"
3262 AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
3264 AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
3267 CPPFLAGS="$SAVE_CPPFLAGS"
3268 LDFLAGS="$SAVE_LDFLAGS"
3270 if test "x$with_librrd" = "xyes"
3272 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
3273 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
3274 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
3275 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
3277 if test "x$librrd_threadsafe" = "xyes"
3279 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
3283 # --with-libsensors {{{
3284 with_sensors_cflags=""
3285 with_sensors_ldflags=""
3286 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
3288 if test "x$withval" = "xno"
3290 with_libsensors="no"
3292 with_libsensors="yes"
3293 if test "x$withval" != "xyes"
3295 with_sensors_cflags="-I$withval/include"
3296 with_sensors_ldflags="-L$withval/lib"
3297 with_libsensors="yes"
3302 if test "x$ac_system" = "xLinux"
3304 with_libsensors="yes"
3306 with_libsensors="no (Linux only library)"
3309 if test "x$with_libsensors" = "xyes"
3311 SAVE_CPPFLAGS="$CPPFLAGS"
3312 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
3314 # AC_CHECK_HEADERS(sensors/sensors.h,
3316 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
3318 # [with_libsensors="no (sensors/sensors.h not found)"])
3319 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
3321 CPPFLAGS="$SAVE_CPPFLAGS"
3323 if test "x$with_libsensors" = "xyes"
3325 SAVE_CPPFLAGS="$CPPFLAGS"
3326 SAVE_LDFLAGS="$LDFLAGS"
3327 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
3328 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
3330 AC_CHECK_LIB(sensors, sensors_init,
3332 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
3334 [with_libsensors="no (libsensors not found)"])
3336 CPPFLAGS="$SAVE_CPPFLAGS"
3337 LDFLAGS="$SAVE_LDFLAGS"
3339 if test "x$with_libsensors" = "xyes"
3341 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
3342 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
3343 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
3344 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
3346 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
3349 # --with-libstatgrab {{{
3350 with_libstatgrab_cflags=""
3351 with_libstatgrab_ldflags=""
3352 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
3354 if test "x$withval" != "xno" \
3355 && test "x$withval" != "xyes"
3357 with_libstatgrab_cflags="-I$withval/include"
3358 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
3359 with_libstatgrab="yes"
3360 with_libstatgrab_pkg_config="no"
3362 with_libstatgrab="$withval"
3363 with_libstatgrab_pkg_config="yes"
3367 with_libstatgrab="yes"
3368 with_libstatgrab_pkg_config="yes"
3371 if test "x$with_libstatgrab" = "xyes" \
3372 && test "x$with_libstatgrab_pkg_config" = "xyes"
3374 if test "x$PKG_CONFIG" != "x"
3376 AC_MSG_CHECKING([pkg-config for libstatgrab])
3378 $PKG_CONFIG --exists libstatgrab 2>/dev/null
3381 with_libstatgrab_pkg_config="no"
3382 with_libstatgrab="no ($PKG_CONFIG doesn't know libstatgrab)"
3383 temp_result="not found"
3385 AC_MSG_RESULT([$temp_result])
3387 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
3388 with_libstatgrab_pkg_config="no"
3389 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
3393 if test "x$with_libstatgrab" = "xyes" \
3394 && test "x$with_libstatgrab_pkg_config" = "xyes" \
3395 && test "x$with_libstatgrab_cflags" = "x"
3397 AC_MSG_CHECKING([for libstatgrab CFLAGS])
3398 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
3401 with_libstatgrab_cflags="$temp_result"
3403 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
3404 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
3406 AC_MSG_RESULT([$temp_result])
3409 if test "x$with_libstatgrab" = "xyes" \
3410 && test "x$with_libstatgrab_pkg_config" = "xyes" \
3411 && test "x$with_libstatgrab_ldflags" = "x"
3413 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
3414 temp_result="`$PKG_CONFIG --libs libstatgrab`"
3417 with_libstatgrab_ldflags="$temp_result"
3419 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
3420 temp_result="$PKG_CONFIG --libs libstatgrab failed"
3422 AC_MSG_RESULT([$temp_result])
3425 if test "x$with_libstatgrab" = "xyes"
3427 SAVE_CPPFLAGS="$CPPFLAGS"
3428 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
3430 AC_CHECK_HEADERS(statgrab.h,
3431 [with_libstatgrab="yes"],
3432 [with_libstatgrab="no (statgrab.h not found)"])
3434 CPPFLAGS="$SAVE_CPPFLAGS"
3437 if test "x$with_libstatgrab" = "xyes"
3439 SAVE_CFLAGS="$CFLAGS"
3440 SAVE_LDFLAGS="$LDFLAGS"
3442 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
3443 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
3445 AC_CHECK_LIB(statgrab, sg_init,
3446 [with_libstatgrab="yes"],
3447 [with_libstatgrab="no (symbol sg_init not found)"])
3449 CFLAGS="$SAVE_CFLAGS"
3450 LDFLAGS="$SAVE_LDFLAGS"
3453 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
3454 if test "x$with_libstatgrab" = "xyes"
3456 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
3457 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
3458 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
3459 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
3460 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
3464 # --with-libtokyotyrant {{{
3465 with_libtokyotyrant_cppflags=""
3466 with_libtokyotyrant_ldflags=""
3467 with_libtokyotyrant_libs=""
3468 AC_ARG_WITH(libtokyotyrant, [AS_HELP_STRING([--with-libtokyotyrant@<:@=PREFIX@:>@], [Path to libtokyotyrant.])],
3470 if test "x$withval" = "xno"
3472 with_libtokyotyrant="no"
3473 else if test "x$withval" = "xyes"
3475 with_libtokyotyrant="yes"
3477 with_libtokyotyrant_cppflags="-I$withval/include"
3478 with_libtokyotyrant_ldflags="-L$withval/include"
3479 with_libtokyotyrant_libs="-ltokyotyrant"
3480 with_libtokyotyrant="yes"
3484 with_libtokyotyrant="yes"
3487 if test "x$with_libtokyotyrant" = "xyes"
3489 if $PKG_CONFIG --exists tokyotyrant
3491 with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
3492 with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `pkg-config --libs-only-L tokyotyrant`"
3493 with_libtokyotyrant_libs="$with_libtokyotyrant_libs `pkg-config --libs-only-l tokyotyrant`"
3497 SAVE_CPPFLAGS="$CPPFLAGS"
3498 SAVE_LDFLAGS="$LDFLAGS"
3499 CPPFLAGS="$CPPFLAGS $with_libtokyotyrant_cppflags"
3500 LDFLAGS="$LDFLAGS $with_libtokyotyrant_ldflags"
3502 if test "x$with_libtokyotyrant" = "xyes"
3504 AC_CHECK_HEADERS(tcrdb.h,
3506 AC_DEFINE(HAVE_TCRDB_H, 1,
3507 [Define to 1 if you have the <tcrdb.h> header file.])
3508 ], [with_libtokyotyrant="no (tcrdb.h not found)"])
3511 if test "x$with_libtokyotyrant" = "xyes"
3513 AC_CHECK_LIB(tokyotyrant, tcrdbrnum,
3515 AC_DEFINE(HAVE_LIBTOKYOTYRANT, 1,
3516 [Define to 1 if you have the tokyotyrant library (-ltokyotyrant).])
3518 [with_libtokyotyrant="no (symbol tcrdbrnum not found)"],
3519 [$with_libtokyotyrant_libs])
3522 CPPFLAGS="$SAVE_CPPFLAGS"
3523 LDFLAGS="$SAVE_LDFLAGS"
3525 if test "x$with_libtokyotyrant" = "xyes"
3527 BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
3528 BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
3529 BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
3530 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
3531 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
3532 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
3534 AM_CONDITIONAL(BUILD_WITH_LIBTOKYOTYRANT, test "x$with_libtokyotyrant" = "xyes")
3537 # --with-libupsclient {{{
3538 with_libupsclient_config=""
3539 with_libupsclient_cflags=""
3540 with_libupsclient_libs=""
3541 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
3543 if test "x$withval" = "xno"
3545 with_libupsclient="no"
3546 else if test "x$withval" = "xyes"
3548 with_libupsclient="use_pkgconfig"
3550 if test -x "$withval"
3552 with_libupsclient_config="$withval"
3553 with_libupsclient="use_libupsclient_config"
3554 else if test -x "$withval/bin/libupsclient-config"
3556 with_libupsclient_config="$withval/bin/libupsclient-config"
3557 with_libupsclient="use_libupsclient_config"
3559 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
3560 with_libupsclient_cflags="-I$withval/include"
3561 with_libupsclient_libs="-L$withval/lib -lupsclient"
3562 with_libupsclient="yes"
3566 [with_libupsclient="use_pkgconfig"])
3568 # configure using libupsclient-config
3569 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3571 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
3572 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
3575 with_libupsclient="no ($with_libupsclient_config failed)"
3577 with_libupsclient_libs="`$with_libupsclient_config --libs`"
3580 with_libupsclient="no ($with_libupsclient_config failed)"
3583 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3585 with_libupsclient="yes"
3588 # configure using pkg-config
3589 if test "x$with_libupsclient" = "xuse_pkgconfig"
3591 if test "x$PKG_CONFIG" = "x"
3593 with_libupsclient="no (Don't have pkg-config)"
3596 if test "x$with_libupsclient" = "xuse_pkgconfig"
3598 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
3599 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
3602 with_libupsclient="no (pkg-config doesn't know library)"
3605 if test "x$with_libupsclient" = "xuse_pkgconfig"
3607 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
3610 with_libupsclient="no ($PKG_CONFIG failed)"
3612 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
3615 with_libupsclient="no ($PKG_CONFIG failed)"
3618 if test "x$with_libupsclient" = "xuse_pkgconfig"
3620 with_libupsclient="yes"
3623 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
3624 # the actual checks.
3625 if test "x$with_libupsclient" = "xyes"
3627 SAVE_CPPFLAGS="$CPPFLAGS"
3628 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3630 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
3632 CPPFLAGS="$SAVE_CPPFLAGS"
3634 if test "x$with_libupsclient" = "xyes"
3636 SAVE_CPPFLAGS="$CPPFLAGS"
3637 SAVE_LDFLAGS="$LDFLAGS"
3639 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3640 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
3642 AC_CHECK_LIB(upsclient, upscli_connect,
3643 [with_libupsclient="yes"],
3644 [with_libupsclient="no (symbol upscli_connect not found)"])
3646 CPPFLAGS="$SAVE_CPPFLAGS"
3647 LDFLAGS="$SAVE_LDFLAGS"
3649 if test "x$with_libupsclient" = "xyes"
3651 SAVE_CPPFLAGS="$CPPFLAGS"
3652 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3654 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
3655 [#include <stdlib.h>
3657 #include <upsclient.h>])
3659 CPPFLAGS="$SAVE_CPPFLAGS"
3661 if test "x$with_libupsclient" = "xyes"
3663 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
3664 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
3665 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
3666 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
3670 # --with-libxmms {{{
3671 with_xmms_config="xmms-config"
3674 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
3676 if test "x$withval" != "xno" \
3677 && test "x$withval" != "xyes"
3679 if test -f "$withval" && test -x "$withval";
3681 with_xmms_config="$withval"
3682 else if test -x "$withval/bin/xmms-config"
3684 with_xmms_config="$withval/bin/xmms-config"
3687 else if test "x$withval" = "xno"
3697 if test "x$with_libxmms" = "xyes"
3699 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
3700 xmms_config_status=$?
3702 if test $xmms_config_status -ne 0
3707 if test "x$with_libxmms" = "xyes"
3709 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
3710 xmms_config_status=$?
3712 if test $xmms_config_status -ne 0
3717 if test "x$with_libxmms" = "xyes"
3719 AC_CHECK_LIB(xmms, xmms_remote_get_info,
3721 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
3722 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
3723 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
3724 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
3731 with_libxmms_numeric=0
3732 if test "x$with_libxmms" = "xyes"
3734 with_libxmms_numeric=1
3736 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
3737 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
3740 # --with-libyajl {{{
3741 with_libyajl_cppflags=""
3742 with_libyajl_ldflags=""
3743 AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
3745 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3747 with_libyajl_cppflags="-I$withval/include"
3748 with_libyajl_ldflags="-L$withval/lib"
3751 with_libyajl="$withval"
3757 if test "x$with_libyajl" = "xyes"
3759 SAVE_CPPFLAGS="$CPPFLAGS"
3760 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3762 AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"])
3764 CPPFLAGS="$SAVE_CPPFLAGS"
3766 if test "x$with_libyajl" = "xyes"
3768 SAVE_CPPFLAGS="$CPPFLAGS"
3769 SAVE_LDFLAGS="$LDFLAGS"
3770 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3771 LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
3773 AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"])
3775 CPPFLAGS="$SAVE_CPPFLAGS"
3776 LDFLAGS="$SAVE_LDFLAGS"
3778 if test "x$with_libyajl" = "xyes"
3780 BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
3781 BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
3782 BUILD_WITH_LIBYAJL_LIBS="-lyajl"
3783 AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS)
3784 AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS)
3785 AC_SUBST(BUILD_WITH_LIBYAJL_LIBS)
3786 AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.])
3788 AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
3791 # --with-libvarnish {{{
3792 with_libvarnish_cppflags=""
3793 with_libvarnish_cflags=""
3794 with_libvarnish_libs=""
3795 AC_ARG_WITH(libvarnish, [AS_HELP_STRING([--with-libvarnish@<:@=PREFIX@:>@], [Path to libvarnish.])],
3797 if test "x$withval" = "xno"
3799 with_libvarnish="no"
3800 else if test "x$withval" = "xyes"
3802 with_libvarnish="use_pkgconfig"
3803 else if test -d "$with_libvarnish/lib"
3805 AC_MSG_NOTICE([Not checking for libvarnish: Manually configured])
3806 with_libvarnish_cflags="-I$withval/include"
3807 with_libvarnish_libs="-L$withval/lib -lvarnish -lvarnishcompat -lvarnishapi"
3808 with_libvarnish="yes"
3811 [with_libvarnish="use_pkgconfig"])
3813 # configure using pkg-config
3814 if test "x$with_libvarnish" = "xuse_pkgconfig"
3816 if test "x$PKG_CONFIG" = "x"
3818 with_libvarnish="no (Don't have pkg-config)"
3821 if test "x$with_libvarnish" = "xuse_pkgconfig"
3823 AC_MSG_NOTICE([Checking for varnishapi using $PKG_CONFIG])
3824 $PKG_CONFIG --exists 'varnishapi' 2>/dev/null
3827 with_libvarnish="no (pkg-config doesn't know library)"
3830 if test "x$with_libvarnish" = "xuse_pkgconfig"
3832 with_libvarnish_cflags="`$PKG_CONFIG --cflags 'varnishapi'`"
3835 with_libvarnish="no ($PKG_CONFIG failed)"
3837 with_libvarnish_libs="`$PKG_CONFIG --libs 'varnishapi'`"
3840 with_libvarnish="no ($PKG_CONFIG failed)"
3843 if test "x$with_libvarnish" = "xuse_pkgconfig"
3845 with_libvarnish="yes"
3848 # with_libvarnish_cflags and with_libvarnish_libs are set up now, let's do
3849 # the actual checks.
3850 if test "x$with_libvarnish" = "xyes"
3852 SAVE_CPPFLAGS="$CPPFLAGS"
3853 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
3854 AC_CHECK_HEADERS(varnish/varnishapi.h, [], [with_libvarnish="no (varnish/varnishapi.h not found)"])
3856 CPPFLAGS="$SAVE_CPPFLAGS"
3858 if test "x$with_libvarnish" = "xyes"
3860 SAVE_CPPFLAGS="$CPPFLAGS"
3861 #SAVE_LDFLAGS="$LDFLAGS"
3863 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
3864 #LDFLAGS="$LDFLAGS $with_libvarnish_libs"
3866 AC_CHECK_LIB(varnishapi, VSL_OpenStats,
3867 [with_libvarnish="yes"],
3868 [with_libvarnish="no (symbol VSL_OpenStats not found)"],
3869 [$with_libvarnish_libs])
3871 CPPFLAGS="$SAVE_CPPFLAGS"
3872 #LDFLAGS="$SAVE_LDFLAGS"
3874 if test "x$with_libvarnish" = "xyes"
3876 BUILD_WITH_LIBVARNISH_CFLAGS="$with_libvarnish_cflags"
3877 BUILD_WITH_LIBVARNISH_LIBS="$with_libvarnish_libs"
3878 AC_SUBST(BUILD_WITH_LIBVARNISH_CFLAGS)
3879 AC_SUBST(BUILD_WITH_LIBVARNISH_LIBS)
3883 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
3884 with_libxml2="no (pkg-config isn't available)"
3885 with_libxml2_cflags=""
3886 with_libxml2_ldflags=""
3887 with_libvirt="no (pkg-config isn't available)"
3888 with_libvirt_cflags=""
3889 with_libvirt_ldflags=""
3890 if test "x$PKG_CONFIG" != "x"
3892 pkg-config --exists 'libxml-2.0' 2>/dev/null
3897 with_libxml2="no (pkg-config doesn't know library)"
3900 pkg-config --exists libvirt 2>/dev/null
3905 with_libvirt="no (pkg-config doesn't know library)"
3908 if test "x$with_libxml2" = "xyes"
3910 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
3915 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
3921 if test "x$with_libxml2" = "xyes"
3923 SAVE_CPPFLAGS="$CPPFLAGS"
3924 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
3926 AC_CHECK_HEADERS(libxml/parser.h, [],
3927 [with_libxml2="no (libxml/parser.h not found)"])
3929 CPPFLAGS="$SAVE_CPPFLAGS"
3931 if test "x$with_libxml2" = "xyes"
3933 SAVE_CFLAGS="$CFLAGS"
3934 SAVE_LDFLAGS="$LDFLAGS"
3936 CFLAGS="$CFLAGS $with_libxml2_cflags"
3937 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
3939 AC_CHECK_LIB(xml2, xmlXPathEval,
3940 [with_libxml2="yes"],
3941 [with_libxml2="no (symbol xmlXPathEval not found)"])
3943 CFLAGS="$SAVE_CFLAGS"
3944 LDFLAGS="$SAVE_LDFLAGS"
3946 dnl Add the right compiler flags and libraries.
3947 if test "x$with_libxml2" = "xyes"; then
3948 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
3949 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
3950 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
3951 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
3953 if test "x$with_libvirt" = "xyes"
3955 with_libvirt_cflags="`pkg-config --cflags libvirt`"
3960 with_libvirt_ldflags="`pkg-config --libs libvirt`"
3966 if test "x$with_libvirt" = "xyes"
3968 SAVE_CPPFLAGS="$CPPFLAGS"
3969 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
3971 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
3972 [with_libvirt="no (libvirt/libvirt.h not found)"])
3974 CPPFLAGS="$SAVE_CPPFLAGS"
3976 if test "x$with_libvirt" = "xyes"
3978 SAVE_CFLAGS="$CFLAGS"
3979 SAVE_LDFLAGS="$LDFLAGS"
3981 CFLAGS="$CFLAGS $with_libvirt_cflags"
3982 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
3984 AC_CHECK_LIB(virt, virDomainBlockStats,
3985 [with_libvirt="yes"],
3986 [with_libvirt="no (symbol virDomainBlockStats not found)"])
3988 CFLAGS="$SAVE_CFLAGS"
3989 LDFLAGS="$SAVE_LDFLAGS"
3991 dnl Add the right compiler flags and libraries.
3992 if test "x$with_libvirt" = "xyes"; then
3993 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
3994 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
3995 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
3996 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
4000 # $PKG_CONFIG --exists OpenIPMIpthread {{{
4001 with_libopenipmipthread="yes"
4002 with_libopenipmipthread_cflags=""
4003 with_libopenipmipthread_libs=""
4005 AC_MSG_CHECKING([for pkg-config])
4007 if test "x$PKG_CONFIG" = "x"
4009 with_libopenipmipthread="no"
4012 temp_result="$PKG_CONFIG"
4014 AC_MSG_RESULT([$temp_result])
4016 if test "x$with_libopenipmipthread" = "xyes"
4018 AC_MSG_CHECKING([for libOpenIPMIpthread])
4019 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
4022 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
4024 AC_MSG_RESULT([$with_libopenipmipthread])
4027 if test "x$with_libopenipmipthread" = "xyes"
4029 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
4030 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
4033 with_libopenipmipthread_cflags="$temp_result"
4035 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
4036 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
4038 AC_MSG_RESULT([$temp_result])
4041 if test "x$with_libopenipmipthread" = "xyes"
4043 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
4044 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
4047 with_libopenipmipthread_ldflags="$temp_result"
4049 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
4050 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
4052 AC_MSG_RESULT([$temp_result])
4055 if test "x$with_libopenipmipthread" = "xyes"
4057 SAVE_CPPFLAGS="$CPPFLAGS"
4058 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
4060 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
4061 [with_libopenipmipthread="yes"],
4062 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
4063 [#include <OpenIPMI/ipmiif.h>
4064 #include <OpenIPMI/ipmi_err.h>
4065 #include <OpenIPMI/ipmi_posix.h>
4066 #include <OpenIPMI/ipmi_conn.h>
4069 CPPFLAGS="$SAVE_CPPFLAGS"
4072 if test "x$with_libopenipmipthread" = "xyes"
4074 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
4075 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
4076 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
4077 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
4081 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
4082 [with_libnotify="yes"],
4083 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
4085 # Check for enabled/disabled features
4088 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
4089 # ------------------------------------------------------------
4091 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
4096 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
4101 m4_define([EnDis],[disabled])dnl
4102 m4_define([YesNo],[no])dnl
4108 m4_define([EnDis],[enabled])dnl
4109 m4_define([YesNo],[yes])dnl
4112 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
4116 m4_if([$3], [feature], [],
4120 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
4126 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
4128 enable_$1='[YesNo]'dnl
4130 if test "x$enable_$1" = "xno"
4134 if test "x$enable_$1" = "xyes"
4138 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
4143 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
4144 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
4146 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
4148 # AC_PLUGIN(name, default, info)
4149 # ------------------------------------------------------------
4156 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
4158 if test "x$enableval" = "xyes"
4161 else if test "x$enableval" = "xforce"
4166 enable_plugin="no (disabled on command line)"
4170 if test "x$enable_all_plugins" = "xauto"
4172 if test "x$2" = "xyes"
4179 enable_plugin="$enable_all_plugins"
4182 if test "x$enable_plugin" = "xyes"
4184 if test "x$2" = "xyes" || test "x$force" = "xyes"
4186 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
4187 if test "x$2" != "xyes"
4189 dependency_warning="yes"
4191 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
4192 dependency_error="yes"
4193 enable_plugin="no (dependency error)"
4196 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
4197 enable_$1="$enable_plugin"
4199 )# AC_PLUGIN(name, default, info)
4201 m4_divert_once([HELP_ENABLE], [
4202 collectd features:])
4203 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
4204 AC_COLLECTD([debug], [enable], [feature], [debugging])
4205 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
4206 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
4208 dependency_warning="no"
4209 dependency_error="no"
4214 plugin_conntrack="no"
4215 plugin_contextswitch="no"
4218 plugin_curl_json="no"
4219 plugin_curl_xml="no"
4223 plugin_interface="no"
4230 plugin_multimeter="no"
4234 plugin_processes="no"
4235 plugin_protocols="no"
4239 plugin_tcpconns="no"
4246 plugin_wireless="no"
4250 if test "x$ac_system" = "xLinux"
4252 plugin_battery="yes"
4253 plugin_conntrack="yes"
4254 plugin_contextswitch="yes"
4256 plugin_cpufreq="yes"
4258 plugin_entropy="yes"
4259 plugin_interface="yes"
4264 plugin_fscache="yes"
4265 plugin_processes="yes"
4266 plugin_protocols="yes"
4269 plugin_tcpconns="yes"
4270 plugin_thermal="yes"
4273 plugin_vserver="yes"
4274 plugin_wireless="yes"
4276 if test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"
4282 if test "x$ac_system" = "xOpenBSD"
4284 plugin_tcpconns="yes"
4288 if test "x$with_libiokit" = "xyes"
4290 plugin_battery="yes"
4295 if test "x$with_perfstat" = "xyes"
4301 plugin_interface="yes"
4305 if test "x$with_procinfo" = "xyes"
4307 plugin_processes="yes"
4311 if test "x$with_kstat" = "xyes"
4314 plugin_zfs_arc="yes"
4317 if test "x$with_devinfo$with_kstat" = "xyesyes"
4321 plugin_interface="yes"
4326 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
4332 if test "x$with_libstatgrab" = "xyes"
4336 plugin_interface="yes"
4343 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
4349 if test "x$with_libopenipmipthread" = "xyes"
4354 if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"
4356 plugin_curl_json="yes"
4359 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
4361 plugin_curl_xml="yes"
4364 if test "x$have_processor_info" = "xyes"
4368 if test "x$have_sysctl" = "xyes"
4375 if test "x$have_sysctlbyname" = "xyes"
4377 plugin_contextswitch="yes"
4380 plugin_tcpconns="yes"
4383 # Df plugin: Check if we know how to determine mount points first.
4384 #if test "x$have_listmntent" = "xyes"; then
4387 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
4391 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
4395 #if test "x$have_getmntent" = "xseq"
4399 if test "x$c_cv_have_one_getmntent" = "xyes"
4404 # Df plugin: Check if we have either `statfs' or `statvfs' second.
4405 if test "x$plugin_df" = "xyes"
4408 if test "x$have_statfs" = "xyes"
4412 if test "x$have_statvfs" = "xyes"
4418 if test "x$have_getifaddrs" = "xyes"
4420 plugin_interface="yes"
4423 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
4425 plugin_libvirt="yes"
4428 if test "x$have_getloadavg" = "xyes"
4433 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
4438 # Mac OS X memory interface
4439 if test "x$have_host_statistics" = "xyes"
4444 if test "x$have_termios_h" = "xyes"
4446 plugin_multimeter="yes"
4450 if test "x$have_thread_info" = "xyes"
4452 plugin_processes="yes"
4455 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
4457 plugin_processes="yes"
4460 if test "x$with_kvm_getswapinfo" = "xyes"
4465 if test "x$have_swapctl" = "xyes"
4470 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
4472 plugin_tcpconns="yes"
4475 if test "x$have_getutent" = "xyes"
4479 if test "x$have_getutxent" = "xyes"
4484 m4_divert_once([HELP_ENABLE], [
4487 AC_ARG_ENABLE([all-plugins],
4488 AC_HELP_STRING([--enable-all-plugins],
4489 [enable all plugins (auto by def)]),
4491 if test "x$enableval" = "xyes"
4493 enable_all_plugins="yes"
4494 else if test "x$enableval" = "xauto"
4496 enable_all_plugins="auto"
4498 enable_all_plugins="no"
4501 [enable_all_plugins="auto"])
4503 m4_divert_once([HELP_ENABLE], [])
4505 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
4506 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
4507 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
4508 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
4509 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
4510 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
4511 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
4512 AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
4513 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
4514 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
4515 AC_PLUGIN([csv], [yes], [CSV output plugin])
4516 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
4517 AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics])
4518 AC_PLUGIN([curl_xml], [$plugin_curl_xml], [CURL generic xml statistics])
4519 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
4520 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
4521 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
4522 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
4523 AC_PLUGIN([email], [yes], [EMail statistics])
4524 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
4525 AC_PLUGIN([exec], [yes], [Execution of external programs])
4526 AC_PLUGIN([filecount], [yes], [Count files in directories])
4527 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
4528 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
4529 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
4530 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
4531 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
4532 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
4533 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
4534 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
4535 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
4536 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
4537 AC_PLUGIN([load], [$plugin_load], [System load])
4538 AC_PLUGIN([logfile], [yes], [File logging plugin])
4539 AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
4540 AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
4541 AC_PLUGIN([match_hashed], [yes], [The hashed match])
4542 AC_PLUGIN([match_regex], [yes], [The regex match])
4543 AC_PLUGIN([match_timediff], [yes], [The timediff match])
4544 AC_PLUGIN([match_value], [yes], [The value match])
4545 AC_PLUGIN([mbmon], [yes], [Query mbmond])
4546 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
4547 AC_PLUGIN([memcached], [yes], [memcached statistics])
4548 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
4549 AC_PLUGIN([modbus], [$with_libmodbus], [Modbus plugin])
4550 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
4551 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
4552 AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
4553 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
4554 AC_PLUGIN([network], [yes], [Network communication plugin])
4555 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
4556 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
4557 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
4558 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
4559 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
4560 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
4561 AC_PLUGIN([olsrd], [yes], [olsrd statistics])
4562 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
4563 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
4564 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
4565 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
4566 # FIXME: Check for libevent, too.
4567 AC_PLUGIN([pinba], [$have_protoc_c], [Pinba statistics])
4568 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
4569 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
4570 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
4571 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
4572 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
4573 AC_PLUGIN([python], [$with_python], [Embed a Python interpreter])
4574 AC_PLUGIN([redis], [$with_libcredis], [Redis plugin])
4575 AC_PLUGIN([routeros], [$with_librouteros], [RouterOS plugin])
4576 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
4577 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
4578 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
4579 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
4580 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
4581 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
4582 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
4583 AC_PLUGIN([table], [yes], [Parsing of tabular data])
4584 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
4585 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
4586 AC_PLUGIN([target_notification], [yes], [The notification target])
4587 AC_PLUGIN([target_replace], [yes], [The replace target])
4588 AC_PLUGIN([target_scale],[yes], [The scale target])
4589 AC_PLUGIN([target_set], [yes], [The set target])
4590 AC_PLUGIN([target_v5upgrade], [yes], [The v5upgrade target])
4591 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
4592 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
4593 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
4594 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
4595 AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics])
4596 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
4597 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
4598 AC_PLUGIN([users], [$plugin_users], [User statistics])
4599 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
4600 AC_PLUGIN([varnish], [$with_libvarnish], [Varnish cache statistics])
4601 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
4602 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
4603 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
4604 AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
4605 AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin])
4606 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
4607 AC_PLUGIN([zeromq], [$with_libzmq], [ZeroMQ communication plugin])
4608 AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
4610 dnl Default configuration file
4611 # Load either syslog or logfile
4612 LOAD_PLUGIN_SYSLOG=""
4613 LOAD_PLUGIN_LOGFILE=""
4615 AC_MSG_CHECKING([which default log plugin to load])
4616 default_log_plugin="none"
4617 if test "x$enable_syslog" = "xyes"
4619 default_log_plugin="syslog"
4621 LOAD_PLUGIN_SYSLOG="##"
4624 if test "x$enable_logfile" = "xyes"
4626 if test "x$default_log_plugin" = "xnone"
4628 default_log_plugin="logfile"
4630 LOAD_PLUGIN_LOGFILE="#"
4633 LOAD_PLUGIN_LOGFILE="##"
4635 AC_MSG_RESULT([$default_log_plugin])
4637 AC_SUBST(LOAD_PLUGIN_SYSLOG)
4638 AC_SUBST(LOAD_PLUGIN_LOGFILE)
4640 DEFAULT_LOG_LEVEL="info"
4641 if test "x$enable_debug" = "xyes"
4643 DEFAULT_LOG_LEVEL="debug"
4645 AC_SUBST(DEFAULT_LOG_LEVEL)
4647 # Load only one of rrdtool, network, csv in the default config.
4648 LOAD_PLUGIN_RRDTOOL=""
4649 LOAD_PLUGIN_NETWORK=""
4652 AC_MSG_CHECKING([which default write plugin to load])
4653 default_write_plugin="none"
4654 if test "x$enable_rrdtool" = "xyes"
4656 default_write_plugin="rrdtool"
4658 LOAD_PLUGIN_RRDTOOL="##"
4661 if test "x$enable_network" = "xyes"
4663 if test "x$default_write_plugin" = "xnone"
4665 default_write_plugin="network"
4667 LOAD_PLUGIN_NETWORK="#"
4670 LOAD_PLUGIN_NETWORK="##"
4673 if test "x$enable_csv" = "xyes"
4675 if test "x$default_write_plugin" = "xnone"
4677 default_write_plugin="csv"
4682 LOAD_PLUGIN_CSV="##"
4684 AC_MSG_RESULT([$default_write_plugin])
4686 AC_SUBST(LOAD_PLUGIN_RRDTOOL)
4687 AC_SUBST(LOAD_PLUGIN_NETWORK)
4688 AC_SUBST(LOAD_PLUGIN_CSV)
4691 if test "x$ac_system" = "xLinux" \
4692 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
4694 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
4698 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
4700 if test "x$withval" != "xno" && test "x$withval" != "xyes"
4702 PERL_BINDINGS_OPTIONS="$withval"
4703 with_perl_bindings="yes"
4705 PERL_BINDINGS_OPTIONS=""
4706 with_perl_bindings="$withval"
4710 PERL_BINDINGS_OPTIONS=""
4711 if test -n "$perl_interpreter"
4713 with_perl_bindings="yes"
4715 with_perl_bindings="no (no perl interpreter found)"
4718 if test "x$with_perl_bindings" = "xyes"
4720 PERL_BINDINGS="perl"
4724 AC_SUBST(PERL_BINDINGS)
4725 AC_SUBST(PERL_BINDINGS_OPTIONS)
4727 dnl libcollectdclient
4728 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
4729 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
4730 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
4732 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
4734 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
4736 AC_SUBST(LCC_VERSION_MAJOR)
4737 AC_SUBST(LCC_VERSION_MINOR)
4738 AC_SUBST(LCC_VERSION_PATCH)
4739 AC_SUBST(LCC_VERSION_EXTRA)
4740 AC_SUBST(LCC_VERSION_STRING)
4742 AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
4744 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)
4746 if test "x$with_librrd" = "xyes" \
4747 && test "x$librrd_threadsafe" != "xyes"
4749 with_librrd="yes (warning: librrd is not thread-safe)"
4752 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
4754 with_libiptc="yes (shipped version)"
4757 if test "x$with_libperl" = "xyes"
4759 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
4761 enable_perl="no (needs libperl)"
4764 if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"
4766 enable_perl="no (libperl doesn't support ithreads)"
4769 if test "x$with_perl_bindings" = "xyes" \
4770 && test "x$PERL_BINDINGS_OPTIONS" != "x"
4772 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
4779 libcurl . . . . . . . $with_libcurl
4780 libdbi . . . . . . . $with_libdbi
4781 libcredis . . . . . . $with_libcredis
4782 libesmtp . . . . . . $with_libesmtp
4783 libganglia . . . . . $with_libganglia
4784 libgcrypt . . . . . . $with_libgcrypt
4785 libiokit . . . . . . $with_libiokit
4786 libiptc . . . . . . . $with_libiptc
4787 libjvm . . . . . . . $with_java
4788 libkstat . . . . . . $with_kstat
4789 libkvm . . . . . . . $with_libkvm
4790 libmemcached . . . . $with_libmemcached
4791 libmodbus . . . . . . $with_libmodbus
4792 libmysql . . . . . . $with_libmysql
4793 libnetapp . . . . . . $with_libnetapp
4794 libnetlink . . . . . $with_libnetlink
4795 libnetsnmp . . . . . $with_libnetsnmp
4796 libnotify . . . . . . $with_libnotify
4797 liboconfig . . . . . $with_liboconfig
4798 libopenipmi . . . . . $with_libopenipmipthread
4799 liboping . . . . . . $with_liboping
4800 libpcap . . . . . . . $with_libpcap
4801 libperfstat . . . . . $with_perfstat
4802 libperl . . . . . . . $with_libperl
4803 libpq . . . . . . . . $with_libpq
4804 libpthread . . . . . $with_libpthread
4805 librouteros . . . . . $with_librouteros
4806 librrd . . . . . . . $with_librrd
4807 libsensors . . . . . $with_libsensors
4808 libstatgrab . . . . . $with_libstatgrab
4809 libtokyotyrant . . . $with_libtokyotyrant
4810 libupsclient . . . . $with_libupsclient
4811 libvarnish . . . . . $with_libvarnish
4812 libvirt . . . . . . . $with_libvirt
4813 libxml2 . . . . . . . $with_libxml2
4814 libxmms . . . . . . . $with_libxmms
4815 libyajl . . . . . . . $with_libyajl
4816 libevent . . . . . . $with_libevent
4817 libzmq . . . . . . . $with_libzmq
4818 protobuf-c . . . . . $have_protoc_c
4819 oracle . . . . . . . $with_oracle
4820 python . . . . . . . $with_python
4823 daemon mode . . . . . $enable_daemon
4824 debug . . . . . . . . $enable_debug
4827 perl . . . . . . . . $with_perl_bindings
4830 apache . . . . . . . $enable_apache
4831 apcups . . . . . . . $enable_apcups
4832 apple_sensors . . . . $enable_apple_sensors
4833 ascent . . . . . . . $enable_ascent
4834 battery . . . . . . . $enable_battery
4835 bind . . . . . . . . $enable_bind
4836 conntrack . . . . . . $enable_conntrack
4837 contextswitch . . . . $enable_contextswitch
4838 cpu . . . . . . . . . $enable_cpu
4839 cpufreq . . . . . . . $enable_cpufreq
4840 csv . . . . . . . . . $enable_csv
4841 curl . . . . . . . . $enable_curl
4842 curl_json . . . . . . $enable_curl_json
4843 curl_xml . . . . . . $enable_curl_xml
4844 dbi . . . . . . . . . $enable_dbi
4845 df . . . . . . . . . $enable_df
4846 disk . . . . . . . . $enable_disk
4847 dns . . . . . . . . . $enable_dns
4848 email . . . . . . . . $enable_email
4849 entropy . . . . . . . $enable_entropy
4850 exec . . . . . . . . $enable_exec
4851 filecount . . . . . . $enable_filecount
4852 fscache . . . . . . . $enable_fscache
4853 gmond . . . . . . . . $enable_gmond
4854 hddtemp . . . . . . . $enable_hddtemp
4855 interface . . . . . . $enable_interface
4856 ipmi . . . . . . . . $enable_ipmi
4857 iptables . . . . . . $enable_iptables
4858 ipvs . . . . . . . . $enable_ipvs
4859 irq . . . . . . . . . $enable_irq
4860 java . . . . . . . . $enable_java
4861 libvirt . . . . . . . $enable_libvirt
4862 load . . . . . . . . $enable_load
4863 logfile . . . . . . . $enable_logfile
4864 madwifi . . . . . . . $enable_madwifi
4865 match_empty_counter . $enable_match_empty_counter
4866 match_hashed . . . . $enable_match_hashed
4867 match_regex . . . . . $enable_match_regex
4868 match_timediff . . . $enable_match_timediff
4869 match_value . . . . . $enable_match_value
4870 mbmon . . . . . . . . $enable_mbmon
4871 memcachec . . . . . . $enable_memcachec
4872 memcached . . . . . . $enable_memcached
4873 memory . . . . . . . $enable_memory
4874 modbus . . . . . . . $enable_modbus
4875 multimeter . . . . . $enable_multimeter
4876 mysql . . . . . . . . $enable_mysql
4877 netapp . . . . . . . $enable_netapp
4878 netlink . . . . . . . $enable_netlink
4879 network . . . . . . . $enable_network
4880 nfs . . . . . . . . . $enable_nfs
4881 nginx . . . . . . . . $enable_nginx
4882 notify_desktop . . . $enable_notify_desktop
4883 notify_email . . . . $enable_notify_email
4884 ntpd . . . . . . . . $enable_ntpd
4885 nut . . . . . . . . . $enable_nut
4886 olsrd . . . . . . . . $enable_olsrd
4887 onewire . . . . . . . $enable_onewire
4888 openvpn . . . . . . . $enable_openvpn
4889 oracle . . . . . . . $enable_oracle
4890 perl . . . . . . . . $enable_perl
4891 pinba . . . . . . . . $enable_pinba
4892 ping . . . . . . . . $enable_ping
4893 postgresql . . . . . $enable_postgresql
4894 powerdns . . . . . . $enable_powerdns
4895 processes . . . . . . $enable_processes
4896 protocols . . . . . . $enable_protocols
4897 python . . . . . . . $enable_python
4898 redis . . . . . . . . $enable_redis
4899 routeros . . . . . . $enable_routeros
4900 rrdcached . . . . . . $enable_rrdcached
4901 rrdtool . . . . . . . $enable_rrdtool
4902 sensors . . . . . . . $enable_sensors
4903 serial . . . . . . . $enable_serial
4904 snmp . . . . . . . . $enable_snmp
4905 swap . . . . . . . . $enable_swap
4906 syslog . . . . . . . $enable_syslog
4907 table . . . . . . . . $enable_table
4908 tail . . . . . . . . $enable_tail
4909 tape . . . . . . . . $enable_tape
4910 target_notification . $enable_target_notification
4911 target_replace . . . $enable_target_replace
4912 target_scale . . . . $enable_target_scale
4913 target_set . . . . . $enable_target_set
4914 target_v5upgrade . . $enable_target_v5upgrade
4915 tcpconns . . . . . . $enable_tcpconns
4916 teamspeak2 . . . . . $enable_teamspeak2
4917 ted . . . . . . . . . $enable_ted
4918 thermal . . . . . . . $enable_thermal
4919 tokyotyrant . . . . . $enable_tokyotyrant
4920 unixsock . . . . . . $enable_unixsock
4921 uptime . . . . . . . $enable_uptime
4922 users . . . . . . . . $enable_users
4923 uuid . . . . . . . . $enable_uuid
4924 varnish . . . . . . . $enable_varnish
4925 vmem . . . . . . . . $enable_vmem
4926 vserver . . . . . . . $enable_vserver
4927 wireless . . . . . . $enable_wireless
4928 write_http . . . . . $enable_write_http
4929 write_redis . . . . . $enable_write_redis
4930 xmms . . . . . . . . $enable_xmms
4931 zeromq . . . . . . . $enable_zeromq
4932 zfs_arc . . . . . . . $enable_zfs_arc
4936 if test "x$dependency_error" = "xyes"; then
4937 AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
4940 if test "x$dependency_warning" = "xyes"; then
4941 AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
4944 # vim: set fdm=marker :