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 clock_gettime_needs_rt="no"
572 clock_gettime_needs_posix4="no"
573 AC_CHECK_FUNCS(clock_gettime,
575 AC_CHECK_LIB(rt, clock_gettime,
576 [clock_gettime_needs_rt="yes"],
577 AC_CHECK_LIB(posix4, clock_gettime,
578 [clock_gettime_needs_posix4="yes"],
579 AC_MSG_ERROR(cannot find clock_gettime))))
581 nanosleep_needs_rt="no"
582 nanosleep_needs_posix4="no"
583 AC_CHECK_FUNCS(nanosleep,
585 AC_CHECK_LIB(rt, nanosleep,
586 [nanosleep_needs_rt="yes"],
587 AC_CHECK_LIB(posix4, nanosleep,
588 [nanosleep_needs_posix4="yes"],
589 AC_MSG_ERROR(cannot find nanosleep))))
591 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$clock_gettime_needs_rt" = "xyes" || test "x$nanosleep_needs_rt" = "xyes")
592 AM_CONDITIONAL(BUILD_WITH_LIBPOSIX4, test "x$clock_gettime_needs_posix4" = "xyes" || test "x$nanosleep_needs_posix4" = "xyes")
594 AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
595 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
596 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
597 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
598 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
599 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
600 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
601 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
602 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
603 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
604 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
605 AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
606 if test "x$have_swapctl" = "xyes"; then
607 AC_CACHE_CHECK([whether swapctl takes two arguments],
608 [c_cv_have_swapctl_two_args],
610 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
611 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
612 # undef _FILE_OFFSET_BITS
613 # undef _LARGEFILE64_SOURCE
615 #include <sys/stat.h>
616 #include <sys/swap.h>]],
618 int num = swapctl(0, NULL);
621 [c_cv_have_swapctl_two_args="yes"],
622 [c_cv_have_swapctl_two_args="no"]
625 AC_CACHE_CHECK([whether swapctl takes three arguments],
626 [c_cv_have_swapctl_three_args],
628 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
629 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
630 # undef _FILE_OFFSET_BITS
631 # undef _LARGEFILE64_SOURCE
633 #include <sys/stat.h>
634 #include <sys/swap.h>]],
636 int num = swapctl(0, NULL,0);
639 [c_cv_have_swapctl_three_args="yes"],
640 [c_cv_have_swapctl_three_args="no"]
644 # Check for different versions of `swapctl' here..
645 if test "x$have_swapctl" = "xyes"; then
646 if test "x$c_cv_have_swapctl_two_args" = "xyes"; then
647 AC_DEFINE(HAVE_SWAPCTL_TWO_ARGS, 1,
648 [Define if the function swapctl exists and takes two arguments.])
650 if test "x$c_cv_have_swapctl_three_args" = "xyes"; then
651 AC_DEFINE(HAVE_SWAPCTL_THREE_ARGS, 1,
652 [Define if the function swapctl exists and takes three arguments.])
657 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
660 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
662 if test "x$withval" = "xno"; then
664 else if test "x$withval" = "xyes"; then
671 if test "x$nan_type" = "xnone"; then
672 AC_CACHE_CHECK([whether NAN is defined by default],
673 [c_cv_have_nan_default],
679 static float foo = NAN;
687 [c_cv_have_nan_default="yes"],
688 [c_cv_have_nan_default="no"]
691 if test "x$c_cv_have_nan_default" = "xyes"
696 if test "x$nan_type" = "xnone"; then
697 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
698 [c_cv_have_nan_isoc],
703 #define __USE_ISOC99 1
705 static float foo = NAN;
713 [c_cv_have_nan_isoc="yes"],
714 [c_cv_have_nan_isoc="no"]
717 if test "x$c_cv_have_nan_isoc" = "xyes"
722 if test "x$nan_type" = "xnone"; then
723 SAVE_LDFLAGS=$LDFLAGS
724 LDFLAGS="$LDFLAGS -lm"
725 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
726 [c_cv_have_nan_zero],
735 #define NAN (0.0 / 0.0)
737 # define isnan(f) ((f) != (f))
739 static float foo = NAN;
747 [c_cv_have_nan_zero="yes"],
748 [c_cv_have_nan_zero="no"]
751 LDFLAGS=$SAVE_LDFLAGS
752 if test "x$c_cv_have_nan_zero" = "xyes"
758 if test "x$nan_type" = "xdefault"; then
759 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
760 [Define if NAN is defined by default and can initialize static variables.])
761 else if test "x$nan_type" = "xisoc99"; then
762 AC_DEFINE(NAN_STATIC_ISOC, 1,
763 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
764 else if test "x$nan_type" = "xzero"; then
765 AC_DEFINE(NAN_ZERO_ZERO, 1,
766 [Define if NAN can be defined as (0.0 / 0.0)])
768 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
771 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
773 if test "x$withval" = "xnothing"; then
774 fp_layout_type="nothing"
775 else if test "x$withval" = "xendianflip"; then
776 fp_layout_type="endianflip"
777 else if test "x$withval" = "xintswap"; then
778 fp_layout_type="intswap"
780 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
783 [fp_layout_type="unknown"])
785 if test "x$fp_layout_type" = "xunknown"; then
786 AC_CACHE_CHECK([if doubles are stored in x86 representation],
787 [c_cv_fp_layout_need_nothing],
798 # include <inttypes.h>
801 # include <stdbool.h>
811 memcpy ((void *) &i0, (void *) &d, 8);
814 memcpy ((void *) c, (void *) &i1, 8);
816 if ((c[0] == 0x2f) && (c[1] == 0x25)
817 && (c[2] == 0xc0) && (c[3] == 0xc7)
818 && (c[4] == 0x43) && (c[5] == 0x2b)
819 && (c[6] == 0x1f) && (c[7] == 0x5b))
824 [c_cv_fp_layout_need_nothing="yes"],
825 [c_cv_fp_layout_need_nothing="no"]
828 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
829 fp_layout_type="nothing"
832 if test "x$fp_layout_type" = "xunknown"; then
833 AC_CACHE_CHECK([if endianflip converts to x86 representation],
834 [c_cv_fp_layout_need_endianflip],
845 # include <inttypes.h>
848 # include <stdbool.h>
850 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
851 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
852 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
853 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
854 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
855 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
856 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
857 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
866 memcpy ((void *) &i0, (void *) &d, 8);
868 i1 = endianflip (i0);
869 memcpy ((void *) c, (void *) &i1, 8);
871 if ((c[0] == 0x2f) && (c[1] == 0x25)
872 && (c[2] == 0xc0) && (c[3] == 0xc7)
873 && (c[4] == 0x43) && (c[5] == 0x2b)
874 && (c[6] == 0x1f) && (c[7] == 0x5b))
879 [c_cv_fp_layout_need_endianflip="yes"],
880 [c_cv_fp_layout_need_endianflip="no"]
883 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
884 fp_layout_type="endianflip"
887 if test "x$fp_layout_type" = "xunknown"; then
888 AC_CACHE_CHECK([if intswap converts to x86 representation],
889 [c_cv_fp_layout_need_intswap],
900 # include <inttypes.h>
903 # include <stdbool.h>
905 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
906 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
915 memcpy ((void *) &i0, (void *) &d, 8);
918 memcpy ((void *) c, (void *) &i1, 8);
920 if ((c[0] == 0x2f) && (c[1] == 0x25)
921 && (c[2] == 0xc0) && (c[3] == 0xc7)
922 && (c[4] == 0x43) && (c[5] == 0x2b)
923 && (c[6] == 0x1f) && (c[7] == 0x5b))
928 [c_cv_fp_layout_need_intswap="yes"],
929 [c_cv_fp_layout_need_intswap="no"]
932 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
933 fp_layout_type="intswap"
937 if test "x$fp_layout_type" = "xnothing"; then
938 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
939 [Define if doubles are stored in x86 representation.])
940 else if test "x$fp_layout_type" = "xendianflip"; then
941 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
942 [Define if endianflip is needed to convert to x86 representation.])
943 else if test "x$fp_layout_type" = "xintswap"; then
944 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
945 [Define if intswap is needed to convert to x86 representation.])
947 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
951 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
953 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
955 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
958 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
959 if test "x$have_getmntent" = "xno"; then
960 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
962 if test "x$have_getmntent" = "xno"; then
963 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
965 if test "x$have_getmntent" = "xno"; then
966 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
969 if test "x$have_getmntent" = "xc"; then
970 AC_CACHE_CHECK([whether getmntent takes one argument],
971 [c_cv_have_one_getmntent],
973 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
974 #include "$srcdir/src/utils_mount.h"]],
978 fh = setmntent ("/etc/mtab", "r");
982 [c_cv_have_one_getmntent="yes"],
983 [c_cv_have_one_getmntent="no"]
986 AC_CACHE_CHECK([whether getmntent takes two arguments],
987 [c_cv_have_two_getmntent],
989 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
990 #include "$srcdir/src/utils_mount.h"]],
995 fh = fopen ("/etc/mnttab", "r");
996 status = getmntent (fh, &mt);
999 [c_cv_have_two_getmntent="yes"],
1000 [c_cv_have_two_getmntent="no"]
1005 # Check for different versions of `getmntent' here..
1007 if test "x$have_getmntent" = "xc"; then
1008 if test "x$c_cv_have_one_getmntent" = "xyes"; then
1009 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
1010 [Define if the function getmntent exists and takes one argument.])
1012 if test "x$c_cv_have_two_getmntent" = "xyes"; then
1013 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
1014 [Define if the function getmntent exists and takes two arguments.])
1017 if test "x$have_getmntent" = "xsun"; then
1018 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
1019 [Define if the function getmntent exists. It's the version from libsun.])
1021 if test "x$have_getmntent" = "xseq"; then
1022 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
1023 [Define if the function getmntent exists. It's the version from libseq.])
1025 if test "x$have_getmntent" = "xgen"; then
1026 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
1027 [Define if the function getmntent exists. It's the version from libgen.])
1031 AC_MSG_CHECKING([if have htonll defined])
1036 #include <sys/types.h>
1037 #include <netinet/in.h>
1039 # include <inttypes.h>
1046 AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.])
1049 AC_MSG_RESULT([$have_htonll])
1051 # Check for structures
1052 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
1053 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
1056 #include <sys/types.h>
1057 #include <sys/socket.h>
1060 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
1061 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
1064 #include <sys/types.h>
1065 #include <sys/socket.h>
1066 #include <linux/if.h>
1067 #include <linux/netdevice.h>
1070 AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [],
1073 #include <netinet/in.h>
1077 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
1079 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
1080 [Define if struct kinfo_proc exists in the FreeBSD variant.])
1081 have_struct_kinfo_proc_freebsd="yes"
1084 have_struct_kinfo_proc_freebsd="no"
1088 #include <sys/param.h>
1089 #include <sys/sysctl.h>
1090 #include <sys/user.h>
1093 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
1095 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
1096 [Define if struct kinfo_proc exists in the OpenBSD variant.])
1097 have_struct_kinfo_proc_openbsd="yes"
1100 have_struct_kinfo_proc_openbsd="no"
1103 #include <sys/param.h>
1104 #include <sys/sysctl.h>
1108 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
1109 [#define _BSD_SOURCE
1111 # include <stdint.h>
1113 #if HAVE_SYS_TYPES_H
1114 # include <sys/types.h>
1116 #if HAVE_NETINET_IN_SYSTM_H
1117 # include <netinet/in_systm.h>
1119 #if HAVE_NETINET_IN_H
1120 # include <netinet/in.h>
1122 #if HAVE_NETINET_IP_H
1123 # include <netinet/ip.h>
1125 #if HAVE_NETINET_UDP_H
1126 # include <netinet/udp.h>
1129 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
1130 [#define _BSD_SOURCE
1132 # include <stdint.h>
1134 #if HAVE_SYS_TYPES_H
1135 # include <sys/types.h>
1137 #if HAVE_NETINET_IN_SYSTM_H
1138 # include <netinet/in_systm.h>
1140 #if HAVE_NETINET_IN_H
1141 # include <netinet/in.h>
1143 #if HAVE_NETINET_IP_H
1144 # include <netinet/ip.h>
1146 #if HAVE_NETINET_UDP_H
1147 # include <netinet/udp.h>
1151 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
1161 # Checks for libraries begin here
1163 with_libresolv="yes"
1164 AC_CHECK_LIB(resolv, res_search,
1166 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
1168 [with_libresolv="no"])
1169 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
1171 dnl Check for HAL (hardware abstraction library)
1173 AC_CHECK_LIB(hal,libhal_device_property_exists,
1174 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
1176 if test "x$with_libhal" = "xyes"; then
1177 if test "x$PKG_CONFIG" != "x"; then
1178 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
1179 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
1180 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
1181 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
1185 m4_divert_once([HELP_WITH], [
1186 collectd additional packages:])
1188 AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
1190 if test "x$ac_system" = "xAIX"
1195 with_perfstat="no (AIX only)"
1196 with_procinfo="no (AIX only)"
1199 if test "x$with_perfstat" = "xyes"
1201 AC_CHECK_LIB(perfstat, perfstat_reset, [with_perfstat="yes"], [with_perfstat="no (perfstat not found)"], [])
1202 # AC_CHECK_HEADERS(sys/protosw.h libperfstat.h,, [with_perfstat="no (perfstat not found)"])
1204 if test "x$with_perfstat" = "xyes"
1206 AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)])
1208 AM_CONDITIONAL(BUILD_WITH_PERFSTAT, test "x$with_perfstat" = "xyes")
1210 # Processes plugin under AIX.
1211 if test "x$with_procinfo" = "xyes"
1213 AC_CHECK_HEADERS(procinfo.h,, [with_procinfo="no (procinfo.h not found)"])
1215 if test "x$with_procinfo" = "xyes"
1217 AC_DEFINE(HAVE_PROCINFO_H, 1, [Define to 1 if you have the procinfo.h])
1220 if test "x$ac_system" = "xSolaris"
1225 with_kstat="no (Solaris only)"
1226 with_devinfo="no (Solaris only)"
1229 if test "x$with_kstat" = "xyes"
1231 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1233 if test "x$with_kstat" = "xyes"
1235 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1236 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1238 if test "x$with_kstat" = "xyes"
1240 AC_DEFINE(HAVE_LIBKSTAT, 1,
1241 [Define to 1 if you have the 'kstat' library (-lkstat)])
1243 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1244 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1247 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1254 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1257 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1258 if test "x$with_kvm_getprocs" = "xyes"
1260 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1261 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1264 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1266 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1267 if test "x$with_kvm_getswapinfo" = "xyes"
1269 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1270 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1273 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1275 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1276 if test "x$with_kvm_nlist" = "xyes"
1278 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1279 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1282 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1284 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1285 if test "x$with_kvm_openfiles" = "xyes"
1287 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1288 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1291 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1293 # --with-libcredis {{{
1294 AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])],
1296 if test "x$withval" = "xyes"
1298 with_libcredis="yes"
1299 else if test "x$withval" = "xno"
1303 with_libcredis="yes"
1304 LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS -I$withval/include"
1305 LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS -L$withval/lib"
1308 [with_libcredis="yes"])
1310 SAVE_CPPFLAGS="$CPPFLAGS"
1311 SAVE_LDFLAGS="$LDFLAGS"
1313 CPPFLAGS="$CPPFLAGS $LIBCREDIS_CPPFLAGS"
1314 LDFLAGS="$LDFLAGS $LIBCREDIS_LDFLAGS"
1316 if test "x$with_libcredis" = "xyes"
1318 if test "x$LIBCREDIS_CPPFLAGS" != "x"
1320 AC_MSG_NOTICE([libcredis CPPFLAGS: $LIBCREDIS_CPPFLAGS])
1322 AC_CHECK_HEADERS(credis.h,
1323 [with_libcredis="yes"],
1324 [with_libcredis="no ('credis.h' not found)"])
1326 if test "x$with_libcredis" = "xyes"
1328 if test "x$LIBCREDIS_LDFLAGS" != "x"
1330 AC_MSG_NOTICE([libcredis LDFLAGS: $LIBCREDIS_LDFLAGS])
1332 AC_CHECK_LIB(credis, credis_info,
1333 [with_libcredis="yes"],
1334 [with_libcredis="no (symbol 'credis_info' not found)"])
1338 CPPFLAGS="$SAVE_CPPFLAGS"
1339 LDFLAGS="$SAVE_LDFLAGS"
1341 if test "x$with_libcredis" = "xyes"
1343 BUILD_WITH_LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS"
1344 BUILD_WITH_LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS"
1345 AC_SUBST(BUILD_WITH_LIBCREDIS_CPPFLAGS)
1346 AC_SUBST(BUILD_WITH_LIBCREDIS_LDFLAGS)
1348 AM_CONDITIONAL(BUILD_WITH_LIBCREDIS, test "x$with_libcredis" = "xyes")
1351 # --with-libcurl {{{
1352 with_curl_config="curl-config"
1355 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1357 if test "x$withval" = "xno"
1360 else if test "x$withval" = "xyes"
1364 if test -f "$withval" && test -x "$withval"
1366 with_curl_config="$withval"
1368 else if test -x "$withval/bin/curl-config"
1370 with_curl_config="$withval/bin/curl-config"
1379 if test "x$with_libcurl" = "xyes"
1381 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1382 curl_config_status=$?
1384 if test $curl_config_status -ne 0
1386 with_libcurl="no ($with_curl_config failed)"
1388 SAVE_CPPFLAGS="$CPPFLAGS"
1389 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1391 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1393 CPPFLAGS="$SAVE_CPPFLAGS"
1396 if test "x$with_libcurl" = "xyes"
1398 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1399 curl_config_status=$?
1401 if test $curl_config_status -ne 0
1403 with_libcurl="no ($with_curl_config failed)"
1405 AC_CHECK_LIB(curl, curl_easy_init,
1406 [with_libcurl="yes"],
1407 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1411 if test "x$with_libcurl" = "xyes"
1413 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1414 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1415 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1416 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1418 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1422 with_libdbi_cppflags=""
1423 with_libdbi_ldflags=""
1424 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1426 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1428 with_libdbi_cppflags="-I$withval/include"
1429 with_libdbi_ldflags="-L$withval/lib"
1432 with_libdbi="$withval"
1438 if test "x$with_libdbi" = "xyes"
1440 SAVE_CPPFLAGS="$CPPFLAGS"
1441 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1443 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1445 CPPFLAGS="$SAVE_CPPFLAGS"
1447 if test "x$with_libdbi" = "xyes"
1449 SAVE_CPPFLAGS="$CPPFLAGS"
1450 SAVE_LDFLAGS="$LDFLAGS"
1451 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1452 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1454 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1456 CPPFLAGS="$SAVE_CPPFLAGS"
1457 LDFLAGS="$SAVE_LDFLAGS"
1459 if test "x$with_libdbi" = "xyes"
1461 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1462 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1463 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1464 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1465 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1466 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1468 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1471 # --with-libesmtp {{{
1472 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1474 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1476 LDFLAGS="$LDFLAGS -L$withval/lib"
1477 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1480 with_libesmtp="$withval"
1486 if test "x$with_libesmtp" = "xyes"
1488 AC_CHECK_LIB(esmtp, smtp_create_session,
1490 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1491 ], [with_libesmtp="no (libesmtp not found)"])
1493 if test "x$with_libesmtp" = "xyes"
1495 AC_CHECK_HEADERS(libesmtp.h,
1497 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1498 ], [with_libesmtp="no (libesmtp.h not found)"])
1500 if test "x$with_libesmtp" = "xyes"
1506 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1507 [Wether or not to use the esmtp library])
1508 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1511 # --with-libganglia {{{
1512 AC_ARG_WITH(libganglia, [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
1514 if test -f "$withval" && test -x "$withval"
1516 with_libganglia_config="$withval"
1517 with_libganglia="yes"
1518 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"
1520 with_libganglia_config="$withval/bin/ganglia-config"
1521 with_libganglia="yes"
1522 else if test -d "$withval"
1524 GANGLIA_CPPFLAGS="-I$withval/include"
1525 GANGLIA_LDFLAGS="-L$withval/lib"
1526 with_libganglia="yes"
1528 with_libganglia_config="ganglia-config"
1529 with_libganglia="$withval"
1533 with_libganglia_config="ganglia-config"
1534 with_libganglia="yes"
1537 if test "x$with_libganglia" = "xyes" && test "x$with_libganglia_config" != "x"
1539 if test "x$GANGLIA_CPPFLAGS" = "x"
1541 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
1544 if test "x$GANGLIA_LDFLAGS" = "x"
1546 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
1549 if test "x$GANGLIA_LIBS" = "x"
1551 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
1555 SAVE_CPPFLAGS="$CPPFLAGS"
1556 SAVE_LDFLAGS="$LDFLAGS"
1557 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
1558 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
1560 if test "x$with_libganglia" = "xyes"
1562 AC_CHECK_HEADERS(gm_protocol.h,
1564 AC_DEFINE(HAVE_GM_PROTOCOL_H, 1,
1565 [Define to 1 if you have the <gm_protocol.h> header file.])
1566 ], [with_libganglia="no (gm_protocol.h not found)"])
1569 if test "x$with_libganglia" = "xyes"
1571 AC_CHECK_LIB(ganglia, xdr_Ganglia_value_msg,
1573 AC_DEFINE(HAVE_LIBGANGLIA, 1,
1574 [Define to 1 if you have the ganglia library (-lganglia).])
1575 ], [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"])
1578 CPPFLAGS="$SAVE_CPPFLAGS"
1579 LDFLAGS="$SAVE_LDFLAGS"
1581 AC_SUBST(GANGLIA_CPPFLAGS)
1582 AC_SUBST(GANGLIA_LDFLAGS)
1583 AC_SUBST(GANGLIA_LIBS)
1584 AM_CONDITIONAL(BUILD_WITH_LIBGANGLIA, test "x$with_libganglia" = "xyes")
1587 # --with-libgcrypt {{{
1588 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
1589 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
1590 GCRYPT_LIBS="$GCRYPT_LIBS"
1591 AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
1593 if test -f "$withval" && test -x "$withval"
1595 with_libgcrypt_config="$withval"
1596 with_libgcrypt="yes"
1597 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"
1599 with_libgcrypt_config="$withval/bin/gcrypt-config"
1600 with_libgcrypt="yes"
1601 else if test -d "$withval"
1603 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
1604 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
1605 with_libgcrypt="yes"
1607 with_libgcrypt_config="gcrypt-config"
1608 with_libgcrypt="$withval"
1612 with_libgcrypt_config="libgcrypt-config"
1613 with_libgcrypt="yes"
1616 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"
1618 if test "x$GCRYPT_CPPFLAGS" = "x"
1620 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
1623 if test "x$GCRYPT_LDFLAGS" = "x"
1625 gcrypt_exec_prefix=`"$with_libgcrypt_config" --exec-prefix 2>/dev/null`
1626 GCRYPT_LDFLAGS="-L$gcrypt_exec_prefix/lib"
1629 if test "x$GCRYPT_LIBS" = "x"
1631 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
1635 SAVE_CPPFLAGS="$CPPFLAGS"
1636 SAVE_LDFLAGS="$LDFLAGS"
1637 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
1638 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
1640 if test "x$with_libgcrypt" = "xyes"
1642 if test "x$GCRYPT_CPPFLAGS" != "x"
1644 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
1646 AC_CHECK_HEADERS(gcrypt.h,
1647 [with_libgcrypt="yes"],
1648 [with_libgcrypt="no (gcrypt.h not found)"])
1651 if test "x$with_libgcrypt" = "xyes"
1653 if test "x$GCRYPT_LDFLAGS" != "x"
1655 AC_MSG_NOTICE([gcrypt LDFLAGS: $GCRYPT_LDFLAGS])
1657 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
1658 [with_libgcrypt="yes"],
1659 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
1661 if test "$with_libgcrypt" != "no"; then
1662 AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")
1666 CPPFLAGS="$SAVE_CPPFLAGS"
1667 LDFLAGS="$SAVE_LDFLAGS"
1669 if test "x$with_libgcrypt" = "xyes"
1671 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to 1 if you have the gcrypt library (-lgcrypt).])
1674 AC_SUBST(GCRYPT_CPPFLAGS)
1675 AC_SUBST(GCRYPT_LDFLAGS)
1676 AC_SUBST(GCRYPT_LIBS)
1677 AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes")
1680 # --with-libiptc {{{
1681 with_own_libiptc="no"
1682 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1684 if test "x$withval" = "xshipped"
1686 with_own_libiptc="yes"
1688 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1690 LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
1691 LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
1694 with_libiptc="$withval"
1698 if test "x$ac_system" = "xLinux"
1702 with_libiptc="no (Linux only)"
1705 SAVE_CPPFLAGS="$CPPFLAGS"
1706 SAVE_LDFLAGS="$LDFLAGS"
1707 CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
1708 LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS"
1709 # check whether the header file for libiptc is available.
1710 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1712 AC_CHECK_HEADERS(libiptc/libiptc.h,
1714 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1718 with_own_libiptc="yes"
1721 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1723 AC_CHECK_HEADERS(libiptc/libip6tc.h,
1725 AC_DEFINE(HAVE_LIBIPTC_LIBIP6TC_H, 1, [Define to 1 if you have the <libiptc/libip6tc.h> header file.])
1729 with_own_libiptc="yes"
1732 # If the header file is available, check for the required type declaractions.
1733 # They may be missing in old versions of libiptc. In that case, they will be
1734 # declared in the iptables plugin.
1735 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1737 AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
1740 # include "$srcdir/src/owniptc/libiptc.h"
1741 # include "$srcdir/src/owniptc/libip6tc.h"
1743 # include <libiptc/libiptc.h>
1744 # include <libiptc/libip6tc.h>
1748 # Check for the iptc_init symbol in the library.
1749 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1751 AC_CHECK_LIB(iptc, iptc_init,
1753 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1757 with_own_libiptc="yes"
1760 # The system wide version failed for some reason. Check if we have the required
1761 # headers to build the shipped version.
1762 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
1764 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
1766 with_libiptc="no (Linux iptables headers not found)"
1767 with_own_libiptc="no"
1770 #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
1773 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1774 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1775 if test "x$with_libiptc" = "xyes"
1777 BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
1778 BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
1779 AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
1780 AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
1782 if test "x$with_own_libiptc" = "xyes"
1784 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1786 CPPFLAGS="$SAVE_CPPFLAGS"
1787 LDFLAGS="$SAVE_LDFLAGS"
1791 with_java_home="$JAVA_HOME"
1792 with_java_vmtype="client"
1797 AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
1799 if test "x$withval" = "xno"
1802 else if test "x$withval" = "xyes"
1806 with_java_home="$withval"
1811 if test "x$with_java" = "xyes"
1813 if test -d "$with_java_home"
1815 AC_MSG_CHECKING([for jni.h])
1816 TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1817 if test "x$TMPDIR" != "x"
1819 AC_MSG_RESULT([found in $TMPDIR])
1820 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1822 AC_MSG_RESULT([not found])
1825 AC_MSG_CHECKING([for jni_md.h])
1826 TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1827 if test "x$TMPDIR" != "x"
1829 AC_MSG_RESULT([found in $TMPDIR])
1830 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1832 AC_MSG_RESULT([not found])
1835 AC_MSG_CHECKING([for libjvm.so])
1836 TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
1837 if test "x$TMPDIR" != "x"
1839 AC_MSG_RESULT([found in $TMPDIR])
1840 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR"
1842 AC_MSG_RESULT([not found])
1845 if test "x$JAVAC" = "x"
1847 AC_MSG_CHECKING([for javac])
1848 TMPDIR=`find "$with_java_home" -name javac -type f | head -n 1`
1849 if test "x$TMPDIR" != "x"
1852 AC_MSG_RESULT([$JAVAC])
1854 AC_MSG_RESULT([not found])
1857 if test "x$JAR" = "x"
1859 AC_MSG_CHECKING([for jar])
1860 TMPDIR=`find "$with_java_home" -name jar -type f | head -n 1`
1861 if test "x$TMPDIR" != "x"
1864 AC_MSG_RESULT([$JAR])
1866 AC_MSG_RESULT([not found])
1869 else if test "x$with_java_home" != "x"
1871 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
1875 if test "x$JAVA_CPPFLAGS" != "x"
1877 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
1879 if test "x$JAVA_CFLAGS" != "x"
1881 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
1883 if test "x$JAVA_LDFLAGS" != "x"
1885 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
1887 if test "x$JAVAC" = "x"
1889 with_javac_path="$PATH"
1890 if test "x$with_java_home" != "x"
1892 with_javac_path="$with_java_home:with_javac_path"
1893 if test -d "$with_java_home/bin"
1895 with_javac_path="$with_java_home/bin:with_javac_path"
1899 AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path")
1901 if test "x$JAVAC" = "x"
1903 with_java="no (javac not found)"
1905 if test "x$JAR" = "x"
1907 with_jar_path="$PATH"
1908 if test "x$with_java_home" != "x"
1910 with_jar_path="$with_java_home:$with_jar_path"
1911 if test -d "$with_java_home/bin"
1913 with_jar_path="$with_java_home/bin:$with_jar_path"
1917 AC_PATH_PROG(JAR, jar, [], "$with_jar_path")
1919 if test "x$JAR" = "x"
1921 with_java="no (jar not found)"
1924 SAVE_CPPFLAGS="$CPPFLAGS"
1925 SAVE_CFLAGS="$CFLAGS"
1926 SAVE_LDFLAGS="$LDFLAGS"
1927 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
1928 CFLAGS="$CFLAGS $JAVA_CFLAGS"
1929 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
1931 if test "x$with_java" = "xyes"
1933 AC_CHECK_HEADERS(jni.h, [], [with_java="no (jni.h not found)"])
1935 if test "x$with_java" = "xyes"
1937 AC_CHECK_LIB(jvm, JNI_CreateJavaVM,
1939 [with_java="no (libjvm not found)"],
1942 if test "x$with_java" = "xyes"
1944 JAVA_LIBS="$JAVA_LIBS -ljvm"
1945 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
1948 CPPFLAGS="$SAVE_CPPFLAGS"
1949 CFLAGS="$SAVE_CFLAGS"
1950 LDFLAGS="$SAVE_LDFLAGS"
1952 AC_SUBST(JAVA_CPPFLAGS)
1953 AC_SUBST(JAVA_CFLAGS)
1954 AC_SUBST(JAVA_LDFLAGS)
1956 AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
1959 # --with-libmemcached {{{
1960 with_libmemcached_cppflags=""
1961 with_libmemcached_ldflags=""
1962 AC_ARG_WITH(libmemcached, [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
1964 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1966 with_libmemcached_cppflags="-I$withval/include"
1967 with_libmemcached_ldflags="-L$withval/lib"
1968 with_libmemcached="yes"
1970 with_libmemcached="$withval"
1974 with_libmemcached="yes"
1976 if test "x$with_libmemcached" = "xyes"
1978 SAVE_CPPFLAGS="$CPPFLAGS"
1979 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1981 AC_CHECK_HEADERS(libmemcached/memcached.h, [with_libmemcached="yes"], [with_libmemcached="no (libmemcached/memcached.h not found)"])
1983 CPPFLAGS="$SAVE_CPPFLAGS"
1985 if test "x$with_libmemcached" = "xyes"
1987 SAVE_CPPFLAGS="$CPPFLAGS"
1988 SAVE_LDFLAGS="$LDFLAGS"
1989 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1990 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
1992 AC_CHECK_LIB(memcached, memcached_create, [with_libmemcached="yes"], [with_libmemcached="no (Symbol 'memcached_create' not found)"])
1994 CPPFLAGS="$SAVE_CPPFLAGS"
1995 LDFLAGS="$SAVE_LDFLAGS"
1997 if test "x$with_libmemcached" = "xyes"
1999 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
2000 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
2001 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
2002 AC_SUBST(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
2003 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
2004 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LIBS)
2005 AC_DEFINE(HAVE_LIBMEMCACHED, 1, [Define if libmemcached is present and usable.])
2007 AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
2010 # --with-libmodbus {{{
2011 with_libmodbus_config=""
2012 with_libmodbus_cflags=""
2013 with_libmodbus_libs=""
2014 AC_ARG_WITH(libmodbus, [AS_HELP_STRING([--with-libmodbus@<:@=PREFIX@:>@], [Path to the modbus library.])],
2016 if test "x$withval" = "xno"
2019 else if test "x$withval" = "xyes"
2021 with_libmodbus="use_pkgconfig"
2022 else if test -d "$with_libmodbus/lib"
2024 AC_MSG_NOTICE([Not checking for libmodbus: Manually configured])
2025 with_libmodbus_cflags="-I$withval/include"
2026 with_libmodbus_libs="-L$withval/lib -lmodbus"
2027 with_libmodbus="yes"
2030 [with_libmodbus="use_pkgconfig"])
2032 # configure using pkg-config
2033 if test "x$with_libmodbus" = "xuse_pkgconfig"
2035 if test "x$PKG_CONFIG" = "x"
2037 with_libmodbus="no (Don't have pkg-config)"
2040 if test "x$with_libmodbus" = "xuse_pkgconfig"
2042 AC_MSG_NOTICE([Checking for modbus using $PKG_CONFIG])
2043 $PKG_CONFIG --exists 'modbus' 2>/dev/null
2046 with_libmodbus="no (pkg-config doesn't know library)"
2049 if test "x$with_libmodbus" = "xuse_pkgconfig"
2051 with_libmodbus_cflags="`$PKG_CONFIG --cflags 'modbus'`"
2054 with_libmodbus="no ($PKG_CONFIG failed)"
2056 with_libmodbus_libs="`$PKG_CONFIG --libs 'modbus'`"
2059 with_libmodbus="no ($PKG_CONFIG failed)"
2062 if test "x$with_libmodbus" = "xuse_pkgconfig"
2064 with_libmodbus="yes"
2067 # with_libmodbus_cflags and with_libmodbus_libs are set up now, let's do
2068 # the actual checks.
2069 if test "x$with_libmodbus" = "xyes"
2071 SAVE_CPPFLAGS="$CPPFLAGS"
2072 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
2074 AC_CHECK_HEADERS(modbus/modbus.h, [], [with_libmodbus="no (modbus/modbus.h not found)"])
2076 CPPFLAGS="$SAVE_CPPFLAGS"
2078 if test "x$with_libmodbus" = "xyes"
2080 SAVE_CPPFLAGS="$CPPFLAGS"
2081 SAVE_LDFLAGS="$LDFLAGS"
2083 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
2084 LDFLAGS="$LDFLAGS $with_libmodbus_libs"
2086 AC_CHECK_LIB(modbus, modbus_init_tcp,
2087 [with_libmodbus="yes"],
2088 [with_libmodbus="no (symbol modbus_init_tcp not found)"])
2090 CPPFLAGS="$SAVE_CPPFLAGS"
2091 LDFLAGS="$SAVE_LDFLAGS"
2093 if test "x$with_libmodbus" = "xyes"
2095 BUILD_WITH_LIBMODBUS_CFLAGS="$with_libmodbus_cflags"
2096 BUILD_WITH_LIBMODBUS_LIBS="$with_libmodbus_libs"
2097 AC_SUBST(BUILD_WITH_LIBMODBUS_CFLAGS)
2098 AC_SUBST(BUILD_WITH_LIBMODBUS_LIBS)
2102 # --with-libmysql {{{
2103 with_mysql_config="mysql_config"
2104 with_mysql_cflags=""
2106 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
2108 if test "x$withval" = "xno"
2111 else if test "x$withval" = "xyes"
2115 if test -f "$withval" && test -x "$withval";
2117 with_mysql_config="$withval"
2118 else if test -x "$withval/bin/mysql_config"
2120 with_mysql_config="$withval/bin/mysql_config"
2128 if test "x$with_libmysql" = "xyes"
2130 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
2131 mysql_config_status=$?
2133 if test $mysql_config_status -ne 0
2135 with_libmysql="no ($with_mysql_config failed)"
2137 SAVE_CPPFLAGS="$CPPFLAGS"
2138 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
2141 have_mysql_mysql_h="no"
2142 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
2144 if test "x$have_mysql_h" = "xno"
2146 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
2149 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
2151 with_libmysql="no (mysql.h not found)"
2154 CPPFLAGS="$SAVE_CPPFLAGS"
2157 if test "x$with_libmysql" = "xyes"
2159 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
2160 mysql_config_status=$?
2162 if test $mysql_config_status -ne 0
2164 with_libmysql="no ($with_mysql_config failed)"
2166 AC_CHECK_LIB(mysqlclient, mysql_init,
2167 [with_libmysql="yes"],
2168 [with_libmysql="no (symbol 'mysql_init' not found)"],
2171 AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
2172 [with_libmysql="yes"],
2173 [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
2177 if test "x$with_libmysql" = "xyes"
2179 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
2180 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
2181 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
2182 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
2184 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
2187 # --with-libnetlink {{{
2188 with_libnetlink_cflags=""
2189 with_libnetlink_libs="-lnetlink"
2190 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
2192 echo "libnetlink: withval = $withval"
2193 if test "x$withval" = "xyes"
2195 with_libnetlink="yes"
2196 else if test "x$withval" = "xno"
2198 with_libnetlink="no"
2200 if test -d "$withval/include"
2202 with_libnetlink_cflags="-I$withval/include"
2203 with_libnetlink_libs="-L$withval/lib -lnetlink"
2204 with_libnetlink="yes"
2206 AC_MSG_ERROR("no such directory: $withval/include")
2211 if test "x$ac_system" = "xLinux"
2213 with_libnetlink="yes"
2215 with_libnetlink="no (Linux only library)"
2218 if test "x$with_libnetlink" = "xyes"
2220 SAVE_CFLAGS="$CFLAGS"
2221 CFLAGS="$CFLAGS $with_libnetlink_cflags"
2223 with_libnetlink="no (libnetlink.h not found)"
2225 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
2227 with_libnetlink="yes"
2231 #include <sys/types.h>
2232 #include <asm/types.h>
2233 #include <sys/socket.h>
2234 #include <linux/netlink.h>
2235 #include <linux/rtnetlink.h>])
2236 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
2238 #include <sys/types.h>
2239 #include <asm/types.h>
2240 #include <sys/socket.h>])
2244 #include <sys/types.h>
2245 #include <asm/types.h>
2246 #include <sys/socket.h>
2247 #include <linux/netlink.h>
2248 #include <linux/rtnetlink.h>
2252 int retval = TCA_STATS2;
2255 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
2260 #include <sys/types.h>
2261 #include <asm/types.h>
2262 #include <sys/socket.h>
2263 #include <linux/netlink.h>
2264 #include <linux/rtnetlink.h>
2268 int retval = TCA_STATS;
2271 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
2274 CFLAGS="$SAVE_CFLAGS"
2276 if test "x$with_libnetlink" = "xyes"
2278 AC_CHECK_LIB(netlink, rtnl_open,
2279 [with_libnetlink="yes"],
2280 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
2281 [$with_libnetlink_libs])
2283 if test "x$with_libnetlink" = "xyes"
2285 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
2286 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
2287 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
2288 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
2290 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
2293 # --with-libnetapp {{{
2294 AC_ARG_VAR([LIBNETAPP_CPPFLAGS], [C preprocessor flags required to build with libnetapp])
2295 AC_ARG_VAR([LIBNETAPP_LDFLAGS], [Linker flags required to build with libnetapp])
2296 AC_ARG_VAR([LIBNETAPP_LIBS], [Other libraries required to link against libnetapp])
2297 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS"
2298 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS"
2299 LIBNETAPP_LIBS="$LIBNETAPP_LIBS"
2300 AC_ARG_WITH(libnetapp, [AS_HELP_STRING([--with-libnetapp@<:@=PREFIX@:>@], [Path to libnetapp.])],
2302 if test -d "$withval"
2304 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS -I$withval/include"
2305 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS -L$withval/lib"
2306 with_libnetapp="yes"
2308 with_libnetapp="$withval"
2312 with_libnetapp="yes"
2315 SAVE_CPPFLAGS="$CPPFLAGS"
2316 SAVE_LDFLAGS="$LDFLAGS"
2317 CPPFLAGS="$CPPFLAGS $LIBNETAPP_CPPFLAGS"
2318 LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
2320 if test "x$with_libnetapp" = "xyes"
2322 if test "x$LIBNETAPP_CPPFLAGS" != "x"
2324 AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
2326 AC_CHECK_HEADERS(netapp_api.h,
2327 [with_libnetapp="yes"],
2328 [with_libnetapp="no (netapp_api.h not found)"])
2331 if test "x$with_libnetapp" = "xyes"
2333 if test "x$LIBNETAPP_LDFLAGS" != "x"
2335 AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
2338 if test "x$LIBNETAPP_LIBS" = "x"
2340 LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm -lcrypto -lz"
2342 AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
2344 AC_CHECK_LIB(netapp, na_server_invoke_elem,
2345 [with_libnetapp="yes"],
2346 [with_libnetapp="no (symbol na_server_invoke_elem not found)"],
2348 LIBNETAPP_LIBS="-lnetapp $LIBNETAPP_LIBS"
2351 CPPFLAGS="$SAVE_CPPFLAGS"
2352 LDFLAGS="$SAVE_LDFLAGS"
2354 if test "x$with_libnetapp" = "xyes"
2356 AC_DEFINE(HAVE_LIBNETAPP, 1, [Define to 1 if you have the netapp library (-lnetapp).])
2359 AC_SUBST(LIBNETAPP_CPPFLAGS)
2360 AC_SUBST(LIBNETAPP_LDFLAGS)
2361 AC_SUBST(LIBNETAPP_LIBS)
2362 AM_CONDITIONAL(BUILD_WITH_LIBNETAPP, test "x$with_libnetapp" = "xyes")
2365 # --with-libnetsnmp {{{
2366 with_snmp_config="net-snmp-config"
2369 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
2371 if test "x$withval" = "xno"
2373 with_libnetsnmp="no"
2374 else if test "x$withval" = "xyes"
2376 with_libnetsnmp="yes"
2378 if test -x "$withval"
2380 with_snmp_config="$withval"
2381 with_libnetsnmp="yes"
2383 with_snmp_config="$withval/bin/net-snmp-config"
2384 with_libnetsnmp="yes"
2388 [with_libnetsnmp="yes"])
2389 if test "x$with_libnetsnmp" = "xyes"
2391 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
2392 snmp_config_status=$?
2394 if test $snmp_config_status -ne 0
2396 with_libnetsnmp="no ($with_snmp_config failed)"
2398 SAVE_CPPFLAGS="$CPPFLAGS"
2399 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
2401 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
2403 CPPFLAGS="$SAVE_CPPFLAGS"
2406 if test "x$with_libnetsnmp" = "xyes"
2408 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
2409 snmp_config_status=$?
2411 if test $snmp_config_status -ne 0
2413 with_libnetsnmp="no ($with_snmp_config failed)"
2415 AC_CHECK_LIB(netsnmp, init_snmp,
2416 [with_libnetsnmp="yes"],
2417 [with_libnetsnmp="no (libnetsnmp not found)"],
2421 if test "x$with_libnetsnmp" = "xyes"
2423 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
2424 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
2425 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
2426 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
2428 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
2431 # --with-liboconfig {{{
2432 with_own_liboconfig="no"
2433 liboconfig_LDFLAGS="$LDFLAGS"
2434 liboconfig_CPPFLAGS="$CPPFLAGS"
2435 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
2437 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2439 if test -d "$withval/lib"
2441 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
2443 if test -d "$withval/include"
2445 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
2448 if test "x$withval" = "xno"
2450 AC_MSG_ERROR("liboconfig is required")
2454 with_liboconfig="yes"
2457 save_LDFLAGS="$LDFLAGS"
2458 save_CPPFLAGS="$CPPFLAGS"
2459 LDFLAGS="$liboconfig_LDFLAGS"
2460 CPPFLAGS="$liboconfig_CPPFLAGS"
2461 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
2463 with_liboconfig="yes"
2464 with_own_liboconfig="no"
2467 with_liboconfig="yes"
2468 with_own_liboconfig="yes"
2469 LDFLAGS="$save_LDFLAGS"
2470 CPPFLAGS="$save_CPPFLAGS"
2473 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
2474 if test "x$with_own_liboconfig" = "xyes"
2476 with_liboconfig="yes (shipped version)"
2480 # --with-liboping {{{
2481 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
2483 if test "x$withval" = "xyes"
2486 else if test "x$withval" = "xno"
2491 LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS -I$withval/include"
2492 LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS -L$withval/lib"
2495 [with_liboping="yes"])
2497 SAVE_CPPFLAGS="$CPPFLAGS"
2498 SAVE_LDFLAGS="$LDFLAGS"
2500 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
2501 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
2503 if test "x$with_liboping" = "xyes"
2505 if test "x$LIBOPING_CPPFLAGS" != "x"
2507 AC_MSG_NOTICE([liboping CPPFLAGS: $LIBOPING_CPPFLAGS])
2509 AC_CHECK_HEADERS(oping.h,
2510 [with_liboping="yes"],
2511 [with_liboping="no ('oping.h' not found)"])
2513 if test "x$with_liboping" = "xyes"
2515 if test "x$LIBOPING_LDFLAGS" != "x"
2517 AC_MSG_NOTICE([liboping LDFLAGS: $LIBOPING_LDFLAGS])
2519 AC_CHECK_LIB(oping, ping_construct,
2520 [with_liboping="yes"],
2521 [with_liboping="no (symbol 'ping_construct' not found)"])
2524 CPPFLAGS="$SAVE_CPPFLAGS"
2525 LDFLAGS="$SAVE_LDFLAGS"
2527 if test "x$with_liboping" = "xyes"
2529 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
2530 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
2531 AC_SUBST(BUILD_WITH_LIBOPING_CPPFLAGS)
2532 AC_SUBST(BUILD_WITH_LIBOPING_LDFLAGS)
2534 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
2538 with_oracle_cppflags=""
2540 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
2542 if test "x$withval" = "xyes"
2544 if test "x$ORACLE_HOME" = "x"
2546 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
2549 else if test "x$withval" = "xno"
2554 ORACLE_HOME="$withval"
2558 if test "x$ORACLE_HOME" = "x"
2560 with_oracle="no (ORACLE_HOME is not set)"
2565 if test "x$ORACLE_HOME" != "x"
2567 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
2569 if test -e "$ORACLE_HOME/lib/ldflags"
2571 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
2573 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
2574 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
2576 if test "x$with_oracle" = "xyes"
2578 SAVE_CPPFLAGS="$CPPFLAGS"
2579 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2581 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
2583 CPPFLAGS="$SAVE_CPPFLAGS"
2585 if test "x$with_oracle" = "xyes"
2587 SAVE_CPPFLAGS="$CPPFLAGS"
2588 SAVE_LDFLAGS="$LDFLAGS"
2589 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2590 LDFLAGS="$LDFLAGS $with_oracle_libs"
2592 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
2594 CPPFLAGS="$SAVE_CPPFLAGS"
2595 LDFLAGS="$SAVE_LDFLAGS"
2597 if test "x$with_oracle" = "xyes"
2599 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
2600 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
2601 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
2602 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
2606 # --with-libowcapi {{{
2607 with_libowcapi_cppflags=""
2608 with_libowcapi_libs="-lowcapi"
2609 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
2611 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2613 with_libowcapi_cppflags="-I$withval/include"
2614 with_libowcapi_libs="-L$withval/lib -lowcapi"
2615 with_libowcapi="yes"
2617 with_libowcapi="$withval"
2621 with_libowcapi="yes"
2623 if test "x$with_libowcapi" = "xyes"
2625 SAVE_CPPFLAGS="$CPPFLAGS"
2626 CPPFLAGS="$with_libowcapi_cppflags"
2628 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
2630 CPPFLAGS="$SAVE_CPPFLAGS"
2632 if test "x$with_libowcapi" = "xyes"
2634 SAVE_LDFLAGS="$LDFLAGS"
2635 SAVE_CPPFLAGS="$CPPFLAGS"
2636 LDFLAGS="$with_libowcapi_libs"
2637 CPPFLAGS="$with_libowcapi_cppflags"
2639 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
2641 LDFLAGS="$SAVE_LDFLAGS"
2642 CPPFLAGS="$SAVE_CPPFLAGS"
2644 if test "x$with_libowcapi" = "xyes"
2646 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
2647 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
2648 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
2649 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
2653 # --with-libpcap {{{
2654 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
2656 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2658 LDFLAGS="$LDFLAGS -L$withval/lib"
2659 CPPFLAGS="$CPPFLAGS -I$withval/include"
2662 with_libpcap="$withval"
2668 if test "x$with_libpcap" = "xyes"
2670 AC_CHECK_LIB(pcap, pcap_open_live,
2672 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
2673 ], [with_libpcap="no (libpcap not found)"])
2675 if test "x$with_libpcap" = "xyes"
2677 AC_CHECK_HEADERS(pcap.h,
2679 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
2680 ], [with_libpcap="no (pcap.h not found)"])
2682 if test "x$with_libpcap" = "xyes"
2688 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
2689 [Wether or not to use the pcap library])
2690 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
2693 # --with-libperl {{{
2694 perl_interpreter="perl"
2695 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
2697 if test -x "$withval"
2699 perl_interpreter="$withval"
2701 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
2703 LDFLAGS="$LDFLAGS -L$withval/lib"
2704 CPPFLAGS="$CPPFLAGS -I$withval/include"
2705 perl_interpreter="$withval/bin/perl"
2708 with_libperl="$withval"
2715 AC_MSG_CHECKING([for perl])
2716 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
2717 if test -x "$perl_interpreter"
2719 AC_MSG_RESULT([yes ($perl_interpreter)])
2725 AC_SUBST(PERL, "$perl_interpreter")
2727 if test "x$with_libperl" = "xyes" \
2728 && test -n "$perl_interpreter"
2730 SAVE_CFLAGS="$CFLAGS"
2731 SAVE_LDFLAGS="$LDFLAGS"
2732 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
2733 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
2734 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
2735 CFLAGS="$CFLAGS $PERL_CFLAGS"
2736 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2738 AC_CACHE_CHECK([for libperl],
2739 [c_cv_have_libperl],
2743 #define PERL_NO_GET_CONTEXT
2750 load_module (PERL_LOADMOD_NOIMPORT,
2751 newSVpv ("Collectd::Plugin::FooBar", 24),
2754 [c_cv_have_libperl="yes"],
2755 [c_cv_have_libperl="no"]
2759 if test "x$c_cv_have_libperl" = "xyes"
2761 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
2762 AC_SUBST(PERL_CFLAGS)
2763 AC_SUBST(PERL_LDFLAGS)
2768 CFLAGS="$SAVE_CFLAGS"
2769 LDFLAGS="$SAVE_LDFLAGS"
2770 else if test -z "$perl_interpreter"; then
2771 with_libperl="no (no perl interpreter found)"
2772 c_cv_have_libperl="no"
2774 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
2776 if test "x$with_libperl" = "xyes"
2778 SAVE_CFLAGS="$CFLAGS"
2779 SAVE_LDFLAGS="$LDFLAGS"
2780 CFLAGS="$CFLAGS $PERL_CFLAGS"
2781 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2783 AC_CACHE_CHECK([if perl supports ithreads],
2784 [c_cv_have_perl_ithreads],
2792 #if !defined(USE_ITHREADS)
2793 # error "Perl does not support ithreads!"
2794 #endif /* !defined(USE_ITHREADS) */
2797 [c_cv_have_perl_ithreads="yes"],
2798 [c_cv_have_perl_ithreads="no"]
2802 if test "x$c_cv_have_perl_ithreads" = "xyes"
2804 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
2807 CFLAGS="$SAVE_CFLAGS"
2808 LDFLAGS="$SAVE_LDFLAGS"
2811 if test "x$with_libperl" = "xyes"
2813 SAVE_CFLAGS="$CFLAGS"
2814 SAVE_LDFLAGS="$LDFLAGS"
2815 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
2816 # (see issues #41 and #42)
2817 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
2818 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2820 AC_CACHE_CHECK([for broken Perl_load_module()],
2821 [c_cv_have_broken_perl_load_module],
2825 #define PERL_NO_GET_CONTEXT
2832 load_module (PERL_LOADMOD_NOIMPORT,
2833 newSVpv ("Collectd::Plugin::FooBar", 24),
2836 [c_cv_have_broken_perl_load_module="no"],
2837 [c_cv_have_broken_perl_load_module="yes"]
2841 CFLAGS="$SAVE_CFLAGS"
2842 LDFLAGS="$SAVE_LDFLAGS"
2844 AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
2845 test "x$c_cv_have_broken_perl_load_module" = "xyes")
2847 if test "x$with_libperl" = "xyes"
2849 SAVE_CFLAGS="$CFLAGS"
2850 SAVE_LDFLAGS="$LDFLAGS"
2851 CFLAGS="$CFLAGS $PERL_CFLAGS"
2852 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2855 [struct mgvtbl.svt_local],
2856 [have_struct_mgvtbl_svt_local="yes"],
2857 [have_struct_mgvtbl_svt_local="no"],
2864 if test "x$have_struct_mgvtbl_svt_local" = "xyes"
2866 AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
2867 [Define if Perl's struct mgvtbl has member svt_local.])
2870 CFLAGS="$SAVE_CFLAGS"
2871 LDFLAGS="$SAVE_LDFLAGS"
2876 with_pg_config="pg_config"
2877 with_libpq_includedir=""
2878 with_libpq_libdir=""
2879 with_libpq_cppflags=""
2880 with_libpq_ldflags=""
2881 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2884 if test "x$withval" = "xno"
2887 else if test "x$withval" = "xyes"
2891 if test -f "$withval" && test -x "$withval";
2893 with_pg_config="$withval"
2894 else if test -x "$withval/bin/pg_config"
2896 with_pg_config="$withval/bin/pg_config"
2904 if test "x$with_libpq" = "xyes"
2906 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2909 if test $pg_config_status -eq 0
2911 if test -n "$with_libpq_includedir"; then
2912 for dir in $with_libpq_includedir; do
2913 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2917 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2920 SAVE_CPPFLAGS="$CPPFLAGS"
2921 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2923 AC_CHECK_HEADERS(libpq-fe.h, [],
2924 [with_libpq="no (libpq-fe.h not found)"], [])
2926 CPPFLAGS="$SAVE_CPPFLAGS"
2928 if test "x$with_libpq" = "xyes"
2930 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2933 if test $pg_config_status -eq 0
2935 if test -n "$with_libpq_libdir"; then
2936 for dir in $with_libpq_libdir; do
2937 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2941 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2944 SAVE_LDFLAGS="$LDFLAGS"
2945 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2947 AC_CHECK_LIB(pq, PQconnectdb,
2949 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2951 AC_CHECK_LIB(pq, PQserverVersion,
2953 [with_libpq="no (symbol 'PQserverVersion' not found)"])
2955 LDFLAGS="$SAVE_LDFLAGS"
2957 if test "x$with_libpq" = "xyes"
2959 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2960 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2961 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2962 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2964 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2967 # --with-libpthread {{{
2968 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
2969 [ if test "x$withval" != "xno" \
2970 && test "x$withval" != "xyes"
2972 LDFLAGS="$LDFLAGS -L$withval/lib"
2973 CPPFLAGS="$CPPFLAGS -I$withval/include"
2974 with_libpthread="yes"
2976 if test "x$withval" = "xno"
2978 with_libpthread="no (disabled)"
2981 ], [with_libpthread="yes"])
2982 if test "x$with_libpthread" = "xyes"
2984 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
2987 if test "x$with_libpthread" = "xyes"
2989 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
2991 if test "x$with_libpthread" = "xyes"
2997 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
2998 [Wether or not to use pthread (POSIX threads) library])
2999 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
3004 with_python_path="$PATH"
3005 AC_ARG_WITH(python, [AS_HELP_STRING([--with-python@<:@=PREFIX@:>@], [Path to the python interpreter.])],
3007 if test "x$withval" = "xyes" || test "x$withval" = "xno"
3009 with_python="$withval"
3010 else if test -x "$withval"
3012 with_python_prog="$withval"
3013 with_python_path="`dirname \"$withval\"`$PATH_SEPARATOR$with_python_path"
3015 else if test -d "$withval"
3017 with_python_path="$withval$PATH_SEPARATOR$with_python_path"
3020 AC_MSG_WARN([Argument not recognized: $withval])
3022 ], [with_python="yes"])
3025 SAVE_CPPFLAGS="$CPPFLAGS"
3026 SAVE_LDFLAGS="$LDFLAGS"
3029 PATH="$with_python_path"
3031 if test "x$with_python" = "xyes" && test "x$with_python_prog" = "x"
3033 AC_MSG_CHECKING([for python])
3034 with_python_prog="`which python 2>/dev/null`"
3035 if test "x$with_python_prog" = "x"
3037 AC_MSG_RESULT([not found])
3038 with_python="no (interpreter not found)"
3040 AC_MSG_RESULT([$with_python_prog])
3044 if test "x$with_python" = "xyes"
3046 AC_MSG_CHECKING([for Python CPPFLAGS])
3047 python_include_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_python_inc())" | "$with_python_prog" 2>&1`
3048 python_config_status=$?
3050 if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x"
3052 AC_MSG_RESULT([failed with status $python_config_status (output: $python_include_path)])
3055 AC_MSG_RESULT([$python_include_path])
3059 if test "x$with_python" = "xyes"
3061 CPPFLAGS="-I$python_include_path $CPPFLAGS"
3062 AC_CHECK_HEADERS(Python.h,
3063 [with_python="yes"],
3064 [with_python="no ('Python.h' not found)"])
3067 if test "x$with_python" = "xyes"
3069 AC_MSG_CHECKING([for Python LDFLAGS])
3070 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`
3071 python_config_status=$?
3073 if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x"
3075 AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_path)])
3078 AC_MSG_RESULT([$python_library_path])
3082 if test "x$with_python" = "xyes"
3084 AC_MSG_CHECKING([for Python LIBS])
3085 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`
3086 python_config_status=$?
3088 if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
3090 AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_flags)])
3093 AC_MSG_RESULT([$python_library_flags])
3097 if test "x$with_python" = "xyes"
3099 LDFLAGS="-L$python_library_path $LDFLAGS"
3100 LIBS="$python_library_flags $LIBS"
3102 AC_CHECK_FUNC(PyObject_CallFunction,
3103 [with_python="yes"],
3104 [with_python="no (Symbol 'PyObject_CallFunction' not found)"])
3108 CPPFLAGS="$SAVE_CPPFLAGS"
3109 LDFLAGS="$SAVE_LDFLAGS"
3112 if test "x$with_python" = "xyes"
3114 BUILD_WITH_PYTHON_CPPFLAGS="-I$python_include_path"
3115 BUILD_WITH_PYTHON_LDFLAGS="-L$python_library_path"
3116 BUILD_WITH_PYTHON_LIBS="$python_library_flags"
3117 AC_SUBST(BUILD_WITH_PYTHON_CPPFLAGS)
3118 AC_SUBST(BUILD_WITH_PYTHON_LDFLAGS)
3119 AC_SUBST(BUILD_WITH_PYTHON_LIBS)
3123 # --with-librouteros {{{
3124 AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
3126 if test "x$withval" = "xyes"
3128 with_librouteros="yes"
3129 else if test "x$withval" = "xno"
3131 with_librouteros="no"
3133 with_librouteros="yes"
3134 LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS -I$withval/include"
3135 LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS -L$withval/lib"
3138 [with_librouteros="yes"])
3140 SAVE_CPPFLAGS="$CPPFLAGS"
3141 SAVE_LDFLAGS="$LDFLAGS"
3143 CPPFLAGS="$CPPFLAGS $LIBROUTEROS_CPPFLAGS"
3144 LDFLAGS="$LDFLAGS $LIBROUTEROS_LDFLAGS"
3146 if test "x$with_librouteros" = "xyes"
3148 if test "x$LIBROUTEROS_CPPFLAGS" != "x"
3150 AC_MSG_NOTICE([librouteros CPPFLAGS: $LIBROUTEROS_CPPFLAGS])
3152 AC_CHECK_HEADERS(routeros_api.h,
3153 [with_librouteros="yes"],
3154 [with_librouteros="no ('routeros_api.h' not found)"])
3156 if test "x$with_librouteros" = "xyes"
3158 if test "x$LIBROUTEROS_LDFLAGS" != "x"
3160 AC_MSG_NOTICE([librouteros LDFLAGS: $LIBROUTEROS_LDFLAGS])
3162 AC_CHECK_LIB(routeros, ros_interface,
3163 [with_librouteros="yes"],
3164 [with_librouteros="no (symbol 'ros_interface' not found)"])
3167 CPPFLAGS="$SAVE_CPPFLAGS"
3168 LDFLAGS="$SAVE_LDFLAGS"
3170 if test "x$with_librouteros" = "xyes"
3172 BUILD_WITH_LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS"
3173 BUILD_WITH_LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS"
3174 AC_SUBST(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
3175 AC_SUBST(BUILD_WITH_LIBROUTEROS_LDFLAGS)
3177 AM_CONDITIONAL(BUILD_WITH_LIBROUTEROS, test "x$with_librouteros" = "xyes")
3181 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
3184 librrd_threadsafe="yes"
3185 librrd_rrdc_update="no"
3186 AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
3187 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
3189 librrd_cflags="-I$withval/include"
3190 librrd_ldflags="-L$withval/lib"
3193 with_librrd="$withval"
3195 ], [with_librrd="yes"])
3196 if test "x$with_librrd" = "xyes"
3198 SAVE_CPPFLAGS="$CPPFLAGS"
3199 SAVE_LDFLAGS="$LDFLAGS"
3201 CPPFLAGS="$CPPFLAGS $librrd_cflags"
3202 LDFLAGS="$LDFLAGS $librrd_ldflags"
3204 AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
3206 CPPFLAGS="$SAVE_CPPFLAGS"
3207 LDFLAGS="$SAVE_LDFLAGS"
3209 if test "x$with_librrd" = "xyes"
3211 SAVE_CPPFLAGS="$CPPFLAGS"
3212 SAVE_LDFLAGS="$LDFLAGS"
3214 CPPFLAGS="$CPPFLAGS $librrd_cflags"
3215 LDFLAGS="$LDFLAGS $librrd_ldflags"
3217 AC_CHECK_LIB(rrd_th, rrd_update_r,
3219 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
3221 [librrd_threadsafe="no"
3222 AC_CHECK_LIB(rrd, rrd_update,
3224 librrd_ldflags="$librrd_ldflags -lrrd -lm"
3226 [with_librrd="no (symbol 'rrd_update' not found)"],
3231 if test "x$librrd_threadsafe" = "xyes"
3233 AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
3235 AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
3238 CPPFLAGS="$SAVE_CPPFLAGS"
3239 LDFLAGS="$SAVE_LDFLAGS"
3241 if test "x$with_librrd" = "xyes"
3243 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
3244 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
3245 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
3246 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
3248 if test "x$librrd_threadsafe" = "xyes"
3250 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
3254 # --with-libsensors {{{
3255 with_sensors_cflags=""
3256 with_sensors_ldflags=""
3257 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
3259 if test "x$withval" = "xno"
3261 with_libsensors="no"
3263 with_libsensors="yes"
3264 if test "x$withval" != "xyes"
3266 with_sensors_cflags="-I$withval/include"
3267 with_sensors_ldflags="-L$withval/lib"
3268 with_libsensors="yes"
3273 if test "x$ac_system" = "xLinux"
3275 with_libsensors="yes"
3277 with_libsensors="no (Linux only library)"
3280 if test "x$with_libsensors" = "xyes"
3282 SAVE_CPPFLAGS="$CPPFLAGS"
3283 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
3285 # AC_CHECK_HEADERS(sensors/sensors.h,
3287 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
3289 # [with_libsensors="no (sensors/sensors.h not found)"])
3290 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
3292 CPPFLAGS="$SAVE_CPPFLAGS"
3294 if test "x$with_libsensors" = "xyes"
3296 SAVE_CPPFLAGS="$CPPFLAGS"
3297 SAVE_LDFLAGS="$LDFLAGS"
3298 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
3299 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
3301 AC_CHECK_LIB(sensors, sensors_init,
3303 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
3305 [with_libsensors="no (libsensors not found)"])
3307 CPPFLAGS="$SAVE_CPPFLAGS"
3308 LDFLAGS="$SAVE_LDFLAGS"
3310 if test "x$with_libsensors" = "xyes"
3312 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
3313 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
3314 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
3315 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
3317 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
3320 # --with-libstatgrab {{{
3321 with_libstatgrab_cflags=""
3322 with_libstatgrab_ldflags=""
3323 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
3325 if test "x$withval" != "xno" \
3326 && test "x$withval" != "xyes"
3328 with_libstatgrab_cflags="-I$withval/include"
3329 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
3330 with_libstatgrab="yes"
3331 with_libstatgrab_pkg_config="no"
3333 with_libstatgrab="$withval"
3334 with_libstatgrab_pkg_config="yes"
3338 with_libstatgrab="yes"
3339 with_libstatgrab_pkg_config="yes"
3342 if test "x$with_libstatgrab" = "xyes" \
3343 && test "x$with_libstatgrab_pkg_config" = "xyes"
3345 if test "x$PKG_CONFIG" != "x"
3347 AC_MSG_CHECKING([pkg-config for libstatgrab])
3349 $PKG_CONFIG --exists libstatgrab 2>/dev/null
3352 with_libstatgrab_pkg_config="no"
3353 with_libstatgrab="no ($PKG_CONFIG doesn't know libstatgrab)"
3354 temp_result="not found"
3356 AC_MSG_RESULT([$temp_result])
3358 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
3359 with_libstatgrab_pkg_config="no"
3360 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
3364 if test "x$with_libstatgrab" = "xyes" \
3365 && test "x$with_libstatgrab_pkg_config" = "xyes" \
3366 && test "x$with_libstatgrab_cflags" = "x"
3368 AC_MSG_CHECKING([for libstatgrab CFLAGS])
3369 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
3372 with_libstatgrab_cflags="$temp_result"
3374 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
3375 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
3377 AC_MSG_RESULT([$temp_result])
3380 if test "x$with_libstatgrab" = "xyes" \
3381 && test "x$with_libstatgrab_pkg_config" = "xyes" \
3382 && test "x$with_libstatgrab_ldflags" = "x"
3384 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
3385 temp_result="`$PKG_CONFIG --libs libstatgrab`"
3388 with_libstatgrab_ldflags="$temp_result"
3390 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
3391 temp_result="$PKG_CONFIG --libs libstatgrab failed"
3393 AC_MSG_RESULT([$temp_result])
3396 if test "x$with_libstatgrab" = "xyes"
3398 SAVE_CPPFLAGS="$CPPFLAGS"
3399 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
3401 AC_CHECK_HEADERS(statgrab.h,
3402 [with_libstatgrab="yes"],
3403 [with_libstatgrab="no (statgrab.h not found)"])
3405 CPPFLAGS="$SAVE_CPPFLAGS"
3408 if test "x$with_libstatgrab" = "xyes"
3410 SAVE_CFLAGS="$CFLAGS"
3411 SAVE_LDFLAGS="$LDFLAGS"
3413 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
3414 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
3416 AC_CHECK_LIB(statgrab, sg_init,
3417 [with_libstatgrab="yes"],
3418 [with_libstatgrab="no (symbol sg_init not found)"])
3420 CFLAGS="$SAVE_CFLAGS"
3421 LDFLAGS="$SAVE_LDFLAGS"
3424 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
3425 if test "x$with_libstatgrab" = "xyes"
3427 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
3428 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
3429 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
3430 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
3431 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
3435 # --with-libtokyotyrant {{{
3436 with_libtokyotyrant_cppflags=""
3437 with_libtokyotyrant_ldflags=""
3438 with_libtokyotyrant_libs=""
3439 AC_ARG_WITH(libtokyotyrant, [AS_HELP_STRING([--with-libtokyotyrant@<:@=PREFIX@:>@], [Path to libtokyotyrant.])],
3441 if test "x$withval" = "xno"
3443 with_libtokyotyrant="no"
3444 else if test "x$withval" = "xyes"
3446 with_libtokyotyrant="yes"
3448 with_libtokyotyrant_cppflags="-I$withval/include"
3449 with_libtokyotyrant_ldflags="-L$withval/include"
3450 with_libtokyotyrant_libs="-ltokyotyrant"
3451 with_libtokyotyrant="yes"
3455 with_libtokyotyrant="yes"
3458 if test "x$with_libtokyotyrant" = "xyes"
3460 if $PKG_CONFIG --exists tokyotyrant
3462 with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
3463 with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `pkg-config --libs-only-L tokyotyrant`"
3464 with_libtokyotyrant_libs="$with_libtokyotyrant_libs `pkg-config --libs-only-l tokyotyrant`"
3468 SAVE_CPPFLAGS="$CPPFLAGS"
3469 SAVE_LDFLAGS="$LDFLAGS"
3470 CPPFLAGS="$CPPFLAGS $with_libtokyotyrant_cppflags"
3471 LDFLAGS="$LDFLAGS $with_libtokyotyrant_ldflags"
3473 if test "x$with_libtokyotyrant" = "xyes"
3475 AC_CHECK_HEADERS(tcrdb.h,
3477 AC_DEFINE(HAVE_TCRDB_H, 1,
3478 [Define to 1 if you have the <tcrdb.h> header file.])
3479 ], [with_libtokyotyrant="no (tcrdb.h not found)"])
3482 if test "x$with_libtokyotyrant" = "xyes"
3484 AC_CHECK_LIB(tokyotyrant, tcrdbrnum,
3486 AC_DEFINE(HAVE_LIBTOKYOTYRANT, 1,
3487 [Define to 1 if you have the tokyotyrant library (-ltokyotyrant).])
3489 [with_libtokyotyrant="no (symbol tcrdbrnum not found)"],
3490 [$with_libtokyotyrant_libs])
3493 CPPFLAGS="$SAVE_CPPFLAGS"
3494 LDFLAGS="$SAVE_LDFLAGS"
3496 if test "x$with_libtokyotyrant" = "xyes"
3498 BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
3499 BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
3500 BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
3501 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
3502 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
3503 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
3505 AM_CONDITIONAL(BUILD_WITH_LIBTOKYOTYRANT, test "x$with_libtokyotyrant" = "xyes")
3508 # --with-libupsclient {{{
3509 with_libupsclient_config=""
3510 with_libupsclient_cflags=""
3511 with_libupsclient_libs=""
3512 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
3514 if test "x$withval" = "xno"
3516 with_libupsclient="no"
3517 else if test "x$withval" = "xyes"
3519 with_libupsclient="use_pkgconfig"
3521 if test -x "$withval"
3523 with_libupsclient_config="$withval"
3524 with_libupsclient="use_libupsclient_config"
3525 else if test -x "$withval/bin/libupsclient-config"
3527 with_libupsclient_config="$withval/bin/libupsclient-config"
3528 with_libupsclient="use_libupsclient_config"
3530 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
3531 with_libupsclient_cflags="-I$withval/include"
3532 with_libupsclient_libs="-L$withval/lib -lupsclient"
3533 with_libupsclient="yes"
3537 [with_libupsclient="use_pkgconfig"])
3539 # configure using libupsclient-config
3540 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3542 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
3543 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
3546 with_libupsclient="no ($with_libupsclient_config failed)"
3548 with_libupsclient_libs="`$with_libupsclient_config --libs`"
3551 with_libupsclient="no ($with_libupsclient_config failed)"
3554 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3556 with_libupsclient="yes"
3559 # configure using pkg-config
3560 if test "x$with_libupsclient" = "xuse_pkgconfig"
3562 if test "x$PKG_CONFIG" = "x"
3564 with_libupsclient="no (Don't have pkg-config)"
3567 if test "x$with_libupsclient" = "xuse_pkgconfig"
3569 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
3570 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
3573 with_libupsclient="no (pkg-config doesn't know library)"
3576 if test "x$with_libupsclient" = "xuse_pkgconfig"
3578 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
3581 with_libupsclient="no ($PKG_CONFIG failed)"
3583 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
3586 with_libupsclient="no ($PKG_CONFIG failed)"
3589 if test "x$with_libupsclient" = "xuse_pkgconfig"
3591 with_libupsclient="yes"
3594 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
3595 # the actual checks.
3596 if test "x$with_libupsclient" = "xyes"
3598 SAVE_CPPFLAGS="$CPPFLAGS"
3599 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3601 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
3603 CPPFLAGS="$SAVE_CPPFLAGS"
3605 if test "x$with_libupsclient" = "xyes"
3607 SAVE_CPPFLAGS="$CPPFLAGS"
3608 SAVE_LDFLAGS="$LDFLAGS"
3610 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3611 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
3613 AC_CHECK_LIB(upsclient, upscli_connect,
3614 [with_libupsclient="yes"],
3615 [with_libupsclient="no (symbol upscli_connect not found)"])
3617 CPPFLAGS="$SAVE_CPPFLAGS"
3618 LDFLAGS="$SAVE_LDFLAGS"
3620 if test "x$with_libupsclient" = "xyes"
3622 SAVE_CPPFLAGS="$CPPFLAGS"
3623 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3625 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
3626 [#include <stdlib.h>
3628 #include <upsclient.h>])
3630 CPPFLAGS="$SAVE_CPPFLAGS"
3632 if test "x$with_libupsclient" = "xyes"
3634 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
3635 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
3636 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
3637 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
3641 # --with-libxmms {{{
3642 with_xmms_config="xmms-config"
3645 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
3647 if test "x$withval" != "xno" \
3648 && test "x$withval" != "xyes"
3650 if test -f "$withval" && test -x "$withval";
3652 with_xmms_config="$withval"
3653 else if test -x "$withval/bin/xmms-config"
3655 with_xmms_config="$withval/bin/xmms-config"
3658 else if test "x$withval" = "xno"
3668 if test "x$with_libxmms" = "xyes"
3670 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
3671 xmms_config_status=$?
3673 if test $xmms_config_status -ne 0
3678 if test "x$with_libxmms" = "xyes"
3680 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
3681 xmms_config_status=$?
3683 if test $xmms_config_status -ne 0
3688 if test "x$with_libxmms" = "xyes"
3690 AC_CHECK_LIB(xmms, xmms_remote_get_info,
3692 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
3693 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
3694 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
3695 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
3702 with_libxmms_numeric=0
3703 if test "x$with_libxmms" = "xyes"
3705 with_libxmms_numeric=1
3707 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
3708 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
3711 # --with-libyajl {{{
3712 with_libyajl_cppflags=""
3713 with_libyajl_ldflags=""
3714 AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
3716 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3718 with_libyajl_cppflags="-I$withval/include"
3719 with_libyajl_ldflags="-L$withval/lib"
3722 with_libyajl="$withval"
3728 if test "x$with_libyajl" = "xyes"
3730 SAVE_CPPFLAGS="$CPPFLAGS"
3731 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3733 AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"])
3735 CPPFLAGS="$SAVE_CPPFLAGS"
3737 if test "x$with_libyajl" = "xyes"
3739 SAVE_CPPFLAGS="$CPPFLAGS"
3740 SAVE_LDFLAGS="$LDFLAGS"
3741 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3742 LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
3744 AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"])
3746 CPPFLAGS="$SAVE_CPPFLAGS"
3747 LDFLAGS="$SAVE_LDFLAGS"
3749 if test "x$with_libyajl" = "xyes"
3751 BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
3752 BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
3753 BUILD_WITH_LIBYAJL_LIBS="-lyajl"
3754 AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS)
3755 AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS)
3756 AC_SUBST(BUILD_WITH_LIBYAJL_LIBS)
3757 AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.])
3759 AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
3762 # --with-libvarnish {{{
3763 with_libvarnish_cppflags=""
3764 with_libvarnish_cflags=""
3765 with_libvarnish_libs=""
3766 AC_ARG_WITH(libvarnish, [AS_HELP_STRING([--with-libvarnish@<:@=PREFIX@:>@], [Path to libvarnish.])],
3768 if test "x$withval" = "xno"
3770 with_libvarnish="no"
3771 else if test "x$withval" = "xyes"
3773 with_libvarnish="use_pkgconfig"
3774 else if test -d "$with_libvarnish/lib"
3776 AC_MSG_NOTICE([Not checking for libvarnish: Manually configured])
3777 with_libvarnish_cflags="-I$withval/include"
3778 with_libvarnish_libs="-L$withval/lib -lvarnish -lvarnishcompat -lvarnishapi"
3779 with_libvarnish="yes"
3782 [with_libvarnish="use_pkgconfig"])
3784 # configure using pkg-config
3785 if test "x$with_libvarnish" = "xuse_pkgconfig"
3787 if test "x$PKG_CONFIG" = "x"
3789 with_libvarnish="no (Don't have pkg-config)"
3792 if test "x$with_libvarnish" = "xuse_pkgconfig"
3794 AC_MSG_NOTICE([Checking for varnishapi using $PKG_CONFIG])
3795 $PKG_CONFIG --exists 'varnishapi' 2>/dev/null
3798 with_libvarnish="no (pkg-config doesn't know library)"
3801 if test "x$with_libvarnish" = "xuse_pkgconfig"
3803 with_libvarnish_cflags="`$PKG_CONFIG --cflags 'varnishapi'`"
3806 with_libvarnish="no ($PKG_CONFIG failed)"
3808 with_libvarnish_libs="`$PKG_CONFIG --libs 'varnishapi'`"
3811 with_libvarnish="no ($PKG_CONFIG failed)"
3814 if test "x$with_libvarnish" = "xuse_pkgconfig"
3816 with_libvarnish="yes"
3819 # with_libvarnish_cflags and with_libvarnish_libs are set up now, let's do
3820 # the actual checks.
3821 if test "x$with_libvarnish" = "xyes"
3823 SAVE_CPPFLAGS="$CPPFLAGS"
3824 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
3825 AC_CHECK_HEADERS(varnish/varnishapi.h, [], [with_libvarnish="no (varnish/varnishapi.h not found)"])
3827 CPPFLAGS="$SAVE_CPPFLAGS"
3829 if test "x$with_libvarnish" = "xyes"
3831 SAVE_CPPFLAGS="$CPPFLAGS"
3832 #SAVE_LDFLAGS="$LDFLAGS"
3834 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
3835 #LDFLAGS="$LDFLAGS $with_libvarnish_libs"
3837 AC_CHECK_LIB(varnishapi, VSL_OpenStats,
3838 [with_libvarnish="yes"],
3839 [with_libvarnish="no (symbol VSL_OpenStats not found)"],
3840 [$with_libvarnish_libs])
3842 CPPFLAGS="$SAVE_CPPFLAGS"
3843 #LDFLAGS="$SAVE_LDFLAGS"
3845 if test "x$with_libvarnish" = "xyes"
3847 BUILD_WITH_LIBVARNISH_CFLAGS="$with_libvarnish_cflags"
3848 BUILD_WITH_LIBVARNISH_LIBS="$with_libvarnish_libs"
3849 AC_SUBST(BUILD_WITH_LIBVARNISH_CFLAGS)
3850 AC_SUBST(BUILD_WITH_LIBVARNISH_LIBS)
3854 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
3855 with_libxml2="no (pkg-config isn't available)"
3856 with_libxml2_cflags=""
3857 with_libxml2_ldflags=""
3858 with_libvirt="no (pkg-config isn't available)"
3859 with_libvirt_cflags=""
3860 with_libvirt_ldflags=""
3861 if test "x$PKG_CONFIG" != "x"
3863 pkg-config --exists 'libxml-2.0' 2>/dev/null
3868 with_libxml2="no (pkg-config doesn't know library)"
3871 pkg-config --exists libvirt 2>/dev/null
3876 with_libvirt="no (pkg-config doesn't know library)"
3879 if test "x$with_libxml2" = "xyes"
3881 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
3886 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
3892 if test "x$with_libxml2" = "xyes"
3894 SAVE_CPPFLAGS="$CPPFLAGS"
3895 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
3897 AC_CHECK_HEADERS(libxml/parser.h, [],
3898 [with_libxml2="no (libxml/parser.h not found)"])
3900 CPPFLAGS="$SAVE_CPPFLAGS"
3902 if test "x$with_libxml2" = "xyes"
3904 SAVE_CFLAGS="$CFLAGS"
3905 SAVE_LDFLAGS="$LDFLAGS"
3907 CFLAGS="$CFLAGS $with_libxml2_cflags"
3908 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
3910 AC_CHECK_LIB(xml2, xmlXPathEval,
3911 [with_libxml2="yes"],
3912 [with_libxml2="no (symbol xmlXPathEval not found)"])
3914 CFLAGS="$SAVE_CFLAGS"
3915 LDFLAGS="$SAVE_LDFLAGS"
3917 dnl Add the right compiler flags and libraries.
3918 if test "x$with_libxml2" = "xyes"; then
3919 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
3920 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
3921 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
3922 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
3924 if test "x$with_libvirt" = "xyes"
3926 with_libvirt_cflags="`pkg-config --cflags libvirt`"
3931 with_libvirt_ldflags="`pkg-config --libs libvirt`"
3937 if test "x$with_libvirt" = "xyes"
3939 SAVE_CPPFLAGS="$CPPFLAGS"
3940 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
3942 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
3943 [with_libvirt="no (libvirt/libvirt.h not found)"])
3945 CPPFLAGS="$SAVE_CPPFLAGS"
3947 if test "x$with_libvirt" = "xyes"
3949 SAVE_CFLAGS="$CFLAGS"
3950 SAVE_LDFLAGS="$LDFLAGS"
3952 CFLAGS="$CFLAGS $with_libvirt_cflags"
3953 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
3955 AC_CHECK_LIB(virt, virDomainBlockStats,
3956 [with_libvirt="yes"],
3957 [with_libvirt="no (symbol virDomainBlockStats not found)"])
3959 CFLAGS="$SAVE_CFLAGS"
3960 LDFLAGS="$SAVE_LDFLAGS"
3962 dnl Add the right compiler flags and libraries.
3963 if test "x$with_libvirt" = "xyes"; then
3964 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
3965 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
3966 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
3967 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
3971 # $PKG_CONFIG --exists OpenIPMIpthread {{{
3972 with_libopenipmipthread="yes"
3973 with_libopenipmipthread_cflags=""
3974 with_libopenipmipthread_libs=""
3976 AC_MSG_CHECKING([for pkg-config])
3978 if test "x$PKG_CONFIG" = "x"
3980 with_libopenipmipthread="no"
3983 temp_result="$PKG_CONFIG"
3985 AC_MSG_RESULT([$temp_result])
3987 if test "x$with_libopenipmipthread" = "xyes"
3989 AC_MSG_CHECKING([for libOpenIPMIpthread])
3990 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
3993 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
3995 AC_MSG_RESULT([$with_libopenipmipthread])
3998 if test "x$with_libopenipmipthread" = "xyes"
4000 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
4001 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
4004 with_libopenipmipthread_cflags="$temp_result"
4006 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
4007 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
4009 AC_MSG_RESULT([$temp_result])
4012 if test "x$with_libopenipmipthread" = "xyes"
4014 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
4015 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
4018 with_libopenipmipthread_ldflags="$temp_result"
4020 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
4021 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
4023 AC_MSG_RESULT([$temp_result])
4026 if test "x$with_libopenipmipthread" = "xyes"
4028 SAVE_CPPFLAGS="$CPPFLAGS"
4029 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
4031 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
4032 [with_libopenipmipthread="yes"],
4033 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
4034 [#include <OpenIPMI/ipmiif.h>
4035 #include <OpenIPMI/ipmi_err.h>
4036 #include <OpenIPMI/ipmi_posix.h>
4037 #include <OpenIPMI/ipmi_conn.h>
4040 CPPFLAGS="$SAVE_CPPFLAGS"
4043 if test "x$with_libopenipmipthread" = "xyes"
4045 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
4046 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
4047 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
4048 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
4052 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
4053 [with_libnotify="yes"],
4054 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
4056 # Check for enabled/disabled features
4059 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
4060 # ------------------------------------------------------------
4062 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
4067 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
4072 m4_define([EnDis],[disabled])dnl
4073 m4_define([YesNo],[no])dnl
4079 m4_define([EnDis],[enabled])dnl
4080 m4_define([YesNo],[yes])dnl
4083 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
4087 m4_if([$3], [feature], [],
4091 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
4097 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
4099 enable_$1='[YesNo]'dnl
4101 if test "x$enable_$1" = "xno"
4105 if test "x$enable_$1" = "xyes"
4109 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
4114 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
4115 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
4117 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
4119 # AC_PLUGIN(name, default, info)
4120 # ------------------------------------------------------------
4127 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
4129 if test "x$enableval" = "xyes"
4132 else if test "x$enableval" = "xforce"
4137 enable_plugin="no (disabled on command line)"
4141 if test "x$enable_all_plugins" = "xauto"
4143 if test "x$2" = "xyes"
4150 enable_plugin="$enable_all_plugins"
4153 if test "x$enable_plugin" = "xyes"
4155 if test "x$2" = "xyes" || test "x$force" = "xyes"
4157 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
4158 if test "x$2" != "xyes"
4160 dependency_warning="yes"
4162 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
4163 dependency_error="yes"
4164 enable_plugin="no (dependency error)"
4167 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
4168 enable_$1="$enable_plugin"
4170 )# AC_PLUGIN(name, default, info)
4172 m4_divert_once([HELP_ENABLE], [
4173 collectd features:])
4174 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
4175 AC_COLLECTD([debug], [enable], [feature], [debugging])
4176 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
4177 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
4179 dependency_warning="no"
4180 dependency_error="no"
4185 plugin_conntrack="no"
4186 plugin_contextswitch="no"
4189 plugin_curl_json="no"
4190 plugin_curl_xml="no"
4194 plugin_interface="no"
4201 plugin_multimeter="no"
4205 plugin_processes="no"
4206 plugin_protocols="no"
4210 plugin_tcpconns="no"
4217 plugin_wireless="no"
4221 if test "x$ac_system" = "xLinux"
4223 plugin_battery="yes"
4224 plugin_conntrack="yes"
4225 plugin_contextswitch="yes"
4227 plugin_cpufreq="yes"
4229 plugin_entropy="yes"
4230 plugin_interface="yes"
4235 plugin_fscache="yes"
4236 plugin_processes="yes"
4237 plugin_protocols="yes"
4240 plugin_tcpconns="yes"
4241 plugin_thermal="yes"
4244 plugin_vserver="yes"
4245 plugin_wireless="yes"
4247 if test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"
4253 if test "x$ac_system" = "xOpenBSD"
4255 plugin_tcpconns="yes"
4259 if test "x$with_libiokit" = "xyes"
4261 plugin_battery="yes"
4266 if test "x$with_perfstat" = "xyes"
4272 plugin_interface="yes"
4276 if test "x$with_procinfo" = "xyes"
4278 plugin_processes="yes"
4282 if test "x$with_kstat" = "xyes"
4285 plugin_zfs_arc="yes"
4288 if test "x$with_devinfo$with_kstat" = "xyesyes"
4292 plugin_interface="yes"
4297 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
4303 if test "x$with_libstatgrab" = "xyes"
4307 plugin_interface="yes"
4314 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
4320 if test "x$with_libopenipmipthread" = "xyes"
4325 if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"
4327 plugin_curl_json="yes"
4330 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
4332 plugin_curl_xml="yes"
4335 if test "x$have_processor_info" = "xyes"
4339 if test "x$have_sysctl" = "xyes"
4346 if test "x$have_sysctlbyname" = "xyes"
4348 plugin_contextswitch="yes"
4351 plugin_tcpconns="yes"
4354 # Df plugin: Check if we know how to determine mount points first.
4355 #if test "x$have_listmntent" = "xyes"; then
4358 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
4362 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
4366 #if test "x$have_getmntent" = "xseq"
4370 if test "x$c_cv_have_one_getmntent" = "xyes"
4375 # Df plugin: Check if we have either `statfs' or `statvfs' second.
4376 if test "x$plugin_df" = "xyes"
4379 if test "x$have_statfs" = "xyes"
4383 if test "x$have_statvfs" = "xyes"
4389 if test "x$have_getifaddrs" = "xyes"
4391 plugin_interface="yes"
4394 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
4396 plugin_libvirt="yes"
4399 if test "x$have_getloadavg" = "xyes"
4404 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
4409 # Mac OS X memory interface
4410 if test "x$have_host_statistics" = "xyes"
4415 if test "x$have_termios_h" = "xyes"
4417 plugin_multimeter="yes"
4421 if test "x$have_thread_info" = "xyes"
4423 plugin_processes="yes"
4426 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
4428 plugin_processes="yes"
4431 if test "x$with_kvm_getswapinfo" = "xyes"
4436 if test "x$have_swapctl" = "xyes"
4441 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
4443 plugin_tcpconns="yes"
4446 if test "x$have_getutent" = "xyes"
4450 if test "x$have_getutxent" = "xyes"
4455 m4_divert_once([HELP_ENABLE], [
4458 AC_ARG_ENABLE([all-plugins],
4459 AC_HELP_STRING([--enable-all-plugins],
4460 [enable all plugins (auto by def)]),
4462 if test "x$enableval" = "xyes"
4464 enable_all_plugins="yes"
4465 else if test "x$enableval" = "xauto"
4467 enable_all_plugins="auto"
4469 enable_all_plugins="no"
4472 [enable_all_plugins="auto"])
4474 m4_divert_once([HELP_ENABLE], [])
4476 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
4477 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
4478 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
4479 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
4480 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
4481 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
4482 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
4483 AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
4484 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
4485 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
4486 AC_PLUGIN([csv], [yes], [CSV output plugin])
4487 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
4488 AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics])
4489 AC_PLUGIN([curl_xml], [$plugin_curl_xml], [CURL generic xml statistics])
4490 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
4491 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
4492 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
4493 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
4494 AC_PLUGIN([email], [yes], [EMail statistics])
4495 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
4496 AC_PLUGIN([exec], [yes], [Execution of external programs])
4497 AC_PLUGIN([filecount], [yes], [Count files in directories])
4498 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
4499 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
4500 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
4501 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
4502 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
4503 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
4504 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
4505 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
4506 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
4507 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
4508 AC_PLUGIN([load], [$plugin_load], [System load])
4509 AC_PLUGIN([logfile], [yes], [File logging plugin])
4510 AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
4511 AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
4512 AC_PLUGIN([match_hashed], [yes], [The hashed match])
4513 AC_PLUGIN([match_regex], [yes], [The regex match])
4514 AC_PLUGIN([match_timediff], [yes], [The timediff match])
4515 AC_PLUGIN([match_value], [yes], [The value match])
4516 AC_PLUGIN([mbmon], [yes], [Query mbmond])
4517 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
4518 AC_PLUGIN([memcached], [yes], [memcached statistics])
4519 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
4520 AC_PLUGIN([modbus], [$with_libmodbus], [Modbus plugin])
4521 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
4522 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
4523 AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
4524 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
4525 AC_PLUGIN([network], [yes], [Network communication plugin])
4526 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
4527 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
4528 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
4529 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
4530 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
4531 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
4532 AC_PLUGIN([olsrd], [yes], [olsrd statistics])
4533 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
4534 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
4535 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
4536 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
4537 # FIXME: Check for libevent, too.
4538 AC_PLUGIN([pinba], [$have_protoc_c], [Pinba statistics])
4539 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
4540 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
4541 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
4542 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
4543 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
4544 AC_PLUGIN([python], [$with_python], [Embed a Python interpreter])
4545 AC_PLUGIN([redis], [$with_libcredis], [Redis plugin])
4546 AC_PLUGIN([routeros], [$with_librouteros], [RouterOS plugin])
4547 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
4548 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
4549 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
4550 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
4551 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
4552 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
4553 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
4554 AC_PLUGIN([table], [yes], [Parsing of tabular data])
4555 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
4556 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
4557 AC_PLUGIN([target_notification], [yes], [The notification target])
4558 AC_PLUGIN([target_replace], [yes], [The replace target])
4559 AC_PLUGIN([target_scale],[yes], [The scale target])
4560 AC_PLUGIN([target_set], [yes], [The set target])
4561 AC_PLUGIN([target_v5upgrade], [yes], [The v5upgrade target])
4562 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
4563 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
4564 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
4565 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
4566 AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics])
4567 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
4568 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
4569 AC_PLUGIN([users], [$plugin_users], [User statistics])
4570 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
4571 AC_PLUGIN([varnish], [$with_libvarnish], [Varnish cache statistics])
4572 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
4573 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
4574 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
4575 AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
4576 AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin])
4577 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
4578 AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
4580 dnl Default configuration file
4581 # Load either syslog or logfile
4582 LOAD_PLUGIN_SYSLOG=""
4583 LOAD_PLUGIN_LOGFILE=""
4585 AC_MSG_CHECKING([which default log plugin to load])
4586 default_log_plugin="none"
4587 if test "x$enable_syslog" = "xyes"
4589 default_log_plugin="syslog"
4591 LOAD_PLUGIN_SYSLOG="##"
4594 if test "x$enable_logfile" = "xyes"
4596 if test "x$default_log_plugin" = "xnone"
4598 default_log_plugin="logfile"
4600 LOAD_PLUGIN_LOGFILE="#"
4603 LOAD_PLUGIN_LOGFILE="##"
4605 AC_MSG_RESULT([$default_log_plugin])
4607 AC_SUBST(LOAD_PLUGIN_SYSLOG)
4608 AC_SUBST(LOAD_PLUGIN_LOGFILE)
4610 DEFAULT_LOG_LEVEL="info"
4611 if test "x$enable_debug" = "xyes"
4613 DEFAULT_LOG_LEVEL="debug"
4615 AC_SUBST(DEFAULT_LOG_LEVEL)
4617 # Load only one of rrdtool, network, csv in the default config.
4618 LOAD_PLUGIN_RRDTOOL=""
4619 LOAD_PLUGIN_NETWORK=""
4622 AC_MSG_CHECKING([which default write plugin to load])
4623 default_write_plugin="none"
4624 if test "x$enable_rrdtool" = "xyes"
4626 default_write_plugin="rrdtool"
4628 LOAD_PLUGIN_RRDTOOL="##"
4631 if test "x$enable_network" = "xyes"
4633 if test "x$default_write_plugin" = "xnone"
4635 default_write_plugin="network"
4637 LOAD_PLUGIN_NETWORK="#"
4640 LOAD_PLUGIN_NETWORK="##"
4643 if test "x$enable_csv" = "xyes"
4645 if test "x$default_write_plugin" = "xnone"
4647 default_write_plugin="csv"
4652 LOAD_PLUGIN_CSV="##"
4654 AC_MSG_RESULT([$default_write_plugin])
4656 AC_SUBST(LOAD_PLUGIN_RRDTOOL)
4657 AC_SUBST(LOAD_PLUGIN_NETWORK)
4658 AC_SUBST(LOAD_PLUGIN_CSV)
4661 if test "x$ac_system" = "xLinux" \
4662 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
4664 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
4668 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
4670 if test "x$withval" != "xno" && test "x$withval" != "xyes"
4672 PERL_BINDINGS_OPTIONS="$withval"
4673 with_perl_bindings="yes"
4675 PERL_BINDINGS_OPTIONS=""
4676 with_perl_bindings="$withval"
4680 PERL_BINDINGS_OPTIONS=""
4681 if test -n "$perl_interpreter"
4683 with_perl_bindings="yes"
4685 with_perl_bindings="no (no perl interpreter found)"
4688 if test "x$with_perl_bindings" = "xyes"
4690 PERL_BINDINGS="perl"
4694 AC_SUBST(PERL_BINDINGS)
4695 AC_SUBST(PERL_BINDINGS_OPTIONS)
4697 dnl libcollectdclient
4698 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
4699 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
4700 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
4702 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
4704 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
4706 AC_SUBST(LCC_VERSION_MAJOR)
4707 AC_SUBST(LCC_VERSION_MINOR)
4708 AC_SUBST(LCC_VERSION_PATCH)
4709 AC_SUBST(LCC_VERSION_EXTRA)
4710 AC_SUBST(LCC_VERSION_STRING)
4712 AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
4714 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)
4716 if test "x$with_librrd" = "xyes" \
4717 && test "x$librrd_threadsafe" != "xyes"
4719 with_librrd="yes (warning: librrd is not thread-safe)"
4722 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
4724 with_libiptc="yes (shipped version)"
4727 if test "x$with_libperl" = "xyes"
4729 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
4731 enable_perl="no (needs libperl)"
4734 if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"
4736 enable_perl="no (libperl doesn't support ithreads)"
4739 if test "x$with_perl_bindings" = "xyes" \
4740 && test "x$PERL_BINDINGS_OPTIONS" != "x"
4742 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
4749 libcurl . . . . . . . $with_libcurl
4750 libdbi . . . . . . . $with_libdbi
4751 libcredis . . . . . . $with_libcredis
4752 libesmtp . . . . . . $with_libesmtp
4753 libganglia . . . . . $with_libganglia
4754 libgcrypt . . . . . . $with_libgcrypt
4755 libiokit . . . . . . $with_libiokit
4756 libiptc . . . . . . . $with_libiptc
4757 libjvm . . . . . . . $with_java
4758 libkstat . . . . . . $with_kstat
4759 libkvm . . . . . . . $with_libkvm
4760 libmemcached . . . . $with_libmemcached
4761 libmodbus . . . . . . $with_libmodbus
4762 libmysql . . . . . . $with_libmysql
4763 libnetapp . . . . . . $with_libnetapp
4764 libnetlink . . . . . $with_libnetlink
4765 libnetsnmp . . . . . $with_libnetsnmp
4766 libnotify . . . . . . $with_libnotify
4767 liboconfig . . . . . $with_liboconfig
4768 libopenipmi . . . . . $with_libopenipmipthread
4769 liboping . . . . . . $with_liboping
4770 libpcap . . . . . . . $with_libpcap
4771 libperfstat . . . . . $with_perfstat
4772 libperl . . . . . . . $with_libperl
4773 libpq . . . . . . . . $with_libpq
4774 libpthread . . . . . $with_libpthread
4775 librouteros . . . . . $with_librouteros
4776 librrd . . . . . . . $with_librrd
4777 libsensors . . . . . $with_libsensors
4778 libstatgrab . . . . . $with_libstatgrab
4779 libtokyotyrant . . . $with_libtokyotyrant
4780 libupsclient . . . . $with_libupsclient
4781 libvarnish . . . . . $with_libvarnish
4782 libvirt . . . . . . . $with_libvirt
4783 libxml2 . . . . . . . $with_libxml2
4784 libxmms . . . . . . . $with_libxmms
4785 libyajl . . . . . . . $with_libyajl
4786 libevent . . . . . . $with_libevent
4787 protobuf-c . . . . . $have_protoc_c
4788 oracle . . . . . . . $with_oracle
4789 python . . . . . . . $with_python
4792 daemon mode . . . . . $enable_daemon
4793 debug . . . . . . . . $enable_debug
4796 perl . . . . . . . . $with_perl_bindings
4799 apache . . . . . . . $enable_apache
4800 apcups . . . . . . . $enable_apcups
4801 apple_sensors . . . . $enable_apple_sensors
4802 ascent . . . . . . . $enable_ascent
4803 battery . . . . . . . $enable_battery
4804 bind . . . . . . . . $enable_bind
4805 conntrack . . . . . . $enable_conntrack
4806 contextswitch . . . . $enable_contextswitch
4807 cpu . . . . . . . . . $enable_cpu
4808 cpufreq . . . . . . . $enable_cpufreq
4809 csv . . . . . . . . . $enable_csv
4810 curl . . . . . . . . $enable_curl
4811 curl_json . . . . . . $enable_curl_json
4812 curl_xml . . . . . . $enable_curl_xml
4813 dbi . . . . . . . . . $enable_dbi
4814 df . . . . . . . . . $enable_df
4815 disk . . . . . . . . $enable_disk
4816 dns . . . . . . . . . $enable_dns
4817 email . . . . . . . . $enable_email
4818 entropy . . . . . . . $enable_entropy
4819 exec . . . . . . . . $enable_exec
4820 filecount . . . . . . $enable_filecount
4821 fscache . . . . . . . $enable_fscache
4822 gmond . . . . . . . . $enable_gmond
4823 hddtemp . . . . . . . $enable_hddtemp
4824 interface . . . . . . $enable_interface
4825 ipmi . . . . . . . . $enable_ipmi
4826 iptables . . . . . . $enable_iptables
4827 ipvs . . . . . . . . $enable_ipvs
4828 irq . . . . . . . . . $enable_irq
4829 java . . . . . . . . $enable_java
4830 libvirt . . . . . . . $enable_libvirt
4831 load . . . . . . . . $enable_load
4832 logfile . . . . . . . $enable_logfile
4833 madwifi . . . . . . . $enable_madwifi
4834 match_empty_counter . $enable_match_empty_counter
4835 match_hashed . . . . $enable_match_hashed
4836 match_regex . . . . . $enable_match_regex
4837 match_timediff . . . $enable_match_timediff
4838 match_value . . . . . $enable_match_value
4839 mbmon . . . . . . . . $enable_mbmon
4840 memcachec . . . . . . $enable_memcachec
4841 memcached . . . . . . $enable_memcached
4842 memory . . . . . . . $enable_memory
4843 modbus . . . . . . . $enable_modbus
4844 multimeter . . . . . $enable_multimeter
4845 mysql . . . . . . . . $enable_mysql
4846 netapp . . . . . . . $enable_netapp
4847 netlink . . . . . . . $enable_netlink
4848 network . . . . . . . $enable_network
4849 nfs . . . . . . . . . $enable_nfs
4850 nginx . . . . . . . . $enable_nginx
4851 notify_desktop . . . $enable_notify_desktop
4852 notify_email . . . . $enable_notify_email
4853 ntpd . . . . . . . . $enable_ntpd
4854 nut . . . . . . . . . $enable_nut
4855 olsrd . . . . . . . . $enable_olsrd
4856 onewire . . . . . . . $enable_onewire
4857 openvpn . . . . . . . $enable_openvpn
4858 oracle . . . . . . . $enable_oracle
4859 perl . . . . . . . . $enable_perl
4860 pinba . . . . . . . . $enable_pinba
4861 ping . . . . . . . . $enable_ping
4862 postgresql . . . . . $enable_postgresql
4863 powerdns . . . . . . $enable_powerdns
4864 processes . . . . . . $enable_processes
4865 protocols . . . . . . $enable_protocols
4866 python . . . . . . . $enable_python
4867 redis . . . . . . . . $enable_redis
4868 routeros . . . . . . $enable_routeros
4869 rrdcached . . . . . . $enable_rrdcached
4870 rrdtool . . . . . . . $enable_rrdtool
4871 sensors . . . . . . . $enable_sensors
4872 serial . . . . . . . $enable_serial
4873 snmp . . . . . . . . $enable_snmp
4874 swap . . . . . . . . $enable_swap
4875 syslog . . . . . . . $enable_syslog
4876 table . . . . . . . . $enable_table
4877 tail . . . . . . . . $enable_tail
4878 tape . . . . . . . . $enable_tape
4879 target_notification . $enable_target_notification
4880 target_replace . . . $enable_target_replace
4881 target_scale . . . . $enable_target_scale
4882 target_set . . . . . $enable_target_set
4883 target_v5upgrade . . $enable_target_v5upgrade
4884 tcpconns . . . . . . $enable_tcpconns
4885 teamspeak2 . . . . . $enable_teamspeak2
4886 ted . . . . . . . . . $enable_ted
4887 thermal . . . . . . . $enable_thermal
4888 tokyotyrant . . . . . $enable_tokyotyrant
4889 unixsock . . . . . . $enable_unixsock
4890 uptime . . . . . . . $enable_uptime
4891 users . . . . . . . . $enable_users
4892 uuid . . . . . . . . $enable_uuid
4893 varnish . . . . . . . $enable_varnish
4894 vmem . . . . . . . . $enable_vmem
4895 vserver . . . . . . . $enable_vserver
4896 wireless . . . . . . $enable_wireless
4897 write_http . . . . . $enable_write_http
4898 write_redis . . . . . $enable_write_redis
4899 xmms . . . . . . . . $enable_xmms
4900 zfs_arc . . . . . . . $enable_zfs_arc
4904 if test "x$dependency_error" = "xyes"; then
4905 AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
4908 if test "x$dependency_warning" = "xyes"; then
4909 AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
4912 # vim: set fdm=marker :