1 dnl Process this file with autoconf to produce a configure script.
3 AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)])
4 AC_CONFIG_SRCDIR(src/target_set.c)
5 AC_CONFIG_HEADERS(src/config.h)
6 AC_CONFIG_AUX_DIR([build-aux])
7 AC_CONFIG_MACRO_DIR([m4])
9 dnl older automake's default of ARFLAGS=cru is noisy on newer binutils;
10 dnl we don't really need the 'u' even in older toolchains. Then there is
11 dnl older libtool, which spelled it AR_FLAGS
12 m4_divert_text([DEFAULTS], [: "${ARFLAGS=cr} ${AR_FLAGS=cr}"])
14 LT_INIT([dlopen disable-static])
16 AM_INIT_AUTOMAKE([subdir-objects tar-pax dist-bzip2 no-dist-gzip foreign])
17 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
20 AC_PREFIX_DEFAULT("/opt/collectd")
25 # Checks for programs.
28 [AC_MSG_ERROR([No compiler found that supports C99])]
44 AC_PATH_PROG([VALGRIND], [valgrind])
46 # Warn when pkg.m4 is missing
47 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
51 AC_CACHE_CHECK([if Bison is the parser generator],
52 [collectd_cv_prog_bison],
54 AS_IF([$YACC --version 2>/dev/null | $EGREP -q '^bison '],
55 [collectd_cv_prog_bison=yes],
56 [collectd_cv_prog_bison=no]
61 if test "x$collectd_cv_prog_bison" = "xno" && test ! -f "${srcdir}/src/liboconfig/parser.c"; then
62 AC_MSG_ERROR([bison is missing and you do not have ${srcdir}/src/liboconfig/parser.c. Please install bison])
65 if test "x$lt_cv_dlopen" = "xno"; then
66 AC_MSG_ERROR([Your system does not support dlopen])
69 AC_SUBST([DLOPEN_LIBS], [$lt_cv_dlopen_libs])
72 AC_MSG_CHECKING([for kernel type ($host_os)])
75 AC_DEFINE([KERNEL_AIX], [1], [True if program is to be compiled for a AIX kernel])
79 AC_DEFINE([KERNEL_DARWIN], [1], [True if program is to be compiled for a Darwin kernel])
83 AC_DEFINE([KERNEL_FREEBSD], [1], [True if program is to be compiled for a FreeBSD kernel])
87 AC_DEFINE([KERNEL_LINUX], [1], [True if program is to be compiled for a Linux kernel])
91 AC_DEFINE([KERNEL_NETBSD], [1], [True if program is to be compiled for a NetBSD kernel])
95 AC_DEFINE([KERNEL_OPENBSD], [1], [True if program is to be compiled for an OpenBSD kernel])
99 AC_DEFINE([KERNEL_SOLARIS], [1], [True if program is to be compiled for a Solaris kernel])
106 AC_MSG_RESULT([$ac_system])
108 AM_CONDITIONAL([BUILD_AIX], [test "x$ac_system" = "xAIX"])
109 AM_CONDITIONAL([BUILD_DARWIN], [test "x$ac_system" = "xDarwin"])
110 AM_CONDITIONAL([BUILD_FREEBSD], [test "x$ac_system" = "xFreeBSD"])
111 AM_CONDITIONAL([BUILD_LINUX], [test "x$ac_system" = "xLinux"])
112 AM_CONDITIONAL([BUILD_OPENBSD], [test "x$ac_system" = "xOpenBSD"])
113 AM_CONDITIONAL([BUILD_SOLARIS], [test "x$ac_system" = "xSolaris"])
115 if test "x$ac_system" = "xSolaris"; then
116 AC_DEFINE([_POSIX_PTHREAD_SEMANTICS], [1], [Define to enforce POSIX thread semantics under Solaris.])
117 AC_DEFINE([_REENTRANT], [1], [Define to enable reentrancy interfaces.])
119 AC_MSG_CHECKING([whether compiler builds 64bit binaries])
125 # error "Compiler not in 64bit mode."
130 [AC_MSG_RESULT([yes])],
133 AC_MSG_NOTICE([Solaris detected. Please consider building a 64-bit binary.])
138 if test "x$ac_system" = "xAIX"; then
139 AC_DEFINE([_THREAD_SAFE_ERRNO], [1], [Define to use the thread-safe version of errno under AIX.])
142 # Where to install .pc files.
143 pkgconfigdir="${libdir}/pkgconfig"
144 AC_SUBST([pkgconfigdir])
147 # Checks for header files.
152 AC_CHECK_HEADERS_ONCE([ \
193 if test "x$ac_system" = "xNetBSD"; then
194 # For entropy plugin on newer NetBSD
195 AC_CHECK_HEADERS([sys/rndio.h], [], [],
198 # include <sys/types.h>
201 # include <sys/ioctl.h>
204 # include <sys/param.h>
211 AC_CHECK_HEADERS([netinet/in_systm.h], [], [],
215 # include <sys/types.h>
220 AC_CHECK_HEADERS([netinet/in.h], [], [],
224 # include <sys/types.h>
226 #if HAVE_NETINET_IN_SYSTM_H
227 # include <netinet/in_systm.h>
232 AC_CHECK_HEADERS([netinet/ip.h], [], [],
236 # include <sys/types.h>
238 #if HAVE_NETINET_IN_SYSTM_H
239 # include <netinet/in_systm.h>
241 #if HAVE_NETINET_IN_H
242 # include <netinet/in.h>
247 AC_CHECK_HEADERS([netinet/ip_icmp.h], [], [],
251 # include <sys/types.h>
253 #if HAVE_NETINET_IN_SYSTM_H
254 # include <netinet/in_systm.h>
256 #if HAVE_NETINET_IN_H
257 # include <netinet/in.h>
259 #if HAVE_NETINET_IP_H
260 # include <netinet/ip.h>
265 AC_CHECK_HEADERS([netinet/ip_var.h], [], [],
269 # include <sys/types.h>
271 #if HAVE_NETINET_IN_SYSTM_H
272 # include <netinet/in_systm.h>
274 #if HAVE_NETINET_IN_H
275 # include <netinet/in.h>
277 #if HAVE_NETINET_IP_H
278 # include <netinet/ip.h>
283 AC_CHECK_HEADERS([netinet/ip6.h], [], [],
287 # include <sys/types.h>
289 #if HAVE_NETINET_IN_SYSTM_H
290 # include <netinet/in_systm.h>
292 #if HAVE_NETINET_IN_H
293 # include <netinet/in.h>
298 AC_CHECK_HEADERS([netinet/icmp6.h], [], [],
302 # include <sys/types.h>
304 #if HAVE_NETINET_IN_SYSTM_H
305 # include <netinet/in_systm.h>
307 #if HAVE_NETINET_IN_H
308 # include <netinet/in.h>
310 #if HAVE_NETINET_IP6_H
311 # include <netinet/ip6.h>
316 AC_CHECK_HEADERS([netinet/tcp.h], [], [],
320 # include <sys/types.h>
322 #if HAVE_NETINET_IN_SYSTM_H
323 # include <netinet/in_systm.h>
325 #if HAVE_NETINET_IN_H
326 # include <netinet/in.h>
328 #if HAVE_NETINET_IP_H
329 # include <netinet/ip.h>
334 AC_CHECK_HEADERS([netinet/udp.h], [], [],
338 # include <sys/types.h>
340 #if HAVE_NETINET_IN_SYSTM_H
341 # include <netinet/in_systm.h>
343 #if HAVE_NETINET_IN_H
344 # include <netinet/in.h>
346 #if HAVE_NETINET_IP_H
347 # include <netinet/ip.h>
353 AC_CHECK_HEADERS([sys/dkstat.h])
354 if test "x$ac_system" = "xDarwin"; then
364 mach/processor_set.h \
366 mach/processor_info.h \
372 mach/vm_statistics.h \
374 CoreFoundation/CoreFoundation.h \
377 IOKit/ps/IOPSKeys.h \
379 IOKit/storage/IOBlockStorageDriver.h
383 # For the battery plugin
384 AC_CHECK_HEADERS([IOKit/ps/IOPowerSources.h], [], [],
386 #if HAVE_IOKIT_IOKITLIB_H
387 # include <IOKit/IOKitLib.h>
389 #if HAVE_IOKIT_IOTYPES_H
390 # include <IOKit/IOTypes.h>
396 AC_CHECK_HEADERS([sys/sysctl.h], [], [],
399 # include <sys/types.h>
402 # include <sys/param.h>
407 # For interface plugin
408 AC_CHECK_HEADERS([ifaddrs.h])
409 AC_CHECK_HEADERS([net/if.h], [], [],
412 # include <sys/types.h>
414 #if HAVE_SYS_SOCKET_H
415 # include <sys/socket.h>
420 if test "x$ac_system" = "xLinux"; then
422 AC_CHECK_HEADERS([linux/major.h])
424 # For md module (Linux only)
425 AC_CHECK_HEADERS([linux/raid/md_u.h],
426 [have_linux_raid_md_u_h="yes"],
427 [have_linux_raid_md_u_h="no"],
429 #include <sys/ioctl.h>
430 #include <linux/major.h>
431 #include <linux/types.h>
434 AC_CHECK_HEADERS([sys/sysmacros.h])
436 AC_CHECK_HEADERS([linux/wireless.h],
437 [have_linux_wireless_h="yes"],
438 [have_linux_wireless_h="no"],
441 #include <sys/ioctl.h>
442 #include <sys/socket.h>
446 AC_CHECK_HEADERS([linux/if.h], [], [],
449 # include <sys/types.h>
451 #if HAVE_SYS_SOCKET_H
452 # include <sys/socket.h>
457 AC_CHECK_HEADERS([linux/inet_diag.h], [], [],
460 # include <sys/types.h>
462 #if HAVE_SYS_SOCKET_H
463 # include <sys/socket.h>
468 AC_CHECK_HEADERS([linux/netdevice.h], [], [],
471 # include <sys/types.h>
473 #if HAVE_SYS_SOCKET_H
474 # include <sys/socket.h>
477 # include <linux/if.h>
483 AC_CHECK_HEADERS([linux/sockios.h],
484 [have_linux_sockios_h="yes"],
485 [have_linux_sockios_h="no"],
488 # include <sys/ioctl.h>
496 AC_CHECK_HEADERS([linux/ethtool.h],
497 [have_linux_ethtool_h="yes"],
498 [have_linux_ethtool_h="no"],
501 # include <sys/ioctl.h>
506 #if HAVE_LINUX_SOCKIOS_H
507 # include <linux/sockios.h>
513 AC_CHECK_HEADERS_ONCE([linux/ip_vs.h])
515 # For the email plugin
516 AC_CHECK_HEADERS([linux/un.h], [], [],
518 #if HAVE_SYS_SOCKET_H
519 # include <sys/socket.h>
523 # For the turbostat plugin
524 AC_CHECK_HEADERS([cpuid.h],
525 [have_cpuid_h="yes"],
526 [have_cpuid_h="no (cpuid.h not found)"]
529 AC_CHECK_HEADERS([sys/capability.h],
530 [have_capability="yes"],
531 [have_capability="no (<sys/capability.h> not found)"]
534 if test "x$have_capability" = "xyes"; then
535 AC_CHECK_LIB([cap], [cap_get_proc],
536 [have_capability="yes"],
537 [have_capability="no (cap_get_proc() not found)"]
541 if test "x$have_capability" = "xyes"; then
542 AC_CHECK_DECL([CAP_IS_SUPPORTED],
543 [have_capability="yes"],
544 [have_capability="no (CAP_IS_SUPPORTED not found)"],
545 [[#include <sys/capability.h>]]
549 if test "x$have_capability" = "xyes"; then
550 AC_DEFINE([HAVE_CAPABILITY], [1], [Define to 1 if you have cap_get_proc() (-lcap).])
554 have_linux_raid_md_u_h="no"
555 have_linux_wireless_h="no"
558 AM_CONDITIONAL([BUILD_WITH_CAPABILITY], [test "x$have_capability" = "xyes"])
560 # For the swap module
561 have_sys_swap_h="yes"
562 AC_CHECK_HEADERS([sys/swap.h vm/anon.h],
564 [have_sys_swap_h="no"],
566 #undef _FILE_OFFSET_BITS
567 #undef _LARGEFILE64_SOURCE
569 # include <sys/types.h>
572 # include <sys/param.h>
578 # For the processes plugin
580 AC_CHECK_HEADERS([sys/loadavg.h linux/config.h utmp.h utmpx.h])
583 AC_CHECK_HEADERS([sys/ucred.h], [], [],
586 # include <sys/types.h>
589 # include <sys/param.h>
594 # For mount interface
595 AC_CHECK_HEADERS([sys/mount.h], [], [],
598 # include <sys/types.h>
601 # include <sys/param.h>
608 [AS_HELP_STRING([--enable-xfs], [xfs support in df plugin @<:@default=yes@:>@])],
613 if test "x$enable_xfs" != "xno"; then
614 AC_CHECK_HEADERS([xfs/xqm.h],
617 if test "x$enable_xfs" = "xyes"; then
618 AC_MSG_ERROR([xfs/xqm.h not found])
621 [[#define _GNU_SOURCE]]
628 AC_CHECK_HEADERS([arpa/nameser.h])
629 AC_CHECK_HEADERS([arpa/nameser_compat.h], [], [],
631 #if HAVE_ARPA_NAMESER_H
632 # include <arpa/nameser.h>
637 AC_CHECK_HEADERS([net/if_arp.h], [], [],
639 #if HAVE_SYS_SOCKET_H
640 # include <sys/socket.h>
645 AC_CHECK_HEADERS([net/ppp_defs.h])
646 AC_CHECK_HEADERS([net/if_ppp.h], [], [],
648 #if HAVE_NET_PPP_DEFS_H
649 # include <net/ppp_defs.h>
654 AC_CHECK_HEADERS([netinet/if_ether.h], [], [],
658 # include <sys/types.h>
660 #if HAVE_SYS_SOCKET_H
661 # include <sys/socket.h>
666 #if HAVE_NETINET_IN_H
667 # include <netinet/in.h>
672 AC_CHECK_HEADERS([net/pfvar.h],
673 [have_net_pfvar_h="yes"],
674 [have_net_pfvar_h="no"],
677 # include <sys/ioctl.h>
679 #if HAVE_SYS_SOCKET_H
680 # include <sys/socket.h>
685 #if HAVE_NETINET_IN_H
686 # include <netinet/in.h>
691 # For the multimeter plugin
692 AC_CHECK_HEADERS([termios.h],
693 [have_termios_h="yes"],
694 [have_termios_h="no"]
697 # For cpusleep plugin
698 AC_CACHE_CHECK([whether clock_boottime and clock_monotonic are supported],
699 [c_cv_have_clock_boottime_monotonic],
703 [[#include <time.h>]],
705 struct timespec b, m;
706 clock_gettime(CLOCK_BOOTTIME, &b );
707 clock_gettime(CLOCK_MONOTONIC, &m );
711 [c_cv_have_clock_boottime_monotonic="yes"],
712 [c_cv_have_clock_boottime_monotonic="no"]
719 # Checks for typedefs, structures, and compiler characteristics.
730 [AC_LANG_SOURCE([[int main(void){}]]) ]
732 $CXX -c conftest.cpp $CXXFLAGS $@ > /dev/null 2> /dev/null
740 # Checks for library functions.
742 AC_CHECK_FUNCS_ONCE([ \
768 SAVE_CFLAGS="$CFLAGS"
769 CFLAGS="-Wall -Werror"
772 AC_CACHE_CHECK([for strtok_r],
773 [c_cv_have_strtok_r_default],
784 char buffer[] = "foo,bar,baz";
791 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
794 printf ("token = %s;\n", token);
799 [c_cv_have_strtok_r_default="yes"],
800 [c_cv_have_strtok_r_default="no"]
805 if test "x$c_cv_have_strtok_r_default" = "xno"; then
806 CFLAGS="$CFLAGS -D_REENTRANT=1"
808 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
809 [c_cv_have_strtok_r_reentrant],
820 char buffer[] = "foo,bar,baz";
827 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
830 printf ("token = %s;\n", token);
835 [c_cv_have_strtok_r_reentrant="yes"],
836 [AC_MSG_FAILURE([strtok_r is not available. Please file a bugreport!])]
842 CFLAGS="$SAVE_CFLAGS"
843 if test "x$c_cv_have_strtok_r_reentrant" = "xyes"; then
844 CFLAGS="$CFLAGS -D_REENTRANT=1"
847 AC_CHECK_FUNCS([socket],
850 AC_CHECK_LIB([socket], [socket],
851 [socket_needs_socket="yes"],
852 [AC_MSG_ERROR([cannot find socket() in libsocket])]
856 AM_CONDITIONAL([BUILD_WITH_LIBSOCKET], [test "x$socket_needs_socket" = "xyes"])
858 clock_gettime_needs_posix4="no"
859 AC_CHECK_FUNCS([clock_gettime],
860 [have_clock_gettime="yes"],
861 [have_clock_gettime="no"]
864 if test "x$have_clock_gettime" = "xno"; then
865 AC_CHECK_LIB([rt], [clock_gettime],
867 clock_gettime_needs_rt="yes"
868 have_clock_gettime="yes"
873 if test "x$have_clock_gettime" = "xno"; then
874 AC_CHECK_LIB([posix4], [clock_gettime],
876 clock_gettime_needs_posix4="yes"
877 have_clock_gettime="yes"
882 if test "x$have_clock_gettime" = "xyes"; then
883 AC_DEFINE([HAVE_CLOCK_GETTIME], [1], [Define if the clock_gettime(2) function is available.])
886 AC_CHECK_FUNCS([nanosleep], [],
887 AC_CHECK_LIB([rt], [nanosleep],
888 [nanosleep_needs_rt="yes"],
890 AC_CHECK_LIB([posix4], [nanosleep],
891 [nanosleep_needs_posix4="yes"],
892 [AC_MSG_ERROR([cannot find nanosleep])]
898 AM_CONDITIONAL([BUILD_WITH_LIBRT], [test "x$clock_gettime_needs_rt" = "xyes" || test "x$nanosleep_needs_rt" = "xyes"])
899 AM_CONDITIONAL([BUILD_WITH_LIBPOSIX4], [test "x$clock_gettime_needs_posix4" = "xyes" || test "x$nanosleep_needs_posix4" = "xyes"])
901 AC_CHECK_FUNCS([getifaddrs], [have_getifaddrs="yes"], [have_getifaddrs="no"])
902 AC_CHECK_FUNCS([getloadavg], [have_getloadavg="yes"], [have_getloadavg="no"])
903 AC_CHECK_FUNCS([getutent], [have_getutent="yes"], [have_getutent="no"])
904 AC_CHECK_FUNCS([getutxent], [have_getutxent="yes"], [have_getutxent="no"])
905 AC_CHECK_FUNCS([host_statistics], [have_host_statistics="yes"], [have_host_statistics="no"])
906 AC_CHECK_FUNCS([processor_info], [have_processor_info="yes"], [have_processor_info="no"])
907 AC_CHECK_FUNCS([statfs], [have_statfs="yes"], [have_statfs="no"])
908 AC_CHECK_FUNCS([statvfs], [have_statvfs="yes"], [have_statvfs="no"])
909 AC_CHECK_FUNCS([sysctl], [have_sysctl="yes"], [have_sysctl="no"])
910 AC_CHECK_FUNCS([sysctlbyname], [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
911 AC_CHECK_FUNCS([syslog], [have_syslog="yes"], [have_syslog="no"])
912 AC_CHECK_FUNCS([thread_info], [have_thread_info="yes"], [have_thread_info="no"])
914 # Check for strptime {{{
915 if test "x$GCC" = "xyes"; then
916 SAVE_CFLAGS="$CFLAGS"
917 CFLAGS="$CFLAGS -Wall -Wextra -Werror"
920 AC_CHECK_FUNCS([strptime], [have_strptime="yes"], [have_strptime="no"])
921 if test "x$have_strptime" = "xyes"; then
922 AC_CACHE_CHECK([whether strptime is exported by default],
923 [c_cv_have_strptime_default],
928 [[#include <time.h>]],
931 (void)strptime ("2010-12-30%13:42:42", "%Y-%m-%dT%T", &stm);
935 [c_cv_have_strptime_default="yes"],
936 [c_cv_have_strptime_default="no"])
941 if test "x$have_strptime" = "xyes" && test "x$c_cv_have_strptime_default" = "xno"; then
942 AC_CACHE_CHECK([whether strptime needs standards mode],
943 [c_cv_have_strptime_standards],
949 #ifndef _ISOC99_SOURCE
950 # define _ISOC99_SOURCE 1
952 #ifndef _POSIX_C_SOURCE
953 # define _POSIX_C_SOURCE 200112L
955 #ifndef _XOPEN_SOURCE
956 # define _XOPEN_SOURCE 500
962 (void)strptime ("2010-12-30%13:42:42", "%Y-%m-%dT%T", &stm);
966 [c_cv_have_strptime_standards="yes"],
967 [c_cv_have_strptime_standards="no"]
972 if test "x$c_cv_have_strptime_standards" = "xyes"; then
973 AC_DEFINE([STRPTIME_NEEDS_STANDARDS], [1],
974 [Set to true if strptime is only exported in X/Open mode (GNU libc).]
981 if test "x$GCC" = "xyes"; then
982 CFLAGS="$SAVE_CFLAGS"
984 # }}} Check for strptime
986 # Check for timegm {{{
988 # These checks need -Werror because implicit function declarations are only a
990 SAVE_CFLAGS="$CFLAGS"
991 CFLAGS="$CFLAGS -Werror"
993 AC_CACHE_CHECK([for timegm],
998 #if STRPTIME_NEEDS_STANDARDS
999 # ifndef _ISOC99_SOURCE
1000 # define _ISOC99_SOURCE 1
1002 # ifndef _POSIX_C_SOURCE
1003 # define _POSIX_C_SOURCE 200112L
1005 # ifndef _XOPEN_SOURCE
1006 # define _XOPEN_SOURCE 500
1012 time_t t = timegm(&(struct tm){0});
1013 if (t == ((time_t) -1)) {
1018 [c_cv_have_timegm="yes"],
1019 [c_cv_have_timegm="no"]
1023 if test "x$c_cv_have_timegm" != "xyes"
1025 AC_CACHE_CHECK([for timegm with _BSD_SOURCE],
1026 [c_cv_have_timegm_bsd],
1030 #if STRPTIME_NEEDS_STANDARDS
1031 # ifndef _ISOC99_SOURCE
1032 # define _ISOC99_SOURCE 1
1034 # ifndef _POSIX_C_SOURCE
1035 # define _POSIX_C_SOURCE 200112L
1037 # ifndef _XOPEN_SOURCE
1038 # define _XOPEN_SOURCE 500
1042 # define _BSD_SOURCE 1
1047 time_t t = timegm(&(struct tm){0});
1048 if (t == ((time_t) -1)) {
1053 [c_cv_have_timegm_bsd="yes"
1054 c_cv_have_timegm="yes"],
1055 [c_cv_have_timegm_bsd="no"]
1060 if test "x$c_cv_have_timegm" = "xyes"
1062 AC_DEFINE(HAVE_TIMEGM, 1, [Define if the timegm(3) function is available.])
1063 if test "x$c_cv_have_timegm_bsd" = "xyes"
1065 AC_DEFINE(TIMEGM_NEEDS_BSD, 1, [Set to true if timegm is only exported in BSD mode.])
1069 CFLAGS="$SAVE_CFLAGS"
1070 # }}} Check for timegm
1072 AC_MSG_CHECKING([for sysctl kern.cp_times])
1073 if test -x /sbin/sysctl; then
1074 /sbin/sysctl kern.cp_times >/dev/null 2>&1
1075 if test $? -eq 0; then
1076 AC_MSG_RESULT([yes])
1077 AC_DEFINE([HAVE_SYSCTL_KERN_CP_TIMES], [1], [Define if sysctl supports kern.cp_times])
1085 AC_MSG_CHECKING([for sysctl kern.cp_time])
1086 if test -x /sbin/sysctl; then
1087 /sbin/sysctl kern.cp_time >/dev/null 2>&1
1090 AC_MSG_RESULT([yes])
1091 AC_DEFINE([HAVE_SYSCTL_KERN_CP_TIME], [1], [Define if sysctl supports kern.cp_time])
1099 AC_CHECK_FUNCS([swapctl], [have_swapctl="yes"], [have_swapctl="no"])
1100 if test "x$have_swapctl" = "xyes"; then
1101 AC_CACHE_CHECK([whether swapctl takes two arguments],
1102 [c_cv_have_swapctl_two_args],
1108 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
1109 # undef _FILE_OFFSET_BITS
1110 # undef _LARGEFILE64_SOURCE
1112 #include <sys/stat.h>
1113 #include <sys/param.h>
1114 #include <sys/swap.h>
1117 [[int num = swapctl(0, NULL);]]
1120 [c_cv_have_swapctl_two_args="yes"],
1121 [c_cv_have_swapctl_two_args="no"]
1126 AC_CACHE_CHECK([whether swapctl takes three arguments],
1127 [c_cv_have_swapctl_three_args],
1133 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
1134 # undef _FILE_OFFSET_BITS
1135 # undef _LARGEFILE64_SOURCE
1137 #include <sys/stat.h>
1138 #include <sys/param.h>
1139 #include <sys/swap.h>
1142 [[int num = swapctl(0, NULL, 0);]]
1145 [c_cv_have_swapctl_three_args="yes"],
1146 [c_cv_have_swapctl_three_args="no"]
1152 # Check for different versions of `swapctl' here..
1153 if test "x$have_swapctl" = "xyes"; then
1154 if test "x$c_cv_have_swapctl_two_args" = "xyes"; then
1155 AC_DEFINE([HAVE_SWAPCTL_TWO_ARGS], [1], [Define if the function swapctl exists and takes two arguments.])
1158 if test "x$c_cv_have_swapctl_three_args" = "xyes"; then
1159 AC_DEFINE([HAVE_SWAPCTL_THREE_ARGS], [1], [Define if the function swapctl exists and takes three arguments.])
1164 AC_ARG_WITH([nan-emulation],
1165 [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
1167 if test "x$withval" = "xno"; then
1169 else if test "x$withval" = "xyes"; then
1178 if test "x$nan_type" = "xnone"; then
1179 AC_CACHE_CHECK([whether NAN is defined by default],
1180 [c_cv_have_nan_default],
1188 static double foo = NAN;
1197 [c_cv_have_nan_default="yes"],
1198 [c_cv_have_nan_default="no"]
1204 if test "x$c_cv_have_nan_default" = "xyes"; then
1208 if test "x$nan_type" = "xnone"; then
1209 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
1210 [c_cv_have_nan_isoc],
1217 #define __USE_ISOC99 1
1219 static double foo = NAN;
1228 [c_cv_have_nan_isoc="yes"],
1229 [c_cv_have_nan_isoc="no"]
1235 if test "x$c_cv_have_nan_isoc" = "xyes"; then
1239 if test "x$nan_type" = "xnone"; then
1240 SAVE_LDFLAGS="$LDFLAGS"
1241 LDFLAGS="$LDFLAGS -lm"
1242 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
1243 [c_cv_have_nan_zero],
1254 #define NAN (0.0 / 0.0)
1256 # define isnan(f) ((f) != (f))
1258 static double foo = NAN;
1267 [c_cv_have_nan_zero="yes"],
1268 [c_cv_have_nan_zero="no"]
1272 LDFLAGS=$SAVE_LDFLAGS
1275 if test "x$c_cv_have_nan_zero" = "xyes"; then
1279 if test "x$nan_type" = "xdefault"; then
1280 AC_DEFINE([NAN_STATIC_DEFAULT], [1],
1281 [Define if NAN is defined by default and can initialize static variables.]
1283 else if test "x$nan_type" = "xisoc99"; then
1284 AC_DEFINE([NAN_STATIC_ISOC], [1],
1285 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.]
1287 else if test "x$nan_type" = "xzero"; then
1288 AC_DEFINE([NAN_ZERO_ZERO], [1],
1289 [Define if NAN can be defined as (0.0 / 0.0)]
1292 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
1295 AC_ARG_WITH([fp-layout],
1297 AS_HELP_STRING([--with-fp-layout],
1298 [set the memory layout of doubles. For crosscompiling only.]
1302 if test "x$withval" = "xnothing"; then
1303 fp_layout_type="nothing"
1304 else if test "x$withval" = "xendianflip"; then
1305 fp_layout_type="endianflip"
1306 else if test "x$withval" = "xintswap"; then
1307 fp_layout_type="intswap"
1309 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
1312 [fp_layout_type="unknown"]
1315 if test "x$fp_layout_type" = "xunknown"; then
1316 AC_CACHE_CHECK([if doubles are stored in x86 representation],
1317 [c_cv_fp_layout_need_nothing],
1327 #include <inttypes.h>
1328 #include <stdbool.h>
1337 memcpy ((void *) &i0, (void *) &d, 8);
1340 memcpy ((void *) c, (void *) &i1, 8);
1342 if ((c[0] == 0x2f) && (c[1] == 0x25)
1343 && (c[2] == 0xc0) && (c[3] == 0xc7)
1344 && (c[4] == 0x43) && (c[5] == 0x2b)
1345 && (c[6] == 0x1f) && (c[7] == 0x5b))
1351 [c_cv_fp_layout_need_nothing="yes"],
1352 [c_cv_fp_layout_need_nothing="no"]
1358 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
1359 fp_layout_type="nothing"
1362 if test "x$fp_layout_type" = "xunknown"; then
1363 AC_CACHE_CHECK([if endianflip converts to x86 representation],
1364 [c_cv_fp_layout_need_endianflip],
1374 #include <inttypes.h>
1375 #include <stdbool.h>
1376 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
1377 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
1378 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
1379 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
1380 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
1381 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
1382 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
1383 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
1392 memcpy ((void *) &i0, (void *) &d, 8);
1394 i1 = endianflip (i0);
1395 memcpy ((void *) c, (void *) &i1, 8);
1397 if ((c[0] == 0x2f) && (c[1] == 0x25)
1398 && (c[2] == 0xc0) && (c[3] == 0xc7)
1399 && (c[4] == 0x43) && (c[5] == 0x2b)
1400 && (c[6] == 0x1f) && (c[7] == 0x5b))
1406 [c_cv_fp_layout_need_endianflip="yes"],
1407 [c_cv_fp_layout_need_endianflip="no"]
1413 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
1414 fp_layout_type="endianflip"
1417 if test "x$fp_layout_type" = "xunknown"; then
1418 AC_CACHE_CHECK([if intswap converts to x86 representation],
1419 [c_cv_fp_layout_need_intswap],
1429 #include <inttypes.h>
1430 #include <stdbool.h>
1431 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
1432 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
1441 memcpy ((void *) &i0, (void *) &d, 8);
1444 memcpy ((void *) c, (void *) &i1, 8);
1446 if ((c[0] == 0x2f) && (c[1] == 0x25)
1447 && (c[2] == 0xc0) && (c[3] == 0xc7)
1448 && (c[4] == 0x43) && (c[5] == 0x2b)
1449 && (c[6] == 0x1f) && (c[7] == 0x5b))
1455 [c_cv_fp_layout_need_intswap="yes"],
1456 [c_cv_fp_layout_need_intswap="no"]
1462 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
1463 fp_layout_type="intswap"
1466 if test "x$fp_layout_type" = "xnothing"; then
1467 AC_DEFINE([FP_LAYOUT_NEED_NOTHING], [1],
1468 [Define if doubles are stored in x86 representation.]
1470 else if test "x$fp_layout_type" = "xendianflip"; then
1471 AC_DEFINE([FP_LAYOUT_NEED_ENDIANFLIP], [1],
1472 [Define if endianflip is needed to convert to x86 representation.]
1474 else if test "x$fp_layout_type" = "xintswap"; then
1475 AC_DEFINE([FP_LAYOUT_NEED_INTSWAP], [1],
1476 [Define if intswap is needed to convert to x86 representation.]
1479 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
1482 # For cpusleep plugin
1483 AC_CACHE_CHECK([whether clock_boottime and clock_monotonic are supported],
1484 [c_cv_have_clock_boottime_monotonic],
1488 [[#include <time.h>]],
1490 struct timespec b, m;
1491 clock_gettime(CLOCK_BOOTTIME, &b );
1492 clock_gettime(CLOCK_MONOTONIC, &m );
1496 [c_cv_have_clock_boottime_monotonic="yes"],
1497 [c_cv_have_clock_boottime_monotonic="no"]
1502 # --with-useragent {{{
1503 AC_ARG_WITH([useragent],
1504 [AS_HELP_STRING([--with-useragent@<:@=AGENT@:>@], [User agent to use on http requests])],
1506 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
1507 AC_DEFINE_UNQUOTED([COLLECTD_USERAGENT], ["$withval"], [User agent for http requests])
1514 # --with-data-max-name-len {{{
1515 AC_ARG_WITH([data-max-name-len],
1516 [AS_HELP_STRING([--with-data-max-name-len@<:@=VALUE@:>@], [Maximum length of data buffers])],
1518 if test "x$withval" != "x" && test $withval -gt 0; then
1519 AC_DEFINE_UNQUOTED([DATA_MAX_NAME_LEN], [$withval], [Maximum length of data buffers])
1521 AC_MSG_ERROR([DATA_MAX_NAME_LEN must be a positive integer -- $withval given])
1524 [AC_DEFINE([DATA_MAX_NAME_LEN], [128], [Maximum length of data buffers])]
1528 AC_CHECK_FUNCS([getfsstat], [have_getfsstat="yes"], [have_getfsstat="no"])
1529 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"], [have_getvfsstat="no"])
1530 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"], [have_listmntent="no"])
1531 AC_CHECK_FUNCS(getmntent_r, [have_getmntent_r="yes"], [have_getmntent_r="no"])
1533 AC_CHECK_FUNCS(getmntent, [have_getmntent="libc"], [have_getmntent="no"])
1534 if test "x$have_getmntent" = "xno"; then
1535 AC_CHECK_LIB([sun], [getmntent],
1536 [have_getmntent="sun"],
1537 [have_gemntent="no"]
1541 if test "x$have_getmntent" = "xno"; then
1542 AC_CHECK_LIB([seq], [getmntent],
1543 [have_getmntent="seq"],
1544 [have_getmntent="no"]
1548 if test "x$have_getmntent" = "xno"; then
1549 AC_CHECK_LIB([gen], [getmntent],
1550 [have_getmntent="gen"],
1551 [have_getmntent="no"]
1555 if test "x$have_getmntent" = "xlibc"; then
1556 AC_CACHE_CHECK([whether getmntent takes one argument],
1557 [c_cv_have_one_getmntent],
1562 [[#include "$srcdir/src/utils_mount.h"]],
1566 fh = setmntent ("/etc/mtab", "r");
1567 me = getmntent (fh);
1568 return me->mnt_passno;
1572 [c_cv_have_one_getmntent="yes"],
1573 [c_cv_have_one_getmntent="no"]
1578 AC_CACHE_CHECK([whether getmntent takes two arguments],
1579 [c_cv_have_two_getmntent],
1584 [[#include "$srcdir/src/utils_mount.h"]],
1589 fh = fopen ("/etc/mnttab", "r");
1590 status = getmntent (fh, &mt);
1595 [c_cv_have_two_getmntent="yes"],
1596 [c_cv_have_two_getmntent="no"]
1602 # Check for different versions of `getmntent' here..
1604 if test "x$have_getmntent" = "xlibc"; then
1605 if test "x$c_cv_have_one_getmntent" = "xyes"; then
1606 AC_DEFINE([HAVE_ONE_GETMNTENT], [1],
1607 [Define if the function getmntent exists and takes one argument.]
1611 if test "x$c_cv_have_two_getmntent" = "xyes"; then
1612 AC_DEFINE([HAVE_TWO_GETMNTENT], [1],
1613 [Define if the function getmntent exists and takes two arguments.]
1618 if test "x$have_getmntent" = "xsun"; then
1619 AC_DEFINE([HAVE_SUN_GETMNTENT], [1],
1620 [Define if the function getmntent exists. It is the version from libsun.]
1624 if test "x$have_getmntent" = "xgen"; then
1625 AC_DEFINE([HAVE_GEN_GETMNTENT], [1],
1626 [Define if the function getmntent exists. It is the version from libgen.]
1631 AC_CACHE_CHECK([whether htonll is defined],
1638 #include <inttypes.h>
1639 #include <sys/types.h>
1640 #include <netinet/in.h>
1642 [[return htonll(0);]]
1645 [c_cv_have_htonll="yes"],
1646 [c_cv_have_htonll="no"]
1651 if test "x$c_cv_have_htonll" = "xyes"; then
1652 AC_DEFINE([HAVE_HTONLL], [1], [Define if the function htonll exists.])
1655 # Check for structures
1656 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
1657 [AC_DEFINE([HAVE_STRUCT_IF_DATA], [1], [Define if struct if_data exists and is usable.])],
1660 #include <sys/types.h>
1661 #include <sys/socket.h>
1666 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
1667 [AC_DEFINE([HAVE_STRUCT_NET_DEVICE_STATS], [1], [Define if struct net_device_stats exists and is usable.])],
1670 #include <sys/types.h>
1671 #include <sys/socket.h>
1672 #include <linux/if.h>
1673 #include <linux/netdevice.h>
1677 AC_CHECK_MEMBERS([struct inet_diag_req.id, struct inet_diag_req.idiag_states],
1678 [AC_DEFINE([HAVE_STRUCT_LINUX_INET_DIAG_REQ], [1], [Define if struct inet_diag_req exists and is usable.])],
1680 [[#include <linux/inet_diag.h>]]
1683 AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [],
1686 #include <netinet/in.h>
1691 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
1693 AC_DEFINE([HAVE_STRUCT_KINFO_PROC_FREEBSD], [1], [Define if struct kinfo_proc exists in the FreeBSD variant.])
1694 have_struct_kinfo_proc_freebsd="yes"
1699 #include <sys/param.h>
1700 #include <sys/sysctl.h>
1701 #include <sys/user.h>
1705 AC_CHECK_MEMBERS([struct kinfo_proc.p_pid, struct kinfo_proc.p_vm_rssize],
1707 AC_DEFINE([HAVE_STRUCT_KINFO_PROC_OPENBSD], [1], [Define if struct kinfo_proc exists in the OpenBSD variant.])
1708 have_struct_kinfo_proc_openbsd="yes"
1712 #include <sys/param.h>
1713 #include <sys/sysctl.h>
1718 AC_CHECK_MEMBERS([struct kinfo_proc2.p_pid, struct kinfo_proc2.p_uru_maxrss],
1720 AC_DEFINE([HAVE_STRUCT_KINFO_PROC2_NETBSD], [1], [Define if struct kinfo_proc2 exists in the NetBSD variant.])
1721 have_struct_kinfo_proc2_netbsd="yes"
1725 #include <sys/param.h>
1726 #include <sys/sysctl.h>
1731 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport],
1736 #define _DEFAULT_SOURCE
1738 #if HAVE_SYS_TYPES_H
1739 # include <sys/types.h>
1741 #if HAVE_NETINET_IN_SYSTM_H
1742 # include <netinet/in_systm.h>
1744 #if HAVE_NETINET_IN_H
1745 # include <netinet/in.h>
1747 #if HAVE_NETINET_IP_H
1748 # include <netinet/ip.h>
1750 #if HAVE_NETINET_UDP_H
1751 # include <netinet/udp.h>
1756 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source],
1761 #define _DEFAULT_SOURCE
1763 #if HAVE_SYS_TYPES_H
1764 # include <sys/types.h>
1766 #if HAVE_NETINET_IN_SYSTM_H
1767 # include <netinet/in_systm.h>
1769 #if HAVE_NETINET_IN_H
1770 # include <netinet/in.h>
1772 #if HAVE_NETINET_IP_H
1773 # include <netinet/ip.h>
1775 #if HAVE_NETINET_UDP_H
1776 # include <netinet/udp.h>
1781 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
1784 [[# include <kstat.h>]]
1787 # check for pthread_setname_np
1788 SAVE_LDFLAGS="$LDFLAGS"
1789 LDFLAGS="$LDFLAGS -lpthread"
1791 AC_MSG_CHECKING([for pthread_setname_np])
1792 have_pthread_setname_np="no"
1798 #include <pthread.h>
1800 [[pthread_setname_np((pthread_t) {0}, "conftest");]]
1804 have_pthread_setname_np="yes"
1805 AC_DEFINE(HAVE_PTHREAD_SETNAME_NP, 1, [pthread_setname_np() is available.])
1809 AC_MSG_RESULT([$have_pthread_setname_np])
1811 # check for pthread_set_name_np(3) (FreeBSD)
1812 AC_MSG_CHECKING([for pthread_set_name_np])
1813 have_pthread_set_name_np="no"
1817 [[#include <pthread_np.h>]],
1818 [[pthread_set_name_np((pthread_t) {0}, "conftest");]]
1822 have_pthread_set_name_np="yes"
1823 AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP, 1, [pthread_set_name_np() is available.])
1826 AC_MSG_RESULT([$have_pthread_set_name_np])
1828 LDFLAGS="$SAVE_LDFLAGS"
1830 AC_CHECK_TYPES([struct ip6_ext],
1831 [have_ip6_ext="yes"],
1832 [have_ip6_ext="no"],
1835 #if HAVE_SYS_TYPES_H
1836 # include <sys/types.h>
1838 #if HAVE_NETINET_IN_SYSTM_H
1839 # include <netinet/in_systm.h>
1841 #if HAVE_NETINET_IN_H
1842 # include <netinet/in.h>
1844 #if HAVE_NETINET_IP6_H
1845 # include <netinet/ip6.h>
1850 if test "x$have_ip6_ext" = "xno"; then
1851 SAVE_CFLAGS="$CFLAGS"
1852 CFLAGS="$CFLAGS -DSOLARIS2=8"
1853 AC_CHECK_TYPES([struct ip6_ext],
1854 [have_ip6_ext="yes, with -DSOLARIS2=8"],
1855 [have_ip6_ext="no"],
1858 #if HAVE_SYS_TYPES_H
1859 # include <sys/types.h>
1861 #if HAVE_NETINET_IN_SYSTM_H
1862 # include <netinet/in_systm.h>
1864 #if HAVE_NETINET_IN_H
1865 # include <netinet/in.h>
1867 #if HAVE_NETINET_IP6_H
1868 # include <netinet/ip6.h>
1872 if test "x$have_ip6_ext" = "xno"; then
1873 CFLAGS="$SAVE_CFLAGS"
1878 if test "x$ac_system" = "xLinux"; then
1879 AC_CHECK_DECL([i2c_smbus_read_i2c_block_data],
1880 [with_libi2c="yes"],
1881 [with_libi2c="no (symbol i2c_smbus_read_i2c_block_data not found - have you installed libi2c-dev ?)"],
1884 #include <linux/i2c-dev.h>
1888 with_libi2c="no (Linux only)"
1892 # Checks for libraries begin here
1895 # Check for libpthread
1897 AC_CHECK_LIB([pthread],
1900 [AC_MSG_ERROR([Symbol 'pthread_create' not found in libpthread])],
1903 PTHREAD_LIBS="$LIBS"
1905 AC_SUBST([PTHREAD_LIBS])
1907 AC_CHECK_HEADERS([pthread.h],
1909 [AC_MSG_ERROR([pthread.h not found])]
1912 m4_divert_once([HELP_WITH], [
1913 Collectd additional packages:])
1915 if test "x$ac_system" = "xAIX"; then
1919 with_perfstat="no (AIX only)"
1920 with_procinfo="no (AIX only)"
1923 if test "x$with_perfstat" = "xyes"; then
1924 AC_CHECK_LIB([perfstat], [perfstat_reset],
1925 [with_perfstat="yes"],
1926 [with_perfstat="no (perfstat not found)"]
1930 if test "x$with_perfstat" = "xyes"; then
1931 AC_DEFINE([HAVE_PERFSTAT], [1], [Define to 1 if you have the 'perfstat' library (-lperfstat)])
1932 # struct members pertaining to donation have been added to libperfstat somewhere between AIX5.3ML5 and AIX5.3ML9
1933 AC_CHECK_MEMBER([perfstat_partition_type_t.b.donate_enabled],
1936 [[#include <libperfstat.h]]
1938 if test "x$av_cv_member_perfstat_partition_type_t_b_donate_enabled" = "xyes"; then
1939 AC_DEFINE([PERFSTAT_SUPPORTS_DONATION], [1], [Define to 1 if your version of the 'perfstat' library supports donation])
1942 AM_CONDITIONAL([BUILD_WITH_PERFSTAT], [test "x$with_perfstat" = "xyes"])
1944 # Processes plugin under AIX.
1945 if test "x$with_procinfo" = "xyes"; then
1946 AC_CHECK_HEADERS([procinfo.h],
1947 [AC_DEFINE([HAVE_PROCINFO_H], [1], [Define to 1 if you have the procinfo.h])],
1948 [with_procinfo="no (procinfo.h not found)"]
1952 if test "x$ac_system" = "xSolaris"; then
1956 with_kstat="no (Solaris only)"
1957 with_devinfo="no (Solaris only)"
1960 if test "x$with_kstat" = "xyes"; then
1961 AC_CHECK_LIB([kstat], [kstat_open],
1963 [with_kstat="no (libkstat not found)"]
1967 if test "x$with_kstat" = "xyes"; then
1968 AC_CHECK_LIB([devinfo], [di_init],
1969 [with_devinfo="yes"],
1970 [with_devinfo="no (not found)"]
1972 AC_CHECK_HEADERS([kstat.h],
1973 [AC_DEFINE(HAVE_LIBKSTAT, [1], [Define to 1 if you have the 'kstat' library (-lkstat)])],
1974 [with_kstat="no (kstat.h not found)"]
1978 AM_CONDITIONAL([BUILD_WITH_LIBDEVINFO], [test "x$with_devinfo" = "xyes"])
1979 AM_CONDITIONAL([BUILD_WITH_LIBKSTAT], [test "x$with_kstat" = "xyes"])
1981 if test "x$ac_system" = "xDarwin"; then
1986 AM_CONDITIONAL([BUILD_WITH_LIBIOKIT], [test "x$with_libiokit" = "xyes"])
1989 AC_CHECK_LIB([kvm], [kvm_getprocs],
1990 [with_kvm_getprocs="yes"],
1991 [with_kvm_getprocs="no"]
1994 if test "x$with_kvm_getprocs" = "xyes"; then
1995 AC_DEFINE([HAVE_LIBKVM_GETPROCS], [1],
1996 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)]
2001 AM_CONDITIONAL([BUILD_WITH_LIBKVM_GETPROCS], [test "x$with_kvm_getprocs" = "xyes"])
2003 AC_CHECK_LIB([kvm], [kvm_getswapinfo],
2004 [with_kvm_getswapinfo="yes"],
2005 [with_kvm_getswapinfo="no"]
2008 if test "x$with_kvm_getswapinfo" = "xyes"; then
2009 AC_DEFINE([HAVE_LIBKVM_GETSWAPINFO], [1],
2010 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)]
2015 AM_CONDITIONAL([BUILD_WITH_LIBKVM_GETSWAPINFO], [test "x$with_kvm_getswapinfo" = "xyes"])
2017 AC_CHECK_LIB([kvm], [kvm_nlist],
2018 [with_kvm_nlist="yes"],
2019 [with_kvm_nlist="no"]
2022 if test "x$with_kvm_nlist" = "xyes"; then
2023 AC_CHECK_HEADERS([bsd/nlist.h nlist.h])
2024 AC_DEFINE([HAVE_LIBKVM_NLIST], [1],
2025 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)]
2030 AM_CONDITIONAL([BUILD_WITH_LIBKVM_NLIST], [test "x$with_kvm_nlist" = "xyes"])
2032 AC_CHECK_LIB([kvm], [kvm_openfiles],
2033 [with_kvm_openfiles="yes"],
2034 [with_kvm_openfiles="no"]
2037 if test "x$with_kvm_openfiles" = "xyes"; then
2038 AC_DEFINE([HAVE_LIBKVM_NLIST], [1],
2039 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)]
2044 # --with-libaquaero5 {{{
2045 AC_ARG_WITH([libaquaero5],
2046 [AS_HELP_STRING([--with-libaquaero5@<:@=PREFIX@:>@], [Path to aquatools-ng source code.])],
2048 if test "x$withval" = "xyes"; then
2049 with_libaquaero5="yes"
2050 else if test "x$withval" = "xno"; then
2051 with_libaquaero5="no"
2053 with_libaquaero5="yes"
2054 LIBAQUAERO5_CFLAGS="$LIBAQUAERO5_CFLAGS -I$withval/src"
2055 LIBAQUAERO5_LDFLAGS="$LIBAQUAERO5_LDFLAGS -L$withval/obj"
2058 [with_libaquaero5="yes"]
2061 SAVE_CPPFLAGS="$CPPFLAGS"
2062 SAVE_LDFLAGS="$LDFLAGS"
2063 CPPFLAGS="$CPPFLAGS $LIBAQUAERO5_CFLAGS"
2064 LDFLAGS="$LDFLAGS $LIBAQUAERO5_LDFLAGS"
2066 if test "x$with_libaquaero5" = "xyes"; then
2067 if test "x$LIBAQUAERO5_CFLAGS" != "x"; then
2068 AC_MSG_NOTICE([libaquaero5 CPPFLAGS: $LIBAQUAERO5_CFLAGS])
2070 AC_CHECK_HEADERS([libaquaero5.h],
2071 [with_libaquaero5="yes"],
2072 [with_libaquaero5="no (libaquaero5.h not found)"]
2076 if test "x$with_libaquaero5" = "xyes"; then
2077 if test "x$LIBAQUAERO5_LDFLAGS" != "x"; then
2078 AC_MSG_NOTICE([libaquaero5 LDFLAGS: $LIBAQUAERO5_LDFLAGS])
2080 AC_CHECK_LIB([aquaero5], libaquaero5_poll,
2081 [with_libaquaero5="yes"],
2082 [with_libaquaero5="no (symbol 'libaquaero5_poll' not found)"]
2086 CPPFLAGS="$SAVE_CPPFLAGS"
2087 LDFLAGS="$SAVE_LDFLAGS"
2089 if test "x$with_libaquaero5" = "xyes"; then
2090 BUILD_WITH_LIBAQUAERO5_CFLAGS="$LIBAQUAERO5_CFLAGS"
2091 BUILD_WITH_LIBAQUAERO5_LDFLAGS="$LIBAQUAERO5_LDFLAGS"
2093 AC_SUBST([BUILD_WITH_LIBAQUAERO5_CFLAGS])
2094 AC_SUBST([BUILD_WITH_LIBAQUAERO5_LDFLAGS])
2097 # --with-libhiredis {{{
2098 AC_ARG_WITH([libhiredis],
2099 [AS_HELP_STRING([--with-libhiredis@<:@=PREFIX@:>@], [Path to libhiredis.])],
2101 if test "x$withval" = "xyes"; then
2102 with_libhiredis="yes"
2103 else if test "x$withval" = "xno"; then
2104 with_libhiredis="no"
2106 with_libhiredis="yes"
2107 LIBHIREDIS_CPPFLAGS="$LIBHIREDIS_CPPFLAGS -I$withval/include"
2108 LIBHIREDIS_LDFLAGS="$LIBHIREDIS_LDFLAGS -L$withval/lib"
2111 [with_libhiredis="yes"]
2114 SAVE_CPPFLAGS="$CPPFLAGS"
2115 SAVE_LDFLAGS="$LDFLAGS"
2116 CPPFLAGS="$CPPFLAGS $LIBHIREDIS_CPPFLAGS"
2117 LDFLAGS="$LDFLAGS $LIBHIREDIS_LDFLAGS"
2119 if test "x$with_libhiredis" = "xyes"; then
2120 if test "x$LIBHIREDIS_CPPFLAGS" != "x"; then
2121 AC_MSG_NOTICE([libhiredis CPPFLAGS: $LIBHIREDIS_CPPFLAGS])
2123 AC_CHECK_HEADERS([hiredis/hiredis.h],
2124 [with_libhiredis="yes"],
2125 [with_libhiredis="no (hiredis.h not found)"]
2129 if test "x$with_libhiredis" = "xyes"; then
2130 if test "x$LIBHIREDIS_LDFLAGS" != "x"; then
2131 AC_MSG_NOTICE([libhiredis LDFLAGS: $LIBHIREDIS_LDFLAGS])
2133 AC_CHECK_LIB([hiredis], [redisCommand],
2134 [with_libhiredis="yes"],
2135 [with_libhiredis="no (symbol 'redisCommand' not found)"]
2139 CPPFLAGS="$SAVE_CPPFLAGS"
2140 LDFLAGS="$SAVE_LDFLAGS"
2142 if test "x$with_libhiredis" = "xyes"; then
2143 BUILD_WITH_LIBHIREDIS_CPPFLAGS="$LIBHIREDIS_CPPFLAGS"
2144 BUILD_WITH_LIBHIREDIS_LDFLAGS="$LIBHIREDIS_LDFLAGS"
2147 AC_SUBST([BUILD_WITH_LIBHIREDIS_CPPFLAGS])
2148 AC_SUBST([BUILD_WITH_LIBHIREDIS_LDFLAGS])
2151 # --with-libcurl {{{
2152 with_curl_config="curl-config"
2155 AC_ARG_WITH(libcurl,
2156 [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
2158 if test "x$withval" = "xno"; then
2160 else if test "x$withval" = "xyes"; then
2163 if test -f "$withval" && test -x "$withval"; then
2164 with_curl_config="$withval"
2166 else if test -x "$withval/bin/curl-config"; then
2167 with_curl_config="$withval/bin/curl-config"
2173 [with_libcurl="yes"]
2176 if test "x$with_libcurl" = "xyes"; then
2177 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
2178 curl_config_status=$?
2180 if test $curl_config_status -ne 0; then
2181 with_libcurl="no ($with_curl_config failed)"
2183 SAVE_CPPFLAGS="$CPPFLAGS"
2184 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
2186 AC_CHECK_HEADERS([curl/curl.h],
2187 [with_libcurl="yes"],
2188 [with_libcurl="no (curl/curl.h not found)"]
2191 CPPFLAGS="$SAVE_CPPFLAGS"
2195 if test "x$with_libcurl" = "xyes"; then
2196 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
2197 curl_config_status=$?
2199 if test $curl_config_status -ne 0; then
2200 with_libcurl="no ($with_curl_config failed)"
2202 AC_CHECK_LIB([curl], [curl_easy_init],
2203 [with_libcurl="yes"],
2204 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
2208 AC_CHECK_DECL([CURLOPT_USERNAME],
2209 [have_curlopt_username="yes"],
2210 [have_curlopt_username="no"],
2211 [[#include <curl/curl.h>]]
2214 AC_CHECK_DECL(CURLOPT_TIMEOUT_MS,
2215 [have_curlopt_timeout="yes"],
2216 [have_curlopt_timeout="no"],
2217 [[#include <curl/curl.h>]]
2222 if test "x$with_libcurl" = "xyes"; then
2223 SAVE_CPPFLAGS="$CPPFLAGS"
2224 SAVE_LDFLAGS="$LDFLAGS"
2225 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
2226 LDFLAGS="$LDFLAGS $with_curl_libs"
2227 AC_CACHE_CHECK([for CURLINFO_APPCONNECT_TIME],
2228 [c_cv_have_curlinfo_appconnect_time],
2233 [[#include <curl/curl.h>]],
2235 int val = CURLINFO_APPCONNECT_TIME;
2240 [c_cv_have_curlinfo_appconnect_time="yes"],
2241 [c_cv_have_curlinfo_appconnect_time="no"]
2245 CPPFLAGS="$SAVE_CPPFLAGS"
2246 LDFLAGS="$SAVE_LDFLAGS"
2249 if test "x$c_cv_have_curlinfo_appconnect_time" = "xyes"; then
2250 AC_DEFINE([HAVE_CURLINFO_APPCONNECT_TIME], [1],
2251 [Define if curl.h defines CURLINFO_APPCONNECT_TIME.]
2255 if test "x$with_libcurl" = "xyes"; then
2256 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
2257 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
2259 if test "x$have_curlopt_username" = "xyes"; then
2260 AC_DEFINE([HAVE_CURLOPT_USERNAME], [1],
2261 [Define if libcurl supports CURLOPT_USERNAME option.]
2265 if test "x$have_curlopt_timeout" = "xyes"; then
2266 AC_DEFINE([HAVE_CURLOPT_TIMEOUT_MS], [1],
2267 [Define if libcurl supports CURLOPT_TIMEOUT_MS option.]
2272 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
2273 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
2277 AC_ARG_WITH([libdbi],
2278 [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
2280 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
2281 with_libdbi_cppflags="-I$withval/include"
2282 with_libdbi_ldflags="-L$withval/lib"
2285 with_libdbi="$withval"
2291 if test "x$with_libdbi" = "xyes"; then
2292 SAVE_CPPFLAGS="$CPPFLAGS"
2293 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
2295 AC_CHECK_HEADERS([dbi/dbi.h],
2296 [with_libdbi="yes"],
2297 [with_libdbi="no (dbi/dbi.h not found)"]
2300 CPPFLAGS="$SAVE_CPPFLAGS"
2303 if test "x$with_libdbi" = "xyes"; then
2304 SAVE_LDFLAGS="$LDFLAGS"
2305 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
2307 AC_CHECK_LIB([dbi], [dbi_initialize],
2308 [with_libdbi="yes"],
2309 [with_libdbi="no (Symbol 'dbi_initialize' not found)"]
2312 LDFLAGS="$SAVE_LDFLAGS"
2315 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
2316 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
2317 BUILD_WITH_LIBDBI_LIBS="-ldbi"
2318 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
2319 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
2320 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
2323 # --with-libdpdk {{{
2324 AC_ARG_VAR([LIBDPDK_CPPFLAGS], [Preprocessor flags for libdpdk])
2325 AC_ARG_VAR([LIBDPDK_CFLAGS], [Compiler flags for libdpdk])
2326 AC_ARG_VAR([LIBDPDK_LDFLAGS], [Linker flags for libdpdk])
2327 AC_ARG_VAR([LIBDPDK_LIBS], [Libraries to link for libdpdk])
2329 AC_ARG_WITH([libdpdk],
2330 [AS_HELP_STRING([--without-libdpdk], [Disable libdpdk.])],
2331 [with_libdpdk="$withval"],
2332 [with_libdpdk="yes"]
2335 if test "x$with_libdpdk" != "xno"; then
2336 PKG_CHECK_MODULES([DPDK], [libdpdk], [],
2337 [AC_MSG_NOTICE([no DPDK pkg-config, using defaults])])
2338 if test "x$LIBDPDK_CPPFLAGS" = "x"; then
2339 LIBDPDK_CPPFLAGS="-I/usr/include/dpdk"
2341 if test "x$LIBDPDK_CFLAGS" = "x"; then
2342 LIBDPDK_CFLAGS="$DPDK_CFLAGS"
2343 LIBDPDK_CPPFLAGS="$LIBDPDK_CPPFLAGS $DPDK_CFLAGS"
2345 if test "x$LIBDPDK_LIBS" = "x"; then
2346 if test "x$DPDK_LIBS" != "x"; then
2347 LIBDPDK_LIBS="$DPDK_LIBS"
2349 LIBDPDK_LIBS="-ldpdk"
2352 SAVE_CPPFLAGS="$CPPFLAGS"
2353 CPPFLAGS="$LIBDPDK_CPPFLAGS $CPPFLAGS"
2354 SAVE_CFLAGS="$CFLAGS"
2355 CFLAGS="$LIBDPDK_CFLAGS $CFLAGS"
2356 AC_CHECK_HEADERS([rte_config.h],
2363 #include <rte_version.h>
2364 #if RTE_VERSION < RTE_VERSION_NUM(16,7,0,0)
2365 #error "required DPDK >= 16.07"
2370 [dpdk_keepalive="yes"],
2371 [dpdk_keepalive="no (DPDK version < 16.07)"]
2374 [with_libdpdk="no (rte_config.h not found)"]
2376 CPPFLAGS="$SAVE_CPPFLAGS"
2377 CFLAGS="$SAVE_CFLAGS"
2380 if test "x$with_libdpdk" = "xyes"; then
2381 SAVE_LDFLAGS="$LDFLAGS"
2382 LDFLAGS="$LIBDPDK_LDFLAGS $LDFLAGS"
2383 AC_CHECK_LIB([dpdk], [rte_eal_init],
2384 [with_libdpdk="yes"],
2385 [with_libdpdk="no (symbol 'rte_eal_init' not found)"]
2387 LDFLAGS="$SAVE_LDFLAGS"
2392 # --with-libesmtp {{{
2393 AC_ARG_WITH([libesmtp],
2394 [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
2396 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
2397 with_libesmtp_cppflags="-I$withval/include"
2398 with_libesmtp_ldflags="-L$withval/lib"
2401 with_libesmtp="$withval"
2404 [with_libesmtp="yes"]
2407 if test "x$with_libesmtp" = "xyes"; then
2408 SAVE_CPPFLAGS="$CPPFLAGS"
2409 CPPFLAGS="$CPPFLAGS $with_libesmtp_cppflags"
2411 AC_CHECK_HEADERS([libesmtp.h],
2412 [with_libesmtp="yes"],
2413 [with_libesmtp="no (libesmtp.h not found)"]
2416 CPPFLAGS="$SAVE_CPPFLAGS"
2419 if test "x$with_libesmtp" = "xyes"; then
2420 SAVE_LDFLAGS="$LDFLAGS"
2421 LDFLAGS="$LDFLAGS $with_esmtp_ldflags"
2423 AC_CHECK_LIB([esmtp], [smtp_create_session],
2424 [with_libesmtp="yes"],
2425 [with_libesmtp="no (Symbol 'smtp_create_session' not found)"]
2428 LDFLAGS="$SAVE_LDFLAGS"
2431 BUILD_WITH_LIBESMTP_CPPFLAGS="$with_libesmtp_cppflags"
2432 BUILD_WITH_LIBESMTP_LDFLAGS="$with_libesmtp_ldflags"
2433 BUILD_WITH_LIBESMTP_LIBS="-lesmtp"
2434 AC_SUBST(BUILD_WITH_LIBESMTP_CPPFLAGS)
2435 AC_SUBST(BUILD_WITH_LIBESMTP_LDFLAGS)
2436 AC_SUBST(BUILD_WITH_LIBESMTP_LIBS)
2439 # --with-libganglia {{{
2440 AC_ARG_WITH([libganglia],
2441 [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
2443 if test -f "$withval" && test -x "$withval"; then
2444 with_libganglia_config="$withval"
2445 with_libganglia="yes"
2446 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"; then
2447 with_libganglia_config="$withval/bin/ganglia-config"
2448 with_libganglia="yes"
2449 else if test -d "$withval"; then
2450 GANGLIA_CPPFLAGS="-I$withval/include"
2451 GANGLIA_LDFLAGS="-L$withval/lib"
2452 with_libganglia="yes"
2454 with_libganglia="$withval"
2457 [with_libganglia="yes"]
2460 if test "x$with_libganglia" = "xyes"; then
2461 if test "x$with_libganglia_config" != "x"; then
2462 if test "x$GANGLIA_CPPFLAGS" = "x"; then
2463 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
2466 if test "x$GANGLIA_LDFLAGS" = "x"; then
2467 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
2470 if test "x$GANGLIA_LIBS" = "x"; then
2471 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
2474 GANGLIA_LIBS="-lganglia"
2478 SAVE_CPPFLAGS="$CPPFLAGS"
2479 SAVE_LDFLAGS="$LDFLAGS"
2480 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
2481 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
2483 if test "x$with_libganglia" = "xyes"; then
2484 AC_CHECK_HEADERS([gm_protocol.h],
2485 [with_libganglia="yes"],
2486 [with_libganglia="no (gm_protocol.h not found)"]
2490 if test "x$with_libganglia" = "xyes"; then
2491 AC_CHECK_LIB([ganglia], [xdr_Ganglia_value_msg],
2492 [with_libganglia="yes"],
2493 [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"]
2497 CPPFLAGS="$SAVE_CPPFLAGS"
2498 LDFLAGS="$SAVE_LDFLAGS"
2500 AC_SUBST(GANGLIA_CPPFLAGS)
2501 AC_SUBST(GANGLIA_LDFLAGS)
2502 AC_SUBST(GANGLIA_LIBS)
2505 # --with-libgcrypt {{{
2506 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
2507 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
2508 GCRYPT_LIBS="$GCRYPT_LIBS"
2509 AC_ARG_WITH([libgcrypt],
2510 [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
2512 if test -f "$withval" && test -x "$withval"; then
2513 with_libgcrypt_config="$withval"
2514 with_libgcrypt="yes"
2515 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"; then
2516 with_libgcrypt_config="$withval/bin/gcrypt-config"
2517 with_libgcrypt="yes"
2518 else if test -d "$withval"; then
2519 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
2520 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
2521 with_libgcrypt="yes"
2523 with_libgcrypt_config="gcrypt-config"
2524 with_libgcrypt="$withval"
2528 with_libgcrypt_config="libgcrypt-config"
2529 with_libgcrypt="yes"
2533 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"; then
2534 if test "x$GCRYPT_CPPFLAGS" = "x"; then
2535 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
2538 if test "x$GCRYPT_LIBS" = "x"; then
2539 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
2543 SAVE_CPPFLAGS="$CPPFLAGS"
2544 SAVE_LDFLAGS="$LDFLAGS"
2546 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
2547 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
2548 LIBS="$LIBS $GCRYPT_LIBS"
2550 if test "x$with_libgcrypt" = "xyes"; then
2551 if test "x$GCRYPT_CPPFLAGS" != "x"; then
2552 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
2554 AC_CHECK_HEADERS([gcrypt.h],
2555 [with_libgcrypt="yes"],
2556 [with_libgcrypt="no (gcrypt.h not found)"]
2560 if test "x$with_libgcrypt" = "xyes"; then
2561 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
2562 [with_libgcrypt="yes"],
2563 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"]
2567 CPPFLAGS="$SAVE_CPPFLAGS"
2568 LDFLAGS="$SAVE_LDFLAGS"
2571 AC_SUBST([GCRYPT_CPPFLAGS])
2572 AC_SUBST([GCRYPT_LDFLAGS])
2573 AC_SUBST([GCRYPT_LIBS])
2574 AM_CONDITIONAL([BUILD_WITH_LIBGCRYPT], [test "x$with_libgcrypt" = "xyes"])
2578 AC_ARG_WITH([libgps],
2579 [AS_HELP_STRING([--with-libgps@<:@=PREFIX@:>@], [Path to libgps.])],
2581 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
2582 with_libgps_cflags="-I$withval/include"
2583 with_libgps_ldflags="-L$withval/lib"
2586 with_libgps="$withval"
2592 if test "x$with_libgps" = "xyes"; then
2593 SAVE_CFLAGS="$CFLAGS"
2594 CFLAGS="$CFLAGS $with_libgps_cflags"
2596 AC_CHECK_HEADERS([gps.h],
2597 [with_libgps="yes"],
2598 [with_libgps="no (gps.h not found)"]
2601 CFLAGS="$SAVE_CFLAGS"
2604 if test "x$with_libgps" = "xyes"; then
2605 SAVE_LDFLAGS="$LDFLAGS"
2606 LDFLAGS="$LDFLAGS $with_libgps_ldflags"
2608 AC_CHECK_LIB([gps], [gps_open],
2609 [with_libgps="yes"],
2610 [with_libgps="no (symbol gps_open not found)"]
2613 LDFLAGS="$SAVE_LDFLAGS"
2616 if test "x$with_libgps" = "xyes"; then
2617 BUILD_WITH_LIBGPS_CFLAGS="$with_libgps_cflags"
2618 BUILD_WITH_LIBGPS_LDFLAGS="$with_libgps_ldflags"
2619 BUILD_WITH_LIBGPS_LIBS="-lgps"
2622 AC_SUBST([BUILD_WITH_LIBGPS_CFLAGS])
2623 AC_SUBST([BUILD_WITH_LIBGPS_LDFLAGS])
2624 AC_SUBST([BUILD_WITH_LIBGPS_LIBS])
2628 # --with-libgrpc++ {{{
2629 AC_ARG_WITH([libgrpc++],
2630 [AS_HELP_STRING([--with-libgrpc++@<:@=PREFIX@:>@], [Path to libgrpc++.])],
2632 with_grpcpp="$withval"
2633 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
2634 with_libgrpcpp_cppflags="-I$withval/include"
2635 with_libgrpcpp_ldflags="-L$withval/lib"
2636 with_libgrpcpp_bin="$withval/bin"
2637 with_libgrpcpp="yes"
2639 if test "x$withval" = "xno"; then
2640 with_libgrpcpp="no (disabled on command line)"
2645 if test "x$withval" = "xyes"; then
2646 PKG_CHECK_MODULES([GRPCPP], [grpc++],
2647 [with_libgrpcpp="yes"],
2648 [with_libgrpcpp="no (pkg-config could not find libgrpc++)"]
2652 if test "x$withval" != "xno"; then
2653 AC_MSG_CHECKING([whether $CXX accepts -std=c++11])
2654 if test_cxx_flags -std=c++11; then
2655 AC_MSG_RESULT([yes])
2658 with_libgrpcpp="no (requires C++11 support)"
2662 if test "x$with_libgrpcpp" = "xyes"; then
2664 SAVE_CPPFLAGS="$CPPFLAGS"
2665 CPPFLAGS="-std=c++11 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
2666 AC_CHECK_HEADERS([grpc++/grpc++.h],
2667 [with_libgrpcpp="yes"],
2668 [with_libgrpcpp="no (<grpc++/grpc++.h> not found)"]
2670 CPPFLAGS="$SAVE_CPPFLAGS"
2674 if test "x$with_libgrpcpp" = "xyes"; then
2676 SAVE_CPPFLAGS="$CPPFLAGS"
2677 SAVE_LDFLAGS="$LDFLAGS"
2679 CPPFLAGS="-std=c++11 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS $CPPFLAGS"
2680 LDFLAGS="$with_libgrpcpp_ldflags"
2681 if test "x$GRPCPP_LIBS" = "x"; then
2689 [[#include <grpc++/grpc++.h>]],
2690 [[grpc::ServerBuilder sb;]]
2694 with_libgrpcpp="yes"
2695 if test "x$GRPCPP_LIBS" = "x"; then
2696 GRPCPP_LIBS="-lgrpc++"
2699 [with_libgrpcpp="no (libgrpc++ not found)"]
2701 CPPFLAGS="$SAVE_CPPFLAGS"
2702 LDFLAGS="$SAVE_LDFLAGS"
2707 BUILD_WITH_LIBGRPCPP_CPPFLAGS="-std=c++11 $with_libgrpcpp_cppflags $GRPCPP_CFLAGS"
2708 BUILD_WITH_LIBGRPCPP_LDFLAGS="$with_libgrpcpp_ldflags"
2709 BUILD_WITH_LIBGRPCPP_LIBS="$GRPCPP_LIBS"
2710 AC_SUBST([BUILD_WITH_LIBGRPCPP_CPPFLAGS])
2711 AC_SUBST([BUILD_WITH_LIBGRPCPP_LDFLAGS])
2712 AC_SUBST([BUILD_WITH_LIBGRPCPP_LIBS])
2715 AC_ARG_VAR([GRPC_CPP_PLUGIN], [path to the grpc_cpp_plugin binary])
2716 if test "x$with_libgrpcpp_bin" = "x"; then
2717 AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin])
2719 AC_PATH_PROG([GRPC_CPP_PLUGIN], [grpc_cpp_plugin], [], "$with_libgrpcpp_bin:$PATH")
2721 AM_CONDITIONAL([HAVE_GRPC_CPP], [test "x$GRPC_CPP_PLUGIN" != "x"])
2723 # --with-libiptc {{{
2724 AC_ARG_WITH([libiptc],
2725 [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
2727 if test "x$withval" = "xyes"; then
2728 with_libiptc="pkgconfig"
2729 else if test "x$withval" = "xno"; then
2733 with_libiptc_cflags="-I$withval/include"
2734 with_libiptc_libs="-L$withval/lib"
2738 if test "x$ac_system" = "xLinux"; then
2739 with_libiptc="pkgconfig"
2741 with_libiptc="no (Linux only)"
2746 if test "x$with_libiptc" = "xpkgconfig"; then
2747 $PKG_CONFIG --exists 'libiptc' 2>/dev/null
2748 if test $? -ne 0; then
2749 with_libiptc="no (pkg-config doesn't know libiptc)"
2753 if test "x$with_libiptc" = "xpkgconfig"; then
2754 with_libiptc_cflags="`$PKG_CONFIG --cflags 'libiptc'`"
2755 if test $? -ne 0; then
2756 with_libiptc="no ($PKG_CONFIG failed)"
2759 with_libiptc_libs="`$PKG_CONFIG --libs 'libiptc'`"
2760 if test $? -ne 0; then
2761 with_libiptc="no ($PKG_CONFIG failed)"
2765 SAVE_CPPFLAGS="$CPPFLAGS"
2766 CPPFLAGS="$CPPFLAGS $with_libiptc_cflags"
2768 # check whether the header file for libiptc is available.
2769 if test "x$with_libiptc" = "xpkgconfig"; then
2770 AC_CHECK_HEADERS([libiptc/libiptc.h libiptc/libip6tc.h],
2772 [with_libiptc="no (header file missing)"]
2776 # If the header file is available, check for the required type declaractions.
2777 # They may be missing in old versions of libiptc. In that case, they will be
2778 # declared in the iptables plugin.
2779 if test "x$with_libiptc" = "xpkgconfig"; then
2780 AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [])
2783 # Check for the iptc_init symbol in the library.
2784 # This could be in iptc or ip4tc
2785 if test "x$with_libiptc" = "xpkgconfig"; then
2787 AC_SEARCH_LIBS([iptc_init], [iptc ip4tc],
2788 [with_libiptc="pkgconfig"],
2789 [with_libiptc="no"],
2790 [$with_libiptc_libs]
2795 if test "x$with_libiptc" = "xpkgconfig"; then
2799 CPPFLAGS="$SAVE_CPPFLAGS"
2801 if test "x$with_libiptc" = "xyes"; then
2802 BUILD_WITH_LIBIPTC_CPPFLAGS="$with_libiptc_cflags"
2803 BUILD_WITH_LIBIPTC_LDFLAGS="$with_libiptc_libs"
2805 AC_SUBST([BUILD_WITH_LIBIPTC_CPPFLAGS])
2806 AC_SUBST([BUILD_WITH_LIBIPTC_LDFLAGS])
2810 with_java_home="$JAVA_HOME"
2811 if test "x$with_java_home" = "x"; then
2812 with_java_home="/usr/lib/jvm"
2818 [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
2820 if test "x$withval" = "xno"; then
2822 else if test "x$withval" = "xyes"; then
2825 with_java_home="$withval"
2832 AX_COMPARE_VERSION([$am__api_version],[lt],[1.12],
2833 [JAVA_TIMESTAMP_FILE="classdist_noinst.stamp"],
2834 [JAVA_TIMESTAMP_FILE="classnoinst.stamp"])
2835 if test "x$with_java" = "xyes"; then
2836 if test -d "$with_java_home"; then
2837 AC_MSG_CHECKING([for jni.h])
2838 TMPVAR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | LC_ALL=C sort | head -n 1`
2839 if test "x$TMPVAR" != "x"; then
2840 AC_MSG_RESULT([found in $TMPVAR])
2841 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR"
2843 AC_MSG_RESULT([not found])
2846 AC_MSG_CHECKING([for jni_md.h])
2847 TMPVAR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | LC_ALL=C sort | head -n 1`
2848 if test "x$TMPVAR" != "x"; then
2849 AC_MSG_RESULT([found in $TMPVAR])
2850 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR"
2852 AC_MSG_RESULT([not found])
2855 AC_MSG_CHECKING([for libjvm.so])
2856 TMPVAR=`find -L "$with_java_home" -type f \( -name libjvm.so -o -name libjvm.dylib \) -exec 'dirname' '{}' ';' 2>/dev/null | LC_ALL=C sort | head -n 1`
2857 if test "x$TMPVAR" != "x"; then
2858 AC_MSG_RESULT([found in $TMPVAR])
2859 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPVAR -Wl,-rpath -Wl,$TMPVAR"
2861 AC_MSG_RESULT([not found])
2864 if test "x$JAVAC" = "x"; then
2865 AC_MSG_CHECKING([for javac])
2866 TMPVAR=`find -L "$with_java_home" -name javac -type f 2>/dev/null | LC_ALL=C sort | head -n 1`
2867 if test "x$TMPVAR" != "x"; then
2869 AC_MSG_RESULT([$JAVAC])
2871 AC_MSG_RESULT([not found])
2875 if test "x$JAR" = "x"; then
2876 AC_MSG_CHECKING([for jar])
2877 TMPVAR=`find -L "$with_java_home" -name jar -type f 2>/dev/null | LC_ALL=C sort | head -n 1`
2878 if test "x$TMPVAR" != "x"; then
2880 AC_MSG_RESULT([$JAR])
2882 AC_MSG_RESULT([not found])
2885 else if test "x$with_java_home" != "x"; then
2886 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
2890 if test "x$JAVA_CPPFLAGS" != "x"; then
2891 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
2893 if test "x$JAVA_CFLAGS" != "x"; then
2894 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
2896 if test "x$JAVA_LDFLAGS" != "x"; then
2897 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
2899 if test "x$JAVA_LIBS" != "x"; then
2900 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
2902 if test "x$JAVAC" = "x"; then
2903 with_javac_path="$PATH"
2904 if test "x$with_java_home" != "x"; then
2905 with_javac_path="$with_java_home:with_javac_path"
2906 if test -d "$with_java_home/bin"; then
2907 with_javac_path="$with_java_home/bin:with_javac_path"
2911 AC_PATH_PROG([JAVAC], [javac], [], "$with_javac_path")
2914 if test "x$JAVAC" = "x"; then
2915 with_java="no (javac not found)"
2918 if test "x$JAR" = "x"; then
2919 with_jar_path="$PATH"
2920 if test "x$with_java_home" != "x"; then
2921 with_jar_path="$with_java_home:$with_jar_path"
2922 if test -d "$with_java_home/bin"; then
2923 with_jar_path="$with_java_home/bin:$with_jar_path"
2927 AC_PATH_PROG([JAR], [jar], [], "$with_jar_path")
2930 if test "x$JAR" = "x"; then
2931 with_java="no (jar not found)"
2934 SAVE_CPPFLAGS="$CPPFLAGS"
2935 SAVE_CFLAGS="$CFLAGS"
2936 SAVE_LDFLAGS="$LDFLAGS"
2938 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
2939 CFLAGS="$CFLAGS $JAVA_CFLAGS"
2940 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
2941 LIBS="$LIBS $JAVA_LIBS"
2943 if test "x$with_java" = "xyes"; then
2944 AC_CHECK_HEADERS([jni.h],
2946 [with_java="no (jni.h not found)"])
2949 if test "x$with_java" = "xyes"; then
2950 AC_CHECK_LIB([jvm], [JNI_CreateJavaVM],
2952 [with_java="no (Symbol 'JNI_CreateJavaVM' not found)"],
2953 [$JAVA_LIBS $PTHREAD_LIBS]
2957 if test "x$with_java" = "xyes"; then
2958 JAVA_LIBS="$JAVA_LIBS -ljvm"
2959 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
2962 CPPFLAGS="$SAVE_CPPFLAGS"
2963 CFLAGS="$SAVE_CFLAGS"
2964 LDFLAGS="$SAVE_LDFLAGS"
2967 AC_SUBST([JAVA_CPPFLAGS])
2968 AC_SUBST([JAVA_CFLAGS])
2969 AC_SUBST([JAVA_LDFLAGS])
2970 AC_SUBST([JAVA_LIBS])
2971 AC_SUBST([JAVA_TIMESTAMP_FILE])
2972 AM_CONDITIONAL([BUILD_WITH_JAVA], [test "x$with_java" = "xyes"])
2975 # --with-libldap {{{
2976 AC_ARG_WITH([libldap],
2977 [AS_HELP_STRING([--with-libldap@<:@=PREFIX@:>@], [Path to libldap.])],
2979 if test "x$withval" = "xyes"; then
2981 else if test "x$withval" = "xno"; then
2985 LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS -I$withval/include"
2986 LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS -L$withval/lib"
2989 [with_libldap="yes"]
2992 SAVE_CPPFLAGS="$CPPFLAGS"
2993 SAVE_LDFLAGS="$LDFLAGS"
2995 CPPFLAGS="$CPPFLAGS $LIBLDAP_CPPFLAGS"
2996 LDFLAGS="$LDFLAGS $LIBLDAP_LDFLAGS"
2998 if test "x$with_libldap" = "xyes"; then
2999 if test "x$LIBLDAP_CPPFLAGS" != "x"; then
3000 AC_MSG_NOTICE([libldap CPPFLAGS: $LIBLDAP_CPPFLAGS])
3003 AC_CHECK_HEADERS([ldap.h],
3004 [with_libldap="yes"],
3005 [with_libldap="no ('ldap.h' not found)"]
3009 if test "x$with_libldap" = "xyes"; then
3010 if test "x$LIBLDAP_LDFLAGS" != "x"; then
3011 AC_MSG_NOTICE([libldap LDFLAGS: $LIBLDAP_LDFLAGS])
3014 AC_CHECK_LIB([ldap], [ldap_initialize],
3015 [with_libldap="yes"],
3016 [with_libldap="no (symbol 'ldap_initialize' not found)"]
3020 CPPFLAGS="$SAVE_CPPFLAGS"
3021 LDFLAGS="$SAVE_LDFLAGS"
3023 if test "x$with_libldap" = "xyes"
3025 BUILD_WITH_LIBLDAP_CPPFLAGS="$LIBLDAP_CPPFLAGS"
3026 BUILD_WITH_LIBLDAP_LDFLAGS="$LIBLDAP_LDFLAGS"
3028 AC_SUBST([BUILD_WITH_LIBLDAP_CPPFLAGS])
3029 AC_SUBST([BUILD_WITH_LIBLDAP_LDFLAGS])
3033 AC_ARG_VAR([LIBLUA_PKG_CONFIG_NAME], [Name of liblua used by pkg-config])
3034 if test "x$LIBLUA_PKG_CONFIG_NAME" != "x"
3036 PKG_CHECK_MODULES([LUA], [$LIBLUA_PKG_CONFIG_NAME],
3037 [with_liblua="yes"],
3041 PKG_CHECK_MODULES([LUA], [lua],
3042 [with_liblua="yes"],
3044 PKG_CHECK_MODULES([LUA], [lua-5.3],
3045 [with_liblua="yes"],
3047 PKG_CHECK_MODULES([LUA], [lua5.3],
3048 [with_liblua="yes"],
3050 PKG_CHECK_MODULES([LUA], [lua53],
3051 [with_liblua="yes"],
3053 PKG_CHECK_MODULES([LUA], [lua-5.2],
3054 [with_liblua="yes"],
3056 PKG_CHECK_MODULES([LUA], [lua5.2],
3057 [with_liblua="yes"],
3059 PKG_CHECK_MODULES([LUA], [lua52],
3060 [with_liblua="yes"],
3062 PKG_CHECK_MODULES([LUA], [lua-5.1],
3063 [with_liblua="yes"],
3065 PKG_CHECK_MODULES([LUA], [lua5.1],
3066 [with_liblua="yes"],
3068 PKG_CHECK_MODULES([LUA], [lua51],
3069 [with_liblua="yes"],
3070 [with_liblua="no (pkg-config cannot find liblua)"]
3092 if test "x$with_liblua" = "xyes"
3094 SAVE_CPPFLAGS="$CPPFLAGS"
3095 CPPFLAGS="$CPPFLAGS $LUA_CFLAGS"
3097 AC_CHECK_HEADERS([lua.h lauxlib.h lualib.h],
3098 [with_liblua="yes"],
3099 [with_liblua="no (header not found)"]
3102 CPPFLAGS="$SAVE_CPPFLAGS"
3105 if test "x$with_liblua" = "xyes"
3108 LIBS="$LIBS $LUA_LIBS"
3110 AC_CHECK_FUNC([lua_settop],
3111 [with_liblua="yes"],
3112 [with_liblua="no (symbol 'lua_settop' not found)"]
3118 if test "x$with_liblua" = "xyes"
3120 BUILD_WITH_LIBLUA_CFLAGS="$LUA_CFLAGS"
3121 BUILD_WITH_LIBLUA_LIBS="$LUA_LIBS"
3123 AC_SUBST(BUILD_WITH_LIBLUA_CFLAGS)
3124 AC_SUBST(BUILD_WITH_LIBLUA_LIBS)
3127 # --with-liblvm2app {{{
3128 AC_ARG_WITH([liblvm2app],
3129 [AS_HELP_STRING([--with-liblvm2app@<:@=PREFIX@:>@], [Path to liblvm2app.])],
3131 if test "x$withval" = "xno"; then
3132 with_liblvm2app="no"
3134 with_liblvm2app="yes"
3135 if test "x$withval" != "xyes"; then
3136 with_liblvm2app_cppflags="-I$withval/include"
3137 with_liblvm2app_ldflags="-L$withval/lib"
3142 if test "x$ac_system" = "xLinux"; then
3143 with_liblvm2app="yes"
3145 with_liblvm2app="no (Linux only library)"
3150 if test "x$with_liblvm2app" = "xyes"; then
3151 SAVE_CPPFLAGS="$CPPFLAGS"
3152 CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
3154 AC_CHECK_HEADERS([lvm2app.h],
3155 [with_liblvm2app="yes"],
3156 [with_liblvm2app="no (lvm2app.h not found)"]
3159 CPPFLAGS="$SAVE_CPPFLAGS"
3162 if test "x$with_liblvm2app" = "xyes"; then
3163 SAVE_CPPFLAGS="$CPPFLAGS"
3164 SAVE_LDFLAGS="$LDFLAGS"
3165 CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
3166 LDFLAGS="$LDFLAGS $with_liblvm2app_ldflags"
3168 AC_CHECK_LIB([lvm2app], [lvm_lv_get_property],
3169 [with_liblvm2app="yes"],
3170 [with_liblvm2app="no (Symbol 'lvm_lv_get_property' not found)"]
3173 CPPFLAGS="$SAVE_CPPFLAGS"
3174 LDFLAGS="$SAVE_LDFLAGS"
3177 if test "x$with_liblvm2app" = "xyes"; then
3178 BUILD_WITH_LIBLVM2APP_CPPFLAGS="$with_liblvm2app_cppflags"
3179 BUILD_WITH_LIBLVM2APP_LDFLAGS="$with_liblvm2app_ldflags"
3180 BUILD_WITH_LIBLVM2APP_LIBS="-llvm2app"
3183 AC_SUBST([BUILD_WITH_LIBLVM2APP_CPPFLAGS])
3184 AC_SUBST([BUILD_WITH_LIBLVM2APP_LDFLAGS])
3185 AC_SUBST([BUILD_WITH_LIBLVM2APP_LIBS])
3188 # --with-libmemcached {{{
3189 AC_ARG_WITH([libmemcached],
3190 [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
3192 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
3193 with_libmemcached_cppflags="-I$withval/include"
3194 with_libmemcached_ldflags="-L$withval/lib"
3195 with_libmemcached="yes"
3197 with_libmemcached="$withval"
3200 [with_libmemcached="yes"]
3203 if test "x$with_libmemcached" = "xyes"; then
3204 SAVE_CPPFLAGS="$CPPFLAGS"
3205 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
3207 AC_CHECK_HEADERS([libmemcached/memcached.h],
3208 [with_libmemcached="yes"],
3209 [with_libmemcached="no (libmemcached/memcached.h not found)"]
3212 CPPFLAGS="$SAVE_CPPFLAGS"
3215 if test "x$with_libmemcached" = "xyes"; then
3216 SAVE_CPPFLAGS="$CPPFLAGS"
3217 SAVE_LDFLAGS="$LDFLAGS"
3218 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
3219 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
3221 AC_CHECK_LIB([memcached], [memcached_create],
3222 [with_libmemcached="yes"],
3223 [with_libmemcached="no (Symbol 'memcached_create' not found)"]
3226 CPPFLAGS="$SAVE_CPPFLAGS"
3227 LDFLAGS="$SAVE_LDFLAGS"
3230 if test "x$with_libmemcached" = "xyes"; then
3231 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
3232 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
3233 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
3236 AC_SUBST([BUILD_WITH_LIBMEMCACHED_CPPFLAGS])
3237 AC_SUBST([BUILD_WITH_LIBMEMCACHED_LDFLAGS])
3238 AC_SUBST([BUILD_WITH_LIBMEMCACHED_LIBS])
3241 # --with-libmicrohttpd {{{
3242 with_libmicrohttpd_cppflags=""
3243 with_libmicrohttpd_ldflags=""
3244 AC_ARG_WITH([libmicrohttpd], [AS_HELP_STRING([--with-libmicrohttpd@<:@=PREFIX@:>@], [Path to libmicrohttpd.])],
3246 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
3247 with_libmicrohttpd_cppflags="-I$withval/include"
3248 with_libmicrohttpd_ldflags="-L$withval/lib"
3249 with_libmicrohttpd="yes"
3251 if test "x$withval" = "xno"; then
3252 with_libmicrohttpd="no (disabled on command line)"
3257 if test "x$withval" = "xyes"; then
3258 PKG_CHECK_MODULES([MICROHTTPD], [libmicrohttpd],
3259 [with_libmicrohttpd="yes"],
3260 [with_libmicrohttpd="no (pkg-config could not find libmicrohttpd)"]
3264 if test "x$MICROHTTPD_LIBS" = "x"; then
3265 MICROHTTPD_LIBS="-lmicrohttpd"
3268 SAVE_CPPFLAGS="$CPPFLAGS"
3269 SAVE_LDFLAGS="$LDFLAGS"
3271 CPPFLAGS="$with_libmicrohttpd_cppflags $MICROHTTPD_CFLAGS"
3272 LDFLAGS="$with_libmicrohttpd_ldflags $LDFLAGS"
3273 LIBS="$LIBS $MICROHTTPD_LIBS"
3275 if test "x$with_libmicrohttpd" = "xyes"; then
3276 AC_CHECK_HEADERS([microhttpd.h],
3277 [with_libmicrohttpd="yes"],
3278 [with_libmicrohttpd="no (<microhttpd.h> not found)"]
3282 if test "x$with_libmicrohttpd" = "xyes"; then
3283 AC_CHECK_LIB([microhttpd], [MHD_start_daemon],
3284 [with_libmicrohttpd="yes"],
3285 [with_libmicrohttpd="no (libmicrohttpd not found)"]
3289 CPPFLAGS="$SAVE_CPPFLAGS"
3290 LDFLAGS="$SAVE_LDFLAGS"
3293 BUILD_WITH_LIBMICROHTTPD_CPPFLAGS="$with_libmicrohttpd_cppflags $MICROHTTPD_CFLAGS"
3294 BUILD_WITH_LIBMICROHTTPD_LDFLAGS="$with_libmicrohttpd_ldflags"
3295 BUILD_WITH_LIBMICROHTTPD_LIBS="$MICROHTTPD_LIBS"
3296 AC_SUBST([BUILD_WITH_LIBMICROHTTPD_CPPFLAGS])
3297 AC_SUBST([BUILD_WITH_LIBMICROHTTPD_LDFLAGS])
3298 AC_SUBST([BUILD_WITH_LIBMICROHTTPD_LIBS])
3301 # --with-libmodbus {{{
3302 AC_ARG_WITH([libmodbus],
3303 [AS_HELP_STRING([--with-libmodbus@<:@=PREFIX@:>@], [Path to the modbus library.])],
3305 if test "x$withval" = "xno"; then
3307 else if test "x$withval" = "xyes"; then
3308 with_libmodbus="use_pkgconfig"
3309 else if test -d "$with_libmodbus/lib"; then
3310 AC_MSG_NOTICE([Not checking for libmodbus: Manually configured])
3311 with_libmodbus_cflags="-I$withval/include"
3312 with_libmodbus_libs="-L$withval/lib -lmodbus"
3313 with_libmodbus="yes"
3316 [with_libmodbus="use_pkgconfig"]
3319 # configure using pkg-config
3320 if test "x$with_libmodbus" = "xuse_pkgconfig"; then
3321 AC_MSG_NOTICE([Checking for libmodbus using $PKG_CONFIG])
3322 $PKG_CONFIG --exists 'libmodbus' 2>/dev/null
3323 if test $? -ne 0; then
3324 with_libmodbus="no (pkg-config doesn't know libmodbus)"
3328 if test "x$with_libmodbus" = "xuse_pkgconfig"; then
3329 with_libmodbus_cflags="`$PKG_CONFIG --cflags 'libmodbus'`"
3330 if test $? -ne 0; then
3331 with_libmodbus="no ($PKG_CONFIG failed)"
3334 with_libmodbus_libs="`$PKG_CONFIG --libs 'libmodbus'`"
3335 if test $? -ne 0; then
3336 with_libmodbus="no ($PKG_CONFIG failed)"
3340 if test "x$with_libmodbus" = "xuse_pkgconfig"; then
3341 with_libmodbus="yes"
3344 if test "x$with_libmodbus" = "xyes"; then
3345 SAVE_CPPFLAGS="$CPPFLAGS"
3346 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
3348 AC_CHECK_HEADERS([modbus.h],
3349 [with_libmodbus="yes"],
3350 [with_libmodbus="no (modbus.h not found)"]
3353 CPPFLAGS="$SAVE_CPPFLAGS"
3356 if test "x$with_libmodbus" = "xyes"; then
3357 SAVE_LDFLAGS="$LDFLAGS"
3358 LDFLAGS="$LDFLAGS $with_libmodbus_libs"
3360 AC_CHECK_LIB([modbus], [modbus_connect],
3361 [with_libmodbus="yes"],
3362 [with_libmodbus="no (symbol modbus_connect not found)"]
3365 LDFLAGS="$SAVE_LDFLAGS"
3368 if test "x$with_libmodbus" = "xyes"; then
3369 BUILD_WITH_LIBMODBUS_CFLAGS="$with_libmodbus_cflags"
3370 BUILD_WITH_LIBMODBUS_LIBS="$with_libmodbus_libs"
3373 AC_SUBST([BUILD_WITH_LIBMODBUS_CFLAGS])
3374 AC_SUBST([BUILD_WITH_LIBMODBUS_LIBS])
3377 # --with-libmongoc {{{
3378 AC_ARG_WITH([libmongoc],
3379 [AS_HELP_STRING([--with-libmongoc@<:@=PREFIX@:>@], [Path to libmongoc.])],
3381 if test "x$withval" = "xyes"; then
3382 with_libmongoc="yes"
3383 else if test "x$withval" = "xno"; then
3389 [with_libmongoc="yes"]
3392 if test "x$with_libmongoc" = "xyes"; then
3393 PKG_CHECK_MODULES([LIBMONGOC], [libmongoc-1.0],
3394 [with_libmongoc="yes"],
3395 [with_libmongoc="no (pkg-config could not find libmongoc)"]
3399 if test "x$with_libmongoc" = "xyes"; then
3400 SAVE_CPPFLAGS="$CPPFLAGS"
3402 CPPFLAGS="$CPPFLAGS $LIBMONGOC_CFLAGS"
3404 if test "x$CPPFLAGS" != "x"; then
3405 AC_MSG_NOTICE([libmongoc CPPFLAGS: $LIBMONGOC_CFLAGS])
3408 AC_CHECK_HEADERS([mongoc.h],
3409 [with_libmongoc="yes"],
3410 [with_libmongoc="no ('mongoc.h' not found)"]
3413 CPPFLAGS="$SAVE_CPPFLAGS"
3416 if test "x$with_libmongoc" = "xyes"; then
3417 SAVE_CPPFLAGS="$CPPFLAGS"
3418 SAVE_LDFLAGS="$LDFLAGS"
3420 CPPFLAGS="$CPPFLAGS $LIBMONGOC_CFLAGS"
3421 LDFLAGS="$LDFLAGS $LIBMONGOC_LDFLAGS"
3423 if test "x$LIBMONGOC_LDFLAGS" != "x"; then
3424 AC_MSG_NOTICE([libmongoc LDFLAGS: $LIBMONGOC_LDFLAGS])
3427 AC_CHECK_LIB([mongoc-1.0], [mongoc_init],
3428 [with_libmongoc="yes"],
3429 [with_libmongoc="no (symbol 'mongoc_init' not found)"]
3432 CPPFLAGS="$SAVE_CPPFLAGS"
3433 LDFLAGS="$SAVE_LDFLAGS"
3436 if test "x$with_libmongoc" = "xyes"; then
3437 BUILD_WITH_LIBMONGOC_CFLAGS="$LIBMONGOC_CFLAGS"
3438 BUILD_WITH_LIBMONGOC_LDFLAGS="$LIBMONGOC_LDFLAGS"
3441 AC_SUBST([BUILD_WITH_LIBMONGOC_CFLAGS])
3442 AC_SUBST([BUILD_WITH_LIBMONGOC_LDFLAGS])
3445 # --with-libmosquitto {{{
3446 AC_ARG_WITH([libmosquitto],
3447 [AS_HELP_STRING([--with-libmosquitto@<:@=PREFIX@:>@], [Path to libmosquitto.])],
3449 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
3450 with_libmosquitto_cppflags="-I$withval/include"
3451 with_libmosquitto_ldflags="-L$withval/lib"
3452 with_libmosquitto="yes"
3454 with_libmosquitto="$withval"
3457 [with_libmosquitto="yes"]
3460 if test "x$with_libmosquitto" = "xyes"; then
3461 SAVE_CPPFLAGS="$CPPFLAGS"
3462 CPPFLAGS="$CPPFLAGS $with_libmosquitto_cppflags"
3464 AC_CHECK_HEADERS([mosquitto.h],
3465 [with_libmosquitto="yes"],
3466 [with_libmosquitto="no (mosquitto.h not found)"]
3469 CPPFLAGS="$SAVE_CPPFLAGS"
3472 if test "x$with_libmosquitto" = "xyes"; then
3473 SAVE_LDFLAGS="$LDFLAGS"
3474 LDFLAGS="$LDFLAGS $with_libmosquitto_ldflags"
3476 AC_CHECK_LIB([mosquitto], [mosquitto_connect],
3477 [with_libmosquitto="yes"],
3478 [with_libmosquitto="no (libmosquitto not found)"]
3481 LDFLAGS="$SAVE_LDFLAGS"
3484 if test "x$with_libmosquitto" = "xyes"; then
3485 BUILD_WITH_LIBMOSQUITTO_CPPFLAGS="$with_libmosquitto_cppflags"
3486 BUILD_WITH_LIBMOSQUITTO_LDFLAGS="$with_libmosquitto_ldflags"
3487 BUILD_WITH_LIBMOSQUITTO_LIBS="-lmosquitto"
3490 AC_SUBST([BUILD_WITH_LIBMOSQUITTO_CPPFLAGS])
3491 AC_SUBST([BUILD_WITH_LIBMOSQUITTO_LDFLAGS])
3492 AC_SUBST([BUILD_WITH_LIBMOSQUITTO_LIBS])
3495 # --with-libmysql {{{
3496 with_mysql_config="mysql_config"
3497 AC_ARG_WITH([libmysql],
3498 [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
3500 if test "x$withval" = "xno"; then
3502 else if test "x$withval" = "xyes"; then
3505 if test -f "$withval" && test -x "$withval"; then
3506 with_mysql_config="$withval"
3507 else if test -x "$withval/bin/mysql_config"; then
3508 with_mysql_config="$withval/bin/mysql_config"
3513 [with_libmysql="yes"]
3516 if test "x$with_libmysql" = "xyes"; then
3517 with_mysql_cflags=`$with_mysql_config --include 2>/dev/null`
3518 if test $? -ne 0; then
3519 with_libmysql="no ($with_mysql_config failed)"
3521 SAVE_CPPFLAGS="$CPPFLAGS"
3522 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
3524 AC_CHECK_HEADERS([mysql.h],
3525 [have_mysql_h="yes"],
3529 if test "x$have_mysql_h" != "xyes"; then
3530 AC_CHECK_HEADERS([mysql/mysql.h],
3531 [have_mysql_mysql_h="yes"],
3536 if test "x$have_mysql_h" != "xyes" && test "x$have_mysql_mysql_h" != "xyes"; then
3537 with_libmysql="no (mysql.h not found)"
3540 CPPFLAGS="$SAVE_CPPFLAGS"
3544 if test "x$with_libmysql" = "xyes"; then
3545 with_mysql_libs=`$with_mysql_config --libs_r 2>/dev/null`
3546 if test $? -ne 0; then
3547 with_libmysql="no ($with_mysql_config failed)"
3550 LIBS="$with_mysql_libs"
3552 AC_SEARCH_LIBS([mysql_get_server_version],
3554 [with_libmysql="yes"],
3555 [with_libmysql="no (symbol 'mysql_get_server_version' not found in ${LIBS})"],
3562 if test "x$with_libmysql" = "xyes"; then
3563 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
3564 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
3567 AC_SUBST([BUILD_WITH_LIBMYSQL_CFLAGS])
3568 AC_SUBST([BUILD_WITH_LIBMYSQL_LIBS])
3572 AC_ARG_WITH([libmnl],
3573 [AS_HELP_STRING([--with-libmnl@<:@=PREFIX@:>@], [Path to libmnl.])],
3575 if test "x$withval" = "xyes"; then
3577 else if test "x$withval" = "xno"; then
3580 if test -d "$withval/include"; then
3581 with_libmnl_cflags="-I$withval/include"
3582 with_libmnl_libs="-L$withval/lib -lmnl"
3585 AC_MSG_ERROR("no such directory: $withval/include")
3590 if test "x$ac_system" = "xLinux"; then
3593 with_libmnl="no (Linux only library)"
3598 if test "x$with_libmnl" = "xyes"; then
3599 if $PKG_CONFIG --exists libmnl 2>/dev/null; then
3600 with_libmnl_cflags="$with_libmnl_ldflags `$PKG_CONFIG --cflags libmnl`"
3601 with_libmnl_libs="$with_libmnl_libs `$PKG_CONFIG --libs libmnl`"
3604 AC_CHECK_HEADERS([libmnl.h libmnl/libmnl.h],
3612 #include <sys/types.h>
3613 #include <asm/types.h>
3614 #include <sys/socket.h>
3615 #include <linux/netlink.h>
3616 #include <linux/rtnetlink.h>]]
3619 AC_CHECK_HEADERS([linux/gen_stats.h linux/pkt_sched.h],
3624 #include <sys/types.h>
3625 #include <asm/types.h>
3626 #include <sys/socket.h>
3635 #include <sys/types.h>
3636 #include <asm/types.h>
3637 #include <sys/socket.h>
3638 #include <linux/netlink.h>
3639 #include <linux/rtnetlink.h>
3642 int retval = TCA_STATS2;
3647 [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])]
3655 #include <sys/types.h>
3656 #include <asm/types.h>
3657 #include <sys/socket.h>
3658 #include <linux/netlink.h>
3659 #include <linux/rtnetlink.h>
3662 int retval = TCA_STATS;
3667 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
3670 AC_CHECK_MEMBERS([struct rtnl_link_stats64.tx_window_errors],
3671 [AC_DEFINE(HAVE_RTNL_LINK_STATS64, 1, [Define if struct rtnl_link_stats64 exists and is usable.])],
3673 [[#include <linux/if_link.h>]]
3676 AC_CHECK_MEMBERS([struct rtnl_link_stats.rx_nohandler],
3679 [[#include <linux/if_link.h>]]
3682 AC_CHECK_MEMBERS([struct rtnl_link_stats64.rx_nohandler],
3685 [[#include <linux/if_link.h>]]
3688 AC_CHECK_LIB([mnl], [mnl_nlmsg_get_payload],
3689 [with_libmnl="yes"],
3690 [with_libmnl="no (symbol 'mnl_nlmsg_get_payload' not found)"],
3695 if test "x$with_libmnl" = "xyes"; then
3696 BUILD_WITH_LIBMNL_CFLAGS="$with_libmnl_cflags"
3697 BUILD_WITH_LIBMNL_LIBS="$with_libmnl_libs"
3699 AC_SUBST([BUILD_WITH_LIBMNL_CFLAGS])
3700 AC_SUBST([BUILD_WITH_LIBMNL_LIBS])
3701 AM_CONDITIONAL([HAVE_LIBMNL], [test "x$with_libmnl" = "xyes"])
3704 # --with-libnetapp {{{
3705 AC_ARG_VAR([LIBNETAPP_CPPFLAGS], [C preprocessor flags required to build with libnetapp])
3706 AC_ARG_VAR([LIBNETAPP_LDFLAGS], [Linker flags required to build with libnetapp])
3707 AC_ARG_VAR([LIBNETAPP_LIBS], [Other libraries required to link against libnetapp])
3708 AC_ARG_WITH([libnetapp],
3709 [AS_HELP_STRING([--with-libnetapp@<:@=PREFIX@:>@], [Path to libnetapp.])],
3711 if test -d "$withval"; then
3712 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS -I$withval/include"
3713 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS -L$withval/lib"
3714 with_libnetapp="yes"
3716 with_libnetapp="$withval"
3719 [with_libnetapp="yes"]
3722 SAVE_CPPFLAGS="$CPPFLAGS"
3723 SAVE_LDFLAGS="$LDFLAGS"
3724 CPPFLAGS="$CPPFLAGS $LIBNETAPP_CPPFLAGS"
3725 LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
3727 if test "x$with_libnetapp" = "xyes"; then
3728 if test "x$LIBNETAPP_CPPFLAGS" != "x"; then
3729 AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
3731 AC_CHECK_HEADERS([netapp_api.h],
3732 [with_libnetapp="yes"],
3733 [with_libnetapp="no (netapp_api.h not found)"]
3737 if test "x$with_libnetapp" = "xyes"; then
3738 if test "x$LIBNETAPP_LDFLAGS" != "x"; then
3739 AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
3742 if test "x$LIBNETAPP_LIBS" = "x"; then
3743 LIBNETAPP_LIBS="$PTHREAD_LIBS -lxml -ladt -lssl -lm -lcrypto -lz"
3746 AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
3748 AC_CHECK_LIB([netapp], [na_server_invoke_elem],
3749 [with_libnetapp="yes"],
3750 [with_libnetapp="no (symbol na_server_invoke_elem not found)"],
3754 LIBNETAPP_LIBS="-lnetapp $LIBNETAPP_LIBS"
3757 CPPFLAGS="$SAVE_CPPFLAGS"
3758 LDFLAGS="$SAVE_LDFLAGS"
3760 AC_SUBST([LIBNETAPP_CPPFLAGS])
3761 AC_SUBST([LIBNETAPP_LDFLAGS])
3762 AC_SUBST([LIBNETAPP_LIBS])
3765 # --with-libnetsnmp {{{
3766 AC_ARG_WITH([libnetsnmp],
3767 [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to libnetsnmp.])],
3769 if test "x$withval" = "xno"; then
3770 with_libnetsnmp="no"
3771 else if test "x$withval" = "xyes"; then
3772 with_libnetsnmp="yes"
3774 with_libnetsnmp_cppflags="-I$withval/include"
3775 with_libnetsnmp_ldflags="-I$withval/lib"
3776 with_libnetsnmp="yes"
3779 [with_libnetsnmp="yes"]
3782 if test "x$with_libnetsnmp" = "xyes"; then
3783 SAVE_CPPFLAGS="$CPPFLAGS"
3784 CPPFLAGS="$CPPFLAGS $with_libnetsnmp_cppflags"
3786 AC_CHECK_HEADERS([net-snmp/net-snmp-config.h],
3787 [with_libnetsnmp="yes"],
3788 [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"]
3791 AC_CHECK_HEADERS([net-snmp/net-snmp-includes.h],
3792 [with_libnetsnmp="yes"],
3793 [with_libnetsnmp="no (net-snmp/net-snmp-includes.h not found)"],
3795 #if HAVE_NET_SNMP_NET_SNMP_CONFIG_H
3796 # include <net-snmp/net-snmp-config.h>
3801 CPPFLAGS="$SAVE_CPPFLAGS"
3804 if test "x$with_libnetsnmp" = "xyes"; then
3805 SAVE_LDFLAGS="$LDFLAGS"
3806 LDFLAGS="$LDFLAGS $with_libnetsnmp_ldflags"
3808 AC_CHECK_LIB([netsnmp], [init_snmp],
3809 [with_libnetsmp="yes"],
3810 [with_libnetsnmp="no (libnetsnmp not found)"]
3813 LDFLAGS="$SAVE_LDFLAGS"
3816 if test "x$with_libnetsnmp" = "xyes"; then
3817 BUILD_WITH_LIBNETSNMP_CPPFLAGS="$with_libnetsnmp_cppflags"
3818 BUILD_WITH_LIBNETSNMP_LDFLAGS="$with_libnetsnmp_ldflags"
3819 BUILD_WITH_LIBNETSNMP_LIBS="-lnetsnmp"
3822 AC_SUBST([BUILD_WITH_LIBNETSNMP_CPPFLAGS])
3823 AC_SUBST([BUILD_WITH_LIBNETSNMP_LDFLAGS])
3824 AC_SUBST([BUILD_WITH_LIBNETSNMP_LIBS])
3827 # --with-libnetsmpagent {{{
3828 AC_ARG_WITH([libnetsnmpagent],
3829 [AS_HELP_STRING([--with-libnetsnmpagent@<:@=PREFIX@:>@], [Path to libnetsnmpagent.])],
3831 if test "x$withval" = "xno"; then
3832 with_libnetsnmpagent="no"
3833 else if test "x$withval" = "xyes"; then
3834 with_libnetsnmpagent="yes"
3836 with_libnetsnmpagent_cppflags="-I$withval/include"
3837 with_libnetsnmpagent_ldflags="-I$withval/lib"
3838 with_libnetsnmpagent="yes"
3841 [with_libnetsnmpagent="yes"]
3844 if test "x$with_libnetsnmpagent" = "xyes"; then
3845 SAVE_CPPFLAGS="$CPPFLAGS"
3846 CPPFLAGS="$CPPFLAGS $with_libnetsnmpagent_cppflags"
3848 AC_CHECK_HEADERS([net-snmp/agent/net-snmp-agent-includes.h],
3850 [with_libnetsnmpagent="no (net-snmp/agent/net-snmp-agent-includes.h not found)"],
3852 #if HAVE_NET_SNMP_NET_SNMP_CONFIG_H
3853 # include <net-snmp/net-snmp-config.h>
3855 #if HAVE_NET_SNMP_NET_SNMP_INCLUDES_H
3856 # include <net-snmp/net-snmp-includes.h>
3861 CPPFLAGS="$SAVE_CPPFLAGS"
3864 if test "x$with_libnetsnmpagent" = "xyes"; then
3865 SAVE_LDFLAGS="$LDFLAGS"
3866 LDFLAGS="$LDFLAGS $with_libnetsnmpagent_ldflags"
3868 # older versions of libnetsnmpagent fail to link
3869 # against the helpers library, so do that explicitly
3870 AC_CHECK_LIB([netsnmphelpers], [netsnmp_init_helpers],
3871 [libnetsnmphelpers="-lnetsnmphelpers"],
3872 [libnetsnmphelpers=""]
3875 AC_CHECK_LIB([netsnmpagent], [init_agent],
3876 [with_libnetsnmpagent="yes"],
3877 [with_libnetsnmpagent="no (libnetsnmpagent not found)"],
3878 [$libnetsnmphelpers]
3881 LDFLAGS="$SAVE_LDFLAGS"
3884 if test "x$with_libnetsnmpagent" = "xyes"; then
3885 BUILD_WITH_LIBNETSNMPAGENT_LIBS="-lnetsnmpagent $libnetsnmphelpers"
3888 AC_SUBST([BUILD_WITH_LIBNETSNMPAGENT_CPPFLAGS])
3889 AC_SUBST([BUILD_WITH_LIBNETSNMPAGENT_LDFLAGS])
3890 AC_SUBST([BUILD_WITH_LIBNETSNMPAGENT_LIBS])
3893 # --with-liboping {{{
3894 AC_ARG_WITH([liboping],
3895 [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
3897 if test "x$withval" = "xyes"; then
3899 else if test "x$withval" = "xno"; then
3903 LIBOPING_CPPFLAGS="-I$withval/include"
3904 LIBOPING_LDFLAGS="-L$withval/lib"
3907 [with_liboping="yes"]
3910 SAVE_CPPFLAGS="$CPPFLAGS"
3911 SAVE_LDFLAGS="$LDFLAGS"
3912 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
3913 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
3915 if test "x$with_liboping" = "xyes"; then
3916 AC_CHECK_HEADERS([oping.h],
3917 [with_liboping="yes"],
3918 [with_liboping="no (oping.h not found)"]
3922 if test "x$with_liboping" = "xyes"; then
3923 AC_CHECK_LIB([oping], [ping_construct],
3924 [with_liboping="yes"],
3925 [with_liboping="no (symbol 'ping_construct' not found)"]
3929 CPPFLAGS="$SAVE_CPPFLAGS"
3930 LDFLAGS="$SAVE_LDFLAGS"
3932 if test "x$with_liboping" = "xyes"; then
3933 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
3934 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
3937 AC_SUBST([BUILD_WITH_LIBOPING_CPPFLAGS])
3938 AC_SUBST([BUILD_WITH_LIBOPING_LDFLAGS])
3942 AC_ARG_WITH([oracle],
3943 [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
3945 if test "x$withval" = "xyes"; then
3946 if test "x$ORACLE_HOME" = "x"; then
3947 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
3950 else if test "x$withval" = "xno"; then
3954 ORACLE_HOME="$withval"
3958 if test "x$ORACLE_HOME" = "x"; then
3959 with_oracle="no (ORACLE_HOME is not set)"
3966 if test "x$ORACLE_HOME" != "x"; then
3967 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
3968 if test -e "$ORACLE_HOME/lib/ldflags"; then
3969 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
3971 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
3974 if test "x$with_oracle" = "xyes"; then
3975 SAVE_CPPFLAGS="$CPPFLAGS"
3976 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
3978 AC_CHECK_HEADERS([oci.h],
3979 [with_oracle="yes"],
3980 [with_oracle="no (oci.h not found)"]
3983 CPPFLAGS="$SAVE_CPPFLAGS"
3986 if test "x$with_oracle" = "xyes"; then
3987 SAVE_CPPFLAGS="$CPPFLAGS"
3989 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
3990 LIBS="$LIBS $with_oracle_libs"
3992 AC_CHECK_FUNC([OCIEnvCreate],
3993 [with_oracle="yes"],
3994 [with_oracle="no (Symbol 'OCIEnvCreate' not found)"]
3997 CPPFLAGS="$SAVE_CPPFLAGS"
4001 if test "x$with_oracle" = "xyes"; then
4002 BUILD_WITH_ORACLE_CPPFLAGS="$with_oracle_cppflags"
4003 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
4006 AC_SUBST([BUILD_WITH_ORACLE_CPPFLAGS])
4007 AC_SUBST([BUILD_WITH_ORACLE_LIBS])
4010 # --with-libowcapi {{{
4011 AC_ARG_WITH([libowcapi],
4012 [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
4014 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4015 with_libowcapi_cppflags="-I$withval/include"
4016 with_libowcapi_ldflags="-L$withval/lib"
4017 with_libowcapi="yes"
4019 with_libowcapi="$withval"
4022 [with_libowcapi="yes"]
4025 if test "x$with_libowcapi" = "xyes"; then
4026 SAVE_CPPFLAGS="$CPPFLAGS"
4027 CPPFLAGS="$CPPFLAGS $with_libowcapi_cppflags"
4029 AC_CHECK_HEADERS([owcapi.h],
4030 [with_libowcapi="yes"],
4031 [with_libowcapi="no (owcapi.h not found)"]
4034 CPPFLAGS="$SAVE_CPPFLAGS"
4037 if test "x$with_libowcapi" = "xyes"; then
4038 SAVE_LDFLAGS="$LDFLAGS"
4039 LDFLAGS="$LDFLAGS $with_libowcapi_ldflags"
4041 AC_CHECK_LIB([owcapi], [OW_get],
4042 [with_libowcapi="yes"],
4043 [with_libowcapi="no (libowcapi not found)"]
4046 LDFLAGS="$SAVE_LDFLAGS"
4049 if test "x$with_libowcapi" = "xyes"; then
4050 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
4051 BUILD_WITH_LIBOWCAPI_LDFLAGS="$with_libowcapi_ldflags"
4052 BUILD_WITH_LIBOWCAPI_LIBS="-lowcapi"
4055 AC_SUBST([BUILD_WITH_LIBOWCAPI_CPPFLAGS])
4056 AC_SUBST([BUILD_WITH_LIBOWCAPI_LDFLAGS])
4057 AC_SUBST([BUILD_WITH_LIBOWCAPI_LIBS])
4060 # --with-libpcap {{{
4061 AC_ARG_WITH([libpcap],
4062 [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
4064 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4065 with_libpcap_cppflags="-I$withval/include"
4066 with_libpcap_ldflags="$LDFLAGS -L$withval/lib"
4069 with_libpcap="$withval"
4072 [with_libpcap="yes"]
4075 if test "x$with_libpcap" = "xyes"; then
4076 SAVE_CPPFLAGS="$CPPFLAGS"
4077 CPPFLAGS="$CPPFLAGS $with_libpcap_cppflags"
4079 AC_CHECK_HEADERS([pcap.h],
4080 [with_libpcap="yes"],
4081 [with_libpcap="no (pcap.h not found)"]
4084 CPPFLAGS="$SAVE_CPPFLAGS"
4087 if test "x$with_libpcap" = "xyes"; then
4088 SAVE_LDFLAGS="$LDFLAGS"
4089 LDFLAGS="$LDFLAGS $with_libpcap_ldflags"
4091 AC_CHECK_LIB([pcap], [pcap_open_live],
4092 [with_libpcap="yes"],
4093 [with_libpcap="no (libpcap not found)"]
4096 LDFLAGS="$SAVE_LDFLAGS"
4099 if test "x$with_libpcap" = "xyes"; then
4100 AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP],
4101 [c_cv_libpcap_have_pcap_error_iface_not_up],
4106 [[#include <pcap.h>]],
4108 int val = PCAP_ERROR_IFACE_NOT_UP;
4113 [c_cv_libpcap_have_pcap_error_iface_not_up="yes"],
4114 [c_cv_libpcap_have_pcap_error_iface_not_up="no"]
4120 if test "x$c_cv_libpcap_have_pcap_error_iface_not_up" != "xyes"; then
4121 with_libpcap="no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)"
4124 if test "x$with_libpcap" = "xyes"; then
4125 BUILD_WITH_LIBPCAP_CPPFLAGS="$with_libpcap_cppflags"
4126 BUILD_WITH_LIBPCAP_LDFLAGS="$with_libpcap_ldflags"
4127 BUILD_WITH_LIBPCAP_LIBS="-lpcap"
4130 AC_SUBST([BUILD_WITH_LIBPCAP_CPPFLAGS])
4131 AC_SUBST([BUILD_WITH_LIBPCAP_LDFLAGS])
4132 AC_SUBST([BUILD_WITH_LIBPCAP_LIBS])
4135 # --with-libperl {{{
4136 AC_ARG_WITH([libperl],
4137 [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
4139 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4140 LDFLAGS="$LDFLAGS -L$withval/lib"
4141 CPPFLAGS="$CPPFLAGS -I$withval/include"
4144 with_libperl="$withval"
4147 [with_libperl="yes"]
4150 AC_ARG_VAR([PERL], [path to Perl interpreter])
4151 AC_PATH_PROG([PERL], [perl])
4153 if test "x$PERL" = "x"; then
4154 with_libperl="no (no Perl interpreter found)"
4157 if test "x$with_libperl" = "xyes"; then
4158 SAVE_CFLAGS="$CFLAGS"
4160 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
4161 PERL_CFLAGS=`ARCHFLAGS="" $PERL -MExtUtils::Embed -e perl_inc`
4162 PERL_LIBS=`ARCHFLAGS="" $PERL -MExtUtils::Embed -e ldopts`
4163 CFLAGS="$CFLAGS $PERL_CFLAGS"
4164 LIBS="$LIBS $PERL_LIBS"
4166 AC_CACHE_CHECK([for libperl],
4167 [c_cv_have_libperl],
4173 #define PERL_NO_GET_CONTEXT
4180 load_module (PERL_LOADMOD_NOIMPORT,
4181 newSVpv ("Collectd::Plugin::FooBar", 24),
4186 [c_cv_have_libperl="yes"],
4187 [c_cv_have_libperl="no"]
4192 CFLAGS="$SAVE_CFLAGS"
4195 if test "x$c_cv_have_libperl" = "xno"; then
4200 if test "x$with_libperl" = "xyes"; then
4201 SAVE_CFLAGS="$CFLAGS"
4203 CFLAGS="$CFLAGS $PERL_CFLAGS"
4204 LIBS="$LIBS $PERL_LIBS"
4206 AC_CACHE_CHECK([if Perl supports ithreads],
4207 [c_cv_have_perl_ithreads],
4217 #if !defined(USE_ITHREADS)
4218 # error "Perl does not support ithreads!"
4219 #endif /* !defined(USE_ITHREADS) */
4224 [c_cv_have_perl_ithreads="yes"],
4225 [c_cv_have_perl_ithreads="no"]
4230 CFLAGS="$SAVE_CFLAGS"
4234 if test "x$with_libperl" = "xyes"; then
4235 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
4236 # (see issues #41 and #42)
4237 SAVE_CFLAGS="$CFLAGS"
4239 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
4240 LIBS="$LIBS $PERL_LIBS"
4242 AC_CACHE_CHECK([for broken Perl_load_module()],
4243 [c_cv_have_broken_perl_load_module],
4249 #define PERL_NO_GET_CONTEXT
4256 load_module (PERL_LOADMOD_NOIMPORT,
4257 newSVpv ("Collectd::Plugin::FooBar", 24),
4262 [c_cv_have_broken_perl_load_module="no"],
4263 [c_cv_have_broken_perl_load_module="yes"]
4268 CFLAGS="$SAVE_CFLAGS"
4272 if test "x$c_cv_have_broken_perl_load_module" = "xyes"; then
4273 PERL_CFLAGS="$PERL_CFLAGS -Wno-nonnull"
4276 if test "x$with_libperl" = "xyes"; then
4277 SAVE_CFLAGS="$CFLAGS"
4279 CFLAGS="$CFLAGS $PERL_CFLAGS"
4280 LIBS="$LIBS $PERL_LIBS"
4283 [struct mgvtbl.svt_local],
4284 [have_struct_mgvtbl_svt_local="yes"],
4285 [have_struct_mgvtbl_svt_local="no"],
4293 if test "x$have_struct_mgvtbl_svt_local" = "xyes"; then
4294 AC_DEFINE([HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL], [1], [Define if Perls struct mgvtbl has member svt_local.])
4297 CFLAGS="$SAVE_CFLAGS"
4300 AC_SUBST([PERL_CFLAGS])
4301 AC_SUBST([PERL_LIBS])
4306 with_pg_config="pg_config"
4307 AC_ARG_WITH([libpq],
4308 [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@], [Path to libpq.])],
4310 if test "x$withval" = "xno" || test "x$withval" = "xyes"; then
4311 with_libpq="$withval"
4313 if test -f "$withval" && test -x "$withval"; then
4314 with_pg_config="$withval"
4315 else if test -x "$withval/bin/pg_config"; then
4316 with_pg_config="$withval/bin/pg_config"
4324 if test "x$with_libpq" = "xyes"; then
4325 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
4328 if test $pg_config_status -eq 0; then
4329 if test -n "$with_libpq_includedir"; then
4330 for dir in $with_libpq_includedir; do
4331 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
4335 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
4338 SAVE_CPPFLAGS="$CPPFLAGS"
4339 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
4341 AC_CHECK_HEADERS([libpq-fe.h],
4343 [with_libpq="no (libpq-fe.h not found)"]
4346 CPPFLAGS="$SAVE_CPPFLAGS"
4349 if test "x$with_libpq" = "xyes"; then
4350 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
4353 if test $pg_config_status -eq 0
4355 if test -n "$with_libpq_libdir"; then
4356 for dir in $with_libpq_libdir; do
4357 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
4361 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
4364 SAVE_LDFLAGS="$LDFLAGS"
4365 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
4367 AC_CHECK_LIB([pq], [PQserverVersion],
4369 [with_libpq="no (symbol 'PQserverVersion' not found)"])
4371 LDFLAGS="$SAVE_LDFLAGS"
4374 if test "x$with_libpq" = "xyes"; then
4375 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
4376 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
4377 BUILD_WITH_LIBPQ_LIBS="-lpq"
4380 AC_SUBST([BUILD_WITH_LIBPQ_CPPFLAGS])
4381 AC_SUBST([BUILD_WITH_LIBPQ_LDFLAGS])
4382 AC_SUBST([BUILD_WITH_LIBPQ_LIBS])
4385 # --with-libpqos {{{
4386 AC_ARG_WITH([libpqos],
4387 [AS_HELP_STRING([--with-libpqos@<:@=PREFIX@:>@], [Path to libpqos.])],
4389 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4390 with_libpqos_cppflags="-I$withval/include"
4391 with_libpqos_ldflags="-L$withval/lib"
4394 with_libpqos="$withval"
4397 [with_libpqos="yes"]
4400 if test "x$with_libpqos" = "xyes"; then
4401 SAVE_CPPFLAGS="$CPPFLAGS"
4402 CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
4404 AC_CHECK_HEADERS([pqos.h],
4405 [with_libpqos="yes"],
4406 [with_libpqos="no (pqos.h not found)"]
4409 CPPFLAGS="$SAVE_CPPFLAGS"
4412 if test "x$with_libpqos" = "xyes"; then
4413 SAVE_LDFLAGS="$LDFLAGS"
4414 LDFLAGS="$LDFLAGS $with_libpqos_ldflags"
4416 AC_CHECK_LIB([pqos], [pqos_init],
4417 [with_libpqos="yes"],
4418 [with_libpqos="no (Can't find libpqos)"]
4421 LDFLAGS="$SAVE_LDFLAGS"
4424 if test "x$with_libpqos" = "xyes"; then
4425 SAVE_CPPFLAGS="$CPPFLAGS"
4426 CPPFLAGS="$CPPFLAGS $with_libpqos_cppflags"
4432 #if PQOS_VERSION < 106
4433 #error "required PQOS version >= 1.06"
4438 [with_libpqos="yes"],
4439 [with_libpqos="no (pqos library version 1.06 or higher is required)"]
4442 CPPFLAGS="$SAVE_CPPFLAGS"
4445 if test "x$with_libpqos" = "xyes"; then
4446 BUILD_WITH_LIBPQOS_CPPFLAGS="$with_libpqos_cppflags"
4447 BUILD_WITH_LIBPQOS_LDFLAGS="$with_libpqos_ldflags"
4448 BUILD_WITH_LIBPQOS_LIBS="-lpqos"
4451 AC_SUBST([BUILD_WITH_LIBPQOS_CPPFLAGS])
4452 AC_SUBST([BUILD_WITH_LIBPQOS_LDFLAGS])
4453 AC_SUBST([BUILD_WITH_LIBPQOS_LIBS])
4456 # --with-libjevents {{{
4457 with_libjevents_cppflags=""
4458 with_libjevents_ldflags=""
4459 AC_ARG_WITH([libjevents],
4460 [AS_HELP_STRING([--with-libjevents@<:@=PREFIX@:>@], [Path to libjevents.])],
4462 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4463 with_libjevents_cppflags="-I$withval/include"
4464 with_libjevents_ldflags="-L$withval/lib"
4465 with_libjevents="yes"
4467 with_libjevents="$withval"
4470 [with_libjevents="yes"]
4473 if test "x$with_libjevents" = "xyes"; then
4474 SAVE_CPPFLAGS="$CPPFLAGS"
4475 CPPFLAGS="$CPPFLAGS $with_libjevents_cppflags"
4477 AC_CHECK_HEADERS([jevents.h], [with_libjevents="yes"], [with_libjevents="no (jevents.h not found)"])
4479 CPPFLAGS="$SAVE_CPPFLAGS"
4481 if test "x$with_libjevents" = "xyes"; then
4482 SAVE_LDFLAGS="$LDFLAGS"
4483 LDFLAGS="$LDFLAGS $with_libjevents_ldflags"
4485 AC_CHECK_LIB([jevents], [json_events], [with_libjevents="yes"], [with_libjevents="no (Can't find libjevents)"])
4487 LDFLAGS="$SAVE_LDFLAGS"
4489 if test "x$with_libjevents" = "xyes"; then
4490 BUILD_WITH_LIBJEVENTS_CPPFLAGS="$with_libjevents_cppflags"
4491 BUILD_WITH_LIBJEVENTS_LDFLAGS="$with_libjevents_ldflags"
4492 BUILD_WITH_LIBJEVENTS_LIBS="-ljevents"
4494 AC_SUBST([BUILD_WITH_LIBJEVENTS_CPPFLAGS])
4495 AC_SUBST([BUILD_WITH_LIBJEVENTS_LDFLAGS])
4496 AC_SUBST([BUILD_WITH_LIBJEVENTS_LIBS])
4499 # --with-libprotobuf {{{
4500 with_libprotobuf_cppflags=""
4501 with_libprotobuf_ldflags=""
4502 AC_ARG_WITH([libprotobuf],
4503 [AS_HELP_STRING([--with-libprotobuf@<:@=PREFIX@:>@], [Path to libprotobuf.])],
4505 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4506 with_libprotobuf_cppflags="-I$withval/include"
4507 with_libprotobuf_ldflags="-L$withval/lib"
4508 with_libprotobuf="yes"
4510 if test "x$withval" = "xno"; then
4511 with_libprotobuf="no (disabled on command line)"
4517 if test "x$withval" = "xyes"; then
4518 PKG_CHECK_MODULES([PROTOBUF], [protobuf],
4519 [with_libprotobuf="yes"],
4520 [with_libprotobuf="no (pkg-config could not find libprotobuf)"]
4524 if test "x$withval" != "xno"; then
4525 SAVE_LDFLAGS="$LDFLAGS"
4527 LDFLAGS="$with_libprotobuf_ldflags"
4528 LIBS="$PROTOBUF_LIBS $LIBS"
4530 AC_CHECK_LIB([protobuf], [main],
4532 SAVE_CPPFLAGS="$CPPFLAGS"
4533 CPPFLAGS="$with_libprotobuf_cppflags $PROTOBUF_CFLAGS"
4534 if test "x$PROTOBUF_LIBS" = "x"
4536 PROTOBUF_LIBS="-lprotobuf"
4538 AC_CHECK_HEADERS([google/protobuf/util/time_util.h],
4539 [with_libprotobuf="yes"],
4540 [with_libprotobuf="no (<google/protobuf/util/time_util.h> not found)"]
4542 CPPFLAGS="$SAVE_CPPFLAGS"
4544 [with_libprotobuf="no (libprotobuf not found)"]
4547 LDFLAGS="$SAVE_LDFLAGS"
4551 BUILD_WITH_LIBPROTOBUF_CPPFLAGS="$with_libprotobuf_cppflags $PROTOBUF_CFLAGS"
4552 BUILD_WITH_LIBPROTOBUF_LDFLAGS="$with_libprotobuf_ldflags"
4553 BUILD_WITH_LIBPROTOBUF_LIBS="$PROTOBUF_LIBS"
4554 AC_SUBST([BUILD_WITH_LIBPROTOBUF_CPPFLAGS])
4555 AC_SUBST([BUILD_WITH_LIBPROTOBUF_LDFLAGS])
4556 AC_SUBST([BUILD_WITH_LIBPROTOBUF_LIBS])
4559 AC_ARG_VAR([PROTOC], [path to the protoc binary])
4560 AC_PATH_PROG([PROTOC], [protoc])
4562 if test "x$PROTOC" != "x"; then
4563 AC_MSG_CHECKING([for protoc 3.0.0+])
4564 if $PROTOC --version | $EGREP libprotoc.3 >/dev/null; then
4565 protoc3="yes (`$PROTOC --version`)"
4568 protoc3="no (`$PROTOC --version`)"
4570 AC_MSG_RESULT([$protoc3])
4572 AM_CONDITIONAL([HAVE_PROTOC3], [test "x$have_protoc3" = "xyes"])
4574 # --with-libprotobuf-c {{{
4575 AC_ARG_WITH([libprotobuf-c],
4576 [AS_HELP_STRING([--with-libprotobuf-c@<:@=PREFIX@:>@], [Path to libprotobuf-c.])],
4578 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4579 with_libprotobuf_c_cppflags="-I$withval/include"
4580 with_libprotobuf_c_ldflags="-L$withval/lib"
4581 with_libprotobuf_c="yes"
4584 if test "x$withval" = "xno"; then
4585 with_libprotobuf_c="no (disabled on command line)"
4591 if test "x$withval" = "xyes"; then
4592 PKG_CHECK_MODULES([PROTOBUF_C], [libprotobuf-c],
4593 [with_libprotobuf_c="yes"],
4594 [with_libprotobuf_c="no (pkg-config could not find libprotobuf-c)"]
4598 if test "x$withval" != "xno"; then
4599 SAVE_LDFLAGS="$LDFLAGS"
4601 LDFLAGS="$with_libprotobuf_c_ldflags"
4602 LIBS="$PROTOBUF_C_LIBS $LIBS"
4603 AC_CHECK_LIB([protobuf-c], [protobuf_c_message_pack],
4605 SAVE_CPPFLAGS="$CPPFLAGS"
4606 CPPFLAGS="$with_libprotobuf_c_cppflags $PROTOBUF_C_CFLAGS"
4607 if test "x$PROTOBUF_C_LIBS" = "x"; then
4608 PROTOBUF_C_LIBS="-lprotobuf-c"
4611 AC_CHECK_HEADERS([protobuf-c/protobuf-c.h google/protobuf-c/protobuf-c.h],
4613 with_libprotobuf_c="yes"
4616 [with_libprotobuf_c="no (<protobuf-c.h> not found)"]
4619 CPPFLAGS="$SAVE_CPPFLAGS"
4621 [with_libprotobuf_c="no (libprotobuf-c not found)"]
4623 LDFLAGS="$SAVE_LDFLAGS"
4627 BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS="$with_libprotobuf_c_cppflags $PROTOBUF_C_CFLAGS"
4628 BUILD_WITH_LIBPROTOBUF_C_LDFLAGS="$with_libprotobuf_c_ldflags"
4629 BUILD_WITH_LIBPROTOBUF_C_LIBS="$PROTOBUF_C_LIBS"
4630 AC_SUBST([BUILD_WITH_LIBPROTOBUF_C_CPPFLAGS])
4631 AC_SUBST([BUILD_WITH_LIBPROTOBUF_C_LDFLAGS])
4632 AC_SUBST([BUILD_WITH_LIBPROTOBUF_C_LIBS])
4635 AC_ARG_VAR([PROTOC_C], [path to the protoc-c binary])
4636 AC_PATH_PROG([PROTOC_C], [protoc-c])
4637 if test "x$PROTOC_C" = "x"
4639 have_protoc_c="no (protoc-c compiler not found)"
4644 # --with-libpython {{{
4645 AC_ARG_VAR([LIBPYTHON_CPPFLAGS], [Preprocessor flags for libpython])
4646 AC_ARG_VAR([LIBPYTHON_LDFLAGS], [Linker flags for libpython])
4647 AC_ARG_VAR([LIBPYTHON_LIBS], [Libraries for libpython])
4649 AC_ARG_WITH([libpython],
4650 [AS_HELP_STRING([--with-libpython], [if we should build with libpython @<:@default=yes@:>@])],
4651 [with_libpython="$withval"],
4652 [with_libpython="check"]
4655 if test "$with_libpython" != "no"; then
4656 if test "$LIBPYTHON_CPPFLAGS" = "" && test "$LIBPYTHON_LDFLAGS" = ""; then
4657 AC_ARG_VAR([PYTHON_CONFIG], [path to python-config])
4658 AC_PATH_PROGS([PYTHON_CONFIG],
4659 [python3-config python2-config python-config]
4661 if test "$PYTHON_CONFIG" = ""; then
4662 if test "$with_libpython" = "yes"; then
4663 AC_MSG_ERROR([Unable to find python-config])
4670 if test "$PYTHON_CONFIG" != ""; then
4671 LIBPYTHON_CPPFLAGS="`${PYTHON_CONFIG} --includes`"
4672 if test $? -ne 0; then
4675 LIBPYTHON_LDFLAGS="`${PYTHON_CONFIG} --ldflags`"
4676 if test $? -ne 0; then
4679 LIBPYTHON_LIBS="`${PYTHON_CONFIG} --libs`"
4680 if test $? -ne 0; then
4685 if test "$with_libpython" != "xno"; then
4686 SAVE_CPPFLAGS="$CPPFLAGS"
4687 SAVE_LDFLAGS="$LDFLAGS"
4689 CPPFLAGS="$LIBPYTHON_CPPFLAGS $CPPFLAGS"
4690 LDFLAGS="$LIBPYTHON_LDFLAGS $LDFLAGS"
4691 LIBS="$LIBPYTHON_LIBS $LIBS"
4693 AC_CHECK_HEADERS([Python.h],
4695 AC_MSG_CHECKING([for libpython])
4696 AC_LINK_IFELSE([AC_LANG_PROGRAM(
4697 [[#include <Python.h>]],
4698 [[Py_Initialize();]])
4700 [with_libpython="yes"],
4701 [with_libpython="no"]
4703 AC_MSG_RESULT([$with_libpython])
4705 [with_libpython="no"]
4708 CPPFLAGS="$SAVE_CPPFLAGS"
4709 LDFLAGS="$SAVE_LDFLAGS"
4712 # }}} --with-libpython
4714 # --with-librabbitmq {{{
4715 AC_ARG_WITH([librabbitmq],
4716 [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])],
4718 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4719 with_librabbitmq_cppflags="-I$withval/include"
4720 with_librabbitmq_ldflags="-L$withval/lib"
4721 with_librabbitmq="yes"
4723 with_librabbitmq="$withval"
4726 [with_librabbitmq="yes"]
4729 if test "x$with_librabbitmq" = "xyes"; then
4730 SAVE_CPPFLAGS="$CPPFLAGS"
4731 CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
4733 AC_CHECK_HEADERS([amqp.h],
4734 [with_librabbitmq="yes"],
4735 [with_librabbitmq="no (amqp.h not found)"]
4738 CPPFLAGS="$SAVE_CPPFLAGS"
4741 if test "x$with_librabbitmq" = "xyes"; then
4742 # librabbitmq up to version 0.9.1 provides "library_errno", later
4743 # versions use "library_error". The library does not provide a version
4746 SAVE_CPPFLAGS="$CPPFLAGS"
4747 CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
4749 AC_CHECK_MEMBERS([amqp_rpc_reply_t.library_errno],
4756 #include <inttypes.h>
4760 CPPFLAGS="$SAVE_CPPFLAGS"
4762 SAVE_LDFLAGS="$LDFLAGS"
4763 LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags"
4765 AC_CHECK_LIB([rabbitmq], [amqp_basic_publish],
4766 [with_librabbitmq="yes"],
4767 [with_librabbitmq="no (Symbol 'amqp_basic_publish' not found)"]
4770 LDFLAGS="$SAVE_LDFLAGS"
4773 if test "x$with_librabbitmq" = "xyes"; then
4774 SAVE_CPPFLAGS="$CPPFLAGS"
4775 SAVE_LDFLAGS="$LDFLAGS"
4777 CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
4778 LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags"
4781 AC_CHECK_HEADERS([amqp_tcp_socket.h amqp_socket.h])
4782 AC_CHECK_FUNC([amqp_tcp_socket_new],
4784 AC_DEFINE([HAVE_AMQP_TCP_SOCKET], [1],
4785 [Define if librabbitmq provides the new TCP socket interface.])
4789 AC_CHECK_DECLS([amqp_socket_close],
4794 #ifdef HAVE_AMQP_TCP_SOCKET_H
4795 # include <amqp_tcp_socket.h>
4797 #ifdef HAVE_AMQP_SOCKET_H
4798 # include <amqp_socket.h>
4803 CPPFLAGS="$SAVE_CPPFLAGS"
4804 LDFLAGS="$SAVE_LDFLAGS"
4808 if test "x$with_librabbitmq" = "xyes"; then
4809 BUILD_WITH_LIBRABBITMQ_CPPFLAGS="$with_librabbitmq_cppflags"
4810 BUILD_WITH_LIBRABBITMQ_LDFLAGS="$with_librabbitmq_ldflags"
4811 BUILD_WITH_LIBRABBITMQ_LIBS="-lrabbitmq"
4814 AC_SUBST(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
4815 AC_SUBST(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
4816 AC_SUBST(BUILD_WITH_LIBRABBITMQ_LIBS)
4820 # --with-librdkafka {{{
4821 AC_ARG_WITH([librdkafka],
4822 [AS_HELP_STRING([--with-librdkafka@<:@=PREFIX@:>@], [Path to librdkafka.])],
4824 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4825 with_librdkafka_cppflags="-I$withval/include"
4826 with_librdkafka_ldflags="-L$withval/lib"
4827 with_librdkafka_rpath="$withval/lib"
4828 with_librdkafka="yes"
4830 with_librdkafka="$withval"
4833 [with_librdkafka="yes"]
4836 if test "x$with_librdkafka" = "xyes"; then
4837 SAVE_CPPFLAGS="$CPPFLAGS"
4838 CPPFLAGS="$CPPFLAGS $with_librdkafka_cppflags"
4840 AC_CHECK_HEADERS([librdkafka/rdkafka.h],
4841 [with_librdkafka="yes"],
4842 [with_librdkafka="no (librdkafka/rdkafka.h not found)"]
4845 CPPFLAGS="$SAVE_CPPFLAGS"
4848 if test "x$with_librdkafka" = "xyes"; then
4849 SAVE_LDFLAGS="$LDFLAGS"
4850 LDFLAGS="$LDFLAGS $with_librdkafka_ldflags"
4852 AC_CHECK_LIB([rdkafka], [rd_kafka_new],
4853 [with_librdkafka="yes"],
4854 [with_librdkafka="no (Symbol 'rd_kafka_new' not found)"])
4856 AC_CHECK_LIB([rdkafka], [rd_kafka_conf_set_log_cb],
4857 [with_librdkafka_log_cb="yes"],
4858 [with_librdkafka_log_cb="no"])
4860 AC_CHECK_LIB([rdkafka], [rd_kafka_set_logger],
4861 [with_librdkafka_logger="yes"],
4862 [with_librdkafka_logger="no"]
4865 LDFLAGS="$SAVE_LDFLAGS"
4868 if test "x$with_librdkafka" = "xyes"; then
4869 BUILD_WITH_LIBRDKAFKA_CPPFLAGS="$with_librdkafka_cppflags"
4870 BUILD_WITH_LIBRDKAFKA_LDFLAGS="$with_librdkafka_ldflags"
4872 if test "x$with_librdkafka_rpath" != "x"; then
4873 BUILD_WITH_LIBRDKAFKA_LIBS="-Wl,-rpath,$with_librdkafka_rpath -lrdkafka"
4875 BUILD_WITH_LIBRDKAFKA_LIBS="-lrdkafka"
4878 if test "x$with_librdkafka_log_cb" = "xyes"; then
4879 AC_DEFINE(HAVE_LIBRDKAFKA_LOG_CB, 1, [Define if librdkafka log facility is present and usable.])
4880 else if test "x$with_librdkafka_logger" = "xyes"; then
4881 AC_DEFINE(HAVE_LIBRDKAFKA_LOGGER, 1, [Define if librdkafka log facility is present and usable.])
4885 AC_SUBST([BUILD_WITH_LIBRDKAFKA_CPPFLAGS])
4886 AC_SUBST([BUILD_WITH_LIBRDKAFKA_LDFLAGS])
4887 AC_SUBST([BUILD_WITH_LIBRDKAFKA_LIBS])
4890 # --with-librouteros {{{
4891 AC_ARG_WITH([librouteros],
4892 [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
4894 if test "x$withval" = "xyes" || test "x$withval" = "xno"; then
4895 with_librouteros="$witval"
4897 with_librouteros_cppflags="-I$withval/include"
4898 with_librouteros_ldflags="-L$withval/lib"
4899 with_librouteros="yes"
4902 [with_librouteros="yes"]
4905 if test "x$with_librouteros" = "xyes"; then
4906 SAVE_CPPFLAGS="$CPPFLAGS"
4907 CPPFLAGS="$CPPFLAGS $with_librouteros_cppflags"
4909 AC_CHECK_HEADERS([routeros_api.h],
4910 [with_librouteros="yes"],
4911 [with_librouteros="no (routeros_api.h not found)"]
4914 CPPFLAGS="$SAVE_CPPFLAGS"
4917 if test "x$with_librouteros" = "xyes"; then
4918 SAVE_LDFLAGS="$LDFLAGS"
4919 LDFLAGS="$LDFLAGS $with_librouteros_ldflags"
4921 AC_CHECK_LIB([routeros], [ros_interface],
4922 [with_librouteros="yes"],
4923 [with_librouteros="no (symbol 'ros_interface' not found)"]
4926 LDFLAGS="$SAVE_LDFLAGS"
4929 if test "x$with_librouteros" = "xyes"; then
4930 BUILD_WITH_LIBROUTEROS_CPPFLAGS="$with_librouteros_cppflags"
4931 BUILD_WITH_LIBROUTEROS_LDFLAGS="$with_librouteros_ldflags"
4934 AC_SUBST([BUILD_WITH_LIBROUTEROS_CPPFLAGS])
4935 AC_SUBST([BUILD_WITH_LIBROUTEROS_LDFLAGS])
4939 librrd_threadsafe="no"
4940 librrd_rrdc_update="no"
4941 AC_ARG_WITH([librrd],
4942 [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
4944 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
4945 librrd_cflags="-I$withval/include"
4946 librrd_ldflags="-L$withval/lib"
4949 with_librrd="$withval"
4955 if test "x$with_librrd" = "xyes"; then
4956 SAVE_LDFLAGS="$LDFLAGS"
4957 LDFLAGS="$LDFLAGS $librrd_ldflags"
4958 PKG_CHECK_MODULES([RRD], [librrd >= 1.6.0],
4960 AC_CHECK_LIB([rrd], [rrd_update_r],
4961 [librrd_threadsafe="yes"],
4964 AC_CHECK_LIB([rrd], [rrdc_update],
4965 [librrd_rrdc_update="yes"],
4970 LDFLAGS="$SAVE_LDFLAGS"
4972 SAVE_CPPFLAGS="$CPPFLAGS"
4973 CPPFLAGS="$CPPFLAGS $RRD_CFLAGS $librrd_cflags"
4975 AC_CHECK_HEADERS([rrd.h],, [with_librrd="no (rrd.h not found)"])
4977 CPPFLAGS="$SAVE_CPPFLAGS"
4980 if test "x$with_librrd" = "xyes" && test "x$librrd_threadsafe" = "xno"; then
4981 SAVE_LDFLAGS="$LDFLAGS"
4982 LDFLAGS="$LDFLAGS $librrd_ldflags"
4984 AC_CHECK_LIB([rrd_th], [rrd_update_r],
4986 librrd_ldflags="$librrd_ldflags -lrrd_th"
4987 librrd_threadsafe="yes"
4988 AC_CHECK_LIB([rrd_th], [rrdc_update],
4989 [librrd_rrdc_update="yes"],
4995 LDFLAGS="$SAVE_LDFLAGS"
4998 if test "x$with_librrd" = "xyes" && test "x$librrd_threadsafe" = "xno"; then
4999 SAVE_LDFLAGS="$LDFLAGS"
5000 LDFLAGS="$LDFLAGS $librrd_ldflags"
5002 AC_CHECK_LIB([rrd], [rrd_update],
5004 librrd_ldflags="$librrd_ldflags -lrrd"
5005 AC_CHECK_LIB([rrd], [rrdc_update],
5006 [librrd_rrdc_update="yes"],
5010 [with_librrd="no (symbol 'rrd_update' not found)"]
5012 LDFLAGS="$SAVE_LDFLAGS"
5015 if test "x$with_librrd" = "xyes"; then
5016 BUILD_WITH_LIBRRD_CFLAGS="$RRD_CFLAGS $librrd_cflags"
5017 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
5018 BUILD_WITH_LIBRRD_LIBS="$RRD_LIBS"
5021 if test "x$librrd_threadsafe" = "xyes"; then
5022 AC_DEFINE([HAVE_THREADSAFE_LIBRRD], [1],
5023 [Define to 1 if the rrd library is thread-safe]
5027 AC_SUBST([BUILD_WITH_LIBRRD_CFLAGS])
5028 AC_SUBST([BUILD_WITH_LIBRRD_LDFLAGS])
5029 AC_SUBST([BUILD_WITH_LIBRRD_LIBS])
5032 # --with-libsensors {{{
5033 AC_ARG_WITH([libsensors],
5034 [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
5036 if test "x$withval" = "xno" || test "x$withval" = "xyes"; then
5037 with_libsensors="$withval"
5039 with_sensors_cppflags="-I$withval/include"
5040 with_sensors_ldflags="-L$withval/lib"
5041 with_libsensors="yes"
5045 if test "x$ac_system" = "xLinux"; then
5046 with_libsensors="yes"
5048 with_libsensors="no (Linux only library)"
5053 if test "x$with_libsensors" = "xyes"; then
5054 SAVE_CPPFLAGS="$CPPFLAGS"
5055 CPPFLAGS="$CPPFLAGS $with_sensors_cppflags"
5057 AC_CHECK_HEADERS([sensors/sensors.h],
5058 [with_libsensors="yes"],
5059 [with_libsensors="no (sensors/sensors.h not found)"]
5062 CPPFLAGS="$SAVE_CPPFLAGS"
5065 if test "x$with_libsensors" = "xyes"; then
5066 SAVE_LDFLAGS="$LDFLAGS"
5067 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
5069 AC_CHECK_LIB([sensors], [sensors_init],
5070 [with_libsensors="yes"],
5071 [with_libsensors="no (libsensors not found)"]
5074 LDFLAGS="$SAVE_LDFLAGS"
5077 if test "x$with_libsensors" = "xyes"; then
5078 BUILD_WITH_LIBSENSORS_CPPFLAGS="$with_sensors_cppflags"
5079 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
5080 BUILD_WITH_LIBSENSORS_LIBS="-lsensors"
5083 AC_SUBST([BUILD_WITH_LIBSENSORS_CPPFLAGS])
5084 AC_SUBST([BUILD_WITH_LIBSENSORS_LDFLAGS])
5085 AC_SUBST([BUILD_WITH_LIBSENSORS_LIBS])
5090 AC_SUBST([LIBSIGROK_CFLAGS])
5091 AC_SUBST([LIBSIGROK_LIBS])
5092 PKG_CHECK_MODULES([LIBSIGROK], [libsigrok < 0.4],
5093 [with_libsigrok="yes"],
5094 [with_libsigrok="no (pkg-config could not find libsigrok)"]
5098 # --with-libstatgrab {{{
5099 AC_ARG_WITH([libstatgrab],
5100 [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
5102 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
5103 with_libstatgrab_cflags="-I$withval/include"
5104 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
5105 with_libstatgrab="yes"
5106 with_libstatgrab_pkg_config="no"
5108 with_libstatgrab="$withval"
5109 with_libstatgrab_pkg_config="yes"
5113 with_libstatgrab="yes"
5114 with_libstatgrab_pkg_config="yes"
5117 if test "x$with_libstatgrab" = "xyes" && test "x$with_libstatgrab_pkg_config" = "xyes"; then
5118 AC_MSG_CHECKING([pkg-config for libstatgrab])
5120 $PKG_CONFIG --exists libstatgrab 2>/dev/null
5121 if test "$?" != "0"; then
5122 with_libstatgrab_pkg_config="no"
5123 with_libstatgrab="no (pkg-config doesn't know libstatgrab)"
5124 temp_result="not found"
5126 AC_MSG_RESULT([$temp_result])
5129 if test "x$with_libstatgrab" = "xyes" && test "x$with_libstatgrab_pkg_config" = "xyes" && test "x$with_libstatgrab_cflags" = "x"; then
5130 AC_MSG_CHECKING([for libstatgrab CFLAGS])
5131 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
5132 if test "$?" = "0"; then
5133 with_libstatgrab_cflags="$temp_result"
5135 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
5136 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
5138 AC_MSG_RESULT([$temp_result])
5141 if test "x$with_libstatgrab" = "xyes" && test "x$with_libstatgrab_pkg_config" = "xyes" && test "x$with_libstatgrab_ldflags" = "x"; then
5142 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
5143 temp_result="`$PKG_CONFIG --libs libstatgrab`"
5146 with_libstatgrab_ldflags="$temp_result"
5148 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
5149 temp_result="$PKG_CONFIG --libs libstatgrab failed"
5151 AC_MSG_RESULT([$temp_result])
5154 if test "x$with_libstatgrab" = "xyes"; then
5155 SAVE_CPPFLAGS="$CPPFLAGS"
5156 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
5158 AC_CHECK_HEADERS([statgrab.h],
5159 [with_libstatgrab="yes"],
5160 [with_libstatgrab="no (statgrab.h not found)"]
5163 CPPFLAGS="$SAVE_CPPFLAGS"
5166 if test "x$with_libstatgrab" = "xyes"; then
5167 SAVE_LDFLAGS="$LDFLAGS"
5168 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
5170 AC_CHECK_LIB([statgrab], [sg_init],
5171 [with_libstatgrab="yes"],
5172 [with_libstatgrab="no (symbol sg_init not found)"]
5175 LDFLAGS="$SAVE_LDFLAGS"
5178 if test "x$with_libstatgrab" = "xyes"; then
5179 SAVE_CFLAGS="$CFLAGS"
5180 SAVE_LDFLAGS="$LDFLAGS"
5183 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
5184 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
5185 LIBS="-lstatgrab $LIBS"
5187 AC_CACHE_CHECK([if libstatgrab >= 0.90],
5188 [c_cv_have_libstatgrab_0_90],
5195 #include <statgrab.h>
5198 if (sg_init()) return 0;
5202 [c_cv_have_libstatgrab_0_90="no"],
5203 [c_cv_have_libstatgrab_0_90="yes"]
5208 CFLAGS="$SAVE_CFLAGS"
5209 LDFLAGS="$SAVE_LDFLAGS"
5213 AM_CONDITIONAL([BUILD_WITH_LIBSTATGRAB], [test "x$with_libstatgrab" = "xyes"])
5215 if test "x$with_libstatgrab" = "xyes"; then
5216 AC_DEFINE([HAVE_LIBSTATGRAB], [1],
5217 [Define to 1 if you have the 'statgrab' library (-lstatgrab)]
5220 if test "x$c_cv_have_libstatgrab_0_90" = "xyes"; then
5221 AC_DEFINE([HAVE_LIBSTATGRAB_0_90], [1],
5222 [Define to 1 if libstatgrab version >= 0.90]
5226 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
5227 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
5231 AC_SUBST([BUILD_WITH_LIBSTATGRAB_CFLAGS])
5232 AC_SUBST([BUILD_WITH_LIBSTATGRAB_LDFLAGS])
5235 # --with-libtokyotyrant {{{
5236 AC_ARG_WITH([libtokyotyrant],
5237 [AS_HELP_STRING([--with-libtokyotyrant@<:@=PREFIX@:>@], [Path to libtokyotyrant.])],
5239 if test "x$withval" = "xno" || test "x$withval" = "xyes"; then
5240 with_libtokyotyrant="$withval"
5242 with_libtokyotyrant_cppflags="-I$withval/include"
5243 with_libtokyotyrant_ldflags="-L$withval/include"
5244 with_libtokyotyrant_libs="-ltokyotyrant"
5245 with_libtokyotyrant="yes"
5248 [with_libtokyotyrant="yes"]
5251 if test "x$with_libtokyotyrant" = "xyes"; then
5252 if $PKG_CONFIG --exists tokyotyrant; then
5253 with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
5254 with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `$PKG_CONFIG --libs-only-L tokyotyrant`"
5255 with_libtokyotyrant_libs="$with_libtokyotyrant_libs `$PKG_CONFIG --libs-only-l tokyotyrant`"
5259 if test "x$with_libtokyotyrant" = "xyes"; then
5260 SAVE_CPPFLAGS="$CPPFLAGS"
5261 CPPFLAGS="$CPPFLAGS $with_libtokyotyrant_cppflags"
5263 AC_CHECK_HEADERS([tcrdb.h],
5264 [with_libtokyotyrant="yes"],
5265 [with_libtokyotyrant="no (tcrdb.h not found)"]
5268 CPPFLAGS="$SAVE_CPPFLAGS"
5271 if test "x$with_libtokyotyrant" = "xyes"; then
5272 SAVE_LDFLAGS="$LDFLAGS"
5273 LDFLAGS="$LDFLAGS $with_libtokyotyrant_ldflags"
5275 AC_CHECK_LIB([tokyotyrant], [tcrdbrnum],
5276 [with_libtokyotyrant="yes"],
5277 [with_libtokyotyrant="no (symbol tcrdbrnum not found)"],
5278 [$with_libtokyotyrant_libs]
5281 LDFLAGS="$SAVE_LDFLAGS"
5284 if test "x$with_libtokyotyrant" = "xyes"; then
5285 BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
5286 BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
5287 BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
5289 AC_SUBST([BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS])
5290 AC_SUBST([BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS])
5291 AC_SUBST([BUILD_WITH_LIBTOKYOTYRANT_LIBS])
5294 # --with-libudev {{{
5295 AC_ARG_WITH([libudev],
5296 [AS_HELP_STRING([--with-libudev@<:@=PREFIX@:>@], [Path to libudev.])],
5298 if test "x$withval" = "xno" || test "x$withval" = "xyes"; then
5299 with_libudev="$withval"
5301 with_libudev_cppflags="-I$withval/include"
5302 with_libudev_ldflags="-L$withval/lib"
5307 if test "x$ac_system" = "xLinux"; then
5310 with_libudev="no (Linux only library)"
5315 if test "x$with_libudev" = "xyes"; then
5316 SAVE_CPPFLAGS="$CPPFLAGS"
5317 CPPFLAGS="$CPPFLAGS $with_libudev_cppflags"
5319 AC_CHECK_HEADERS([libudev.h],
5320 [with_libudev="yes"],
5321 [with_libudev="no (libudev.h not found)"]
5324 CPPFLAGS="$SAVE_CPPFLAGS"
5327 if test "x$with_libudev" = "xyes"; then
5328 SAVE_LDFLAGS="$LDFLAGS"
5329 LDFLAGS="$LDFLAGS $with_libudev_ldflags"
5331 AC_CHECK_LIB([udev], [udev_new],
5332 [with_libudev="yes"],
5333 [with_libudev="no (libudev not found)"]
5336 LDFLAGS="$SAVE_LDFLAGS"
5339 if test "x$with_libudev" = "xyes"; then
5340 BUILD_WITH_LIBUDEV_CPPFLAGS="$with_libudev_cppflags"
5341 BUILD_WITH_LIBUDEV_LDFLAGS="$with_libudev_ldflags"
5342 BUILD_WITH_LIBUDEV_LIBS="-ludev"
5345 AC_SUBST([BUILD_WITH_LIBUDEV_CPPFLAGS])
5346 AC_SUBST([BUILD_WITH_LIBUDEV_LDFLAGS])
5347 AC_SUBST([BUILD_WITH_LIBUDEV_LIBS])
5349 AM_CONDITIONAL([BUILD_WITH_LIBUDEV], [test "x$with_libudev" = "xyes"])
5352 # --with-libupsclient {{{
5353 with_libupsclient_config=""
5354 AC_ARG_WITH([libupsclient],
5355 [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the upsclient library.])],
5357 if test "x$withval" = "xno"; then
5358 with_libupsclient="no"
5359 else if test "x$withval" = "xyes"; then
5360 with_libupsclient="use_pkgconfig"
5362 if test -x "$withval"; then
5363 with_libupsclient_config="$withval"
5364 with_libupsclient="use_libupsclient_config"
5365 else if test -x "$withval/bin/libupsclient-config"; then
5366 with_libupsclient_config="$withval/bin/libupsclient-config"
5367 with_libupsclient="use_libupsclient_config"
5369 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
5370 with_libupsclient_cflags="-I$withval/include"
5371 with_libupsclient_libs="-L$withval/lib -lupsclient"
5372 with_libupsclient="yes"
5376 [with_libupsclient="use_pkgconfig"]
5379 # configure using libupsclient-config
5380 if test "x$with_libupsclient" = "xuse_libupsclient_config"; then
5381 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
5382 if test $? -ne 0; then
5383 with_libupsclient="no ($with_libupsclient_config failed)"
5385 with_libupsclient_libs="`$with_libupsclient_config --libs`"
5386 if test $? -ne 0; then
5387 with_libupsclient="no ($with_libupsclient_config failed)"
5391 if test "x$with_libupsclient" = "xuse_libupsclient_config"; then
5392 with_libupsclient="yes"
5395 # configure using pkg-config
5396 if test "x$with_libupsclient" = "xuse_pkgconfig"; then
5397 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
5398 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
5399 if test $? -ne 0; then
5400 with_libupsclient="no (pkg-config doesn't know libupsclient)"
5404 if test "x$with_libupsclient" = "xuse_pkgconfig"; then
5405 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
5406 if test $? -ne 0; then
5407 with_libupsclient="no ($PKG_CONFIG failed)"
5410 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
5411 if test $? -ne 0; then
5412 with_libupsclient="no ($PKG_CONFIG failed)"
5416 if test "x$with_libupsclient" = "xuse_pkgconfig"; then
5417 with_libupsclient="yes"
5420 if test "x$with_libupsclient" = "xyes"; then
5421 SAVE_CPPFLAGS="$CPPFLAGS"
5422 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
5424 AC_CHECK_HEADERS([upsclient.h],
5425 [with_libupsclient="yes"],
5426 [with_libupsclient="no (upsclient.h not found)"]
5429 CPPFLAGS="$SAVE_CPPFLAGS"
5432 if test "x$with_libupsclient" = "xyes"; then
5433 SAVE_LDFLAGS="$LDFLAGS"
5434 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
5436 AC_CHECK_LIB([upsclient], [upscli_connect],
5437 [with_libupsclient="yes"],
5438 [with_libupsclient="no (symbol upscli_connect not found)"]
5441 AC_CHECK_LIB([upsclient], [upscli_init],
5442 [AC_DEFINE([HAVE_UPSCLI_INIT], [1], [Define when upscli_init() (since version 2-7) is available.])]
5445 AC_CHECK_LIB([upsclient], [upscli_tryconnect],
5446 [AC_DEFINE([HAVE_UPSCLI_TRYCONNECT], [1], [Define when upscli_tryconnect() (since version 2.6.2) is available.])]
5449 LDFLAGS="$SAVE_LDFLAGS"
5452 if test "x$with_libupsclient" = "xyes"; then
5453 SAVE_CPPFLAGS="$CPPFLAGS"
5454 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
5456 AC_CHECK_TYPES([UPSCONN_t, UPSCONN],
5462 #include <upsclient.h>
5466 CPPFLAGS="$SAVE_CPPFLAGS"
5469 if test "x$with_libupsclient" = "xyes"; then
5470 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
5471 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
5474 AC_SUBST([BUILD_WITH_LIBUPSCLIENT_CFLAGS])
5475 AC_SUBST([BUILD_WITH_LIBUPSCLIENT_LIBS])
5478 # --with-libxenctrl {{{
5479 AC_ARG_WITH([libxenctrl],
5480 [AS_HELP_STRING([--with-libxenctrl@<:@=PREFIX@:>@], [Path to libxenctrl.])],
5482 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
5483 with_libxenctrl_cppflags="-I$withval/include"
5484 with_libxenctrl_ldflags="-L$withval/lib"
5485 with_libxenctrl="yes"
5487 with_libxenctrl="$withval"
5490 [with_libxenctrl="yes"]
5493 if test "x$with_libxenctrl" = "xyes"; then
5494 SAVE_CPPFLAGS="$CPPFLAGS"
5495 CPPFLAGS="$CPPFLAGS $with_libxenctrl_cppflags"
5497 AC_CHECK_HEADERS([xenctrl.h],
5498 [with_libxenctrl="yes"],
5499 [with_libxenctrl="no (xenctrl.h not found)"]
5502 CPPFLAGS="$SAVE_CPPFLAGS"
5505 if test "x$with_libxenctrl" = "xyes"; then
5506 SAVE_LDFLAGS="$LDFLAGS"
5507 LDFLAGS="$LDFLAGS $with_libxenctrl_ldflags"
5509 #Xen versions older than 3.4 has no xc_getcpuinfo()
5510 AC_CHECK_LIB([xenctrl], [xc_getcpuinfo],
5511 [with_libxenctrl="yes"],
5512 [with_libxenctrl="no (symbol 'xc_getcpuinfo' not found)"]
5515 LDFLAGS="$SAVE_LDFLAGS"
5518 LIBXENCTL_CPPFLAGS="$with_libxenctl_cppflags"
5519 LIBXENCTL_LDFLAGS="$with_libxenctl_ldflags"
5520 AC_SUBST([LIBXENCTL_CPPFLAGS])
5521 AC_SUBST([LIBXENCTL_LDFLAGS])
5524 # --with-libxmms {{{
5525 with_xmms_config="xmms-config"
5526 AC_ARG_WITH([libxmms],
5527 [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
5529 if test "x$withval" = "xno" || test "x$withval" = "xyes"; then
5530 with_libxmms="$withval"
5532 if test -f "$withval" && test -x "$withval"; then
5533 with_xmms_config="$withval"
5534 else if test -x "$withval/bin/xmms-config"; then
5535 with_xmms_config="$withval/bin/xmms-config"
5540 [with_libxmms="yes"]
5543 if test "x$with_libxmms" = "xyes"; then
5544 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
5545 if test $? -ne 0; then
5550 if test "x$with_libxmms" = "xyes"; then
5551 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
5552 if test $? -ne 0; then
5557 if test "x$with_libxmms" = "xyes"; then
5558 SAVE_CFLAGS="$CFLAGS"
5559 CFLAGS="$with_xmms_cflags"
5561 AC_CHECK_HEADER([xmmsctrl.h],
5562 [with_libxmms="yes"],
5563 [with_libxmms="no"],
5566 CFLAGS="$SAVE_CFLAGS"
5569 if test "x$with_libxmms" = "xyes"; then
5571 LIBS="$with_xmms_libs"
5573 AC_CHECK_LIB([xmms], [xmms_remote_get_info],
5574 [with_libxmss="yes"],
5575 [with_libxmms="no"],
5583 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
5584 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
5586 AC_SUBST([BUILD_WITH_LIBXMMS_CFLAGS])
5587 AC_SUBST([BUILD_WITH_LIBXMMS_LIBS])
5590 # --with-libyajl {{{
5591 AC_ARG_WITH([libyajl],
5592 [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
5594 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
5595 with_libyajl_cppflags="-I$withval/include"
5596 with_libyajl_ldflags="-L$withval/lib"
5599 with_libyajl="$withval"
5602 [with_libyajl="yes"]
5605 if test "x$with_libyajl" = "xyes"; then
5606 SAVE_CPPFLAGS="$CPPFLAGS"
5607 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
5609 AC_CHECK_HEADERS([yajl/yajl_parse.h],
5610 [with_libyajl="yes"],
5611 [with_libyajl="no (yajl/yajl_parse.h not found)"]
5614 AC_CHECK_HEADERS([yajl/yajl_tree.h],
5615 [with_libyajl2="yes"],
5616 [with_libyajl2="no (yajl/yajl_tree.h not found)"]
5619 AC_CHECK_HEADERS([yajl/yajl_version.h])
5621 CPPFLAGS="$SAVE_CPPFLAGS"
5624 if test "x$with_libyajl" = "xyes"; then
5625 SAVE_LDFLAGS="$LDFLAGS"
5626 LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
5628 AC_CHECK_LIB([yajl], [yajl_alloc],
5629 [with_libyajl="yes"],
5630 [with_libyajl="no (Symbol 'yajl_alloc' not found)"]
5633 AC_CHECK_LIB([yajl], [yajl_tree_parse],
5634 [with_libyajl2="yes"],
5635 [with_libyajl2="no (Symbol 'yajl_tree_parse' not found)"]
5638 LDFLAGS="$SAVE_LDFLAGS"
5641 if test "x$with_libyajl" = "xyes"; then
5642 BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
5643 BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
5644 BUILD_WITH_LIBYAJL_LIBS="-lyajl"
5645 AC_DEFINE([HAVE_LIBYAJL], [1], [Define if libyajl is present and usable.])
5648 AC_SUBST([BUILD_WITH_LIBYAJL_CPPFLAGS])
5649 AC_SUBST([BUILD_WITH_LIBYAJL_LDFLAGS])
5650 AC_SUBST([BUILD_WITH_LIBYAJL_LIBS])
5652 AM_CONDITIONAL([BUILD_WITH_LIBYAJL], [test "x$with_libyajl" = "xyes"])
5656 with_mic_cppflags="-I/opt/intel/mic/sysmgmt/sdk/include"
5657 with_mic_ldflags="-L/opt/intel/mic/sysmgmt/sdk/lib/Linux"
5658 with_mic_libs="-lMicAccessSDK -scif"
5660 [AS_HELP_STRING([--with-mic@<:@=PREFIX@:>@], [Path to Intel MIC Access API.])],
5662 if test "x$withval" = "xno" || test "x$withval" = "xyes"; then
5664 else if test -d "$with_mic/lib"; then
5665 with_mic_cppflags="-I$withval/include"
5666 with_mic_ldflags="-L$withval/lib/Linux"
5673 if test "x$with_mic" = "xyes"; then
5674 SAVE_CPPFLAGS="$CPPFLAGS"
5675 CPPFLAGS="$CPPFLAGS $with_mic_cppflags"
5677 AC_CHECK_HEADERS([MicAccessApi.h],
5679 [with_mic="no (MicAccessApi not found)"]
5682 CPPFLAGS="$SAVE_CPPFLAGS"
5685 if test "x$with_mic" = "xyes"; then
5686 SAVE_LDFLAGS="$LDFLAGS"
5687 LDFLAGS="$LDFLAGS $with_mic_ldflags"
5689 AC_CHECK_LIB([MicAccessSDK], [MicInitAPI],
5691 [with_mic="no (symbol MicInitAPI not found)"],
5692 [$PTHREAD_LIBS -lscif]
5695 LDFLAGS="$SAVE_LDFLAGS"
5698 if test "x$with_mic" = "xyes"; then
5699 BUILD_WITH_MIC_CPPFLAGS="$with_mic_cppflags"
5700 BUILD_WITH_MIC_LDFLAGS="$with_mic_ldflags"
5701 BUILD_WITH_MIC_LIBS="$with_mic_libs"
5703 AC_SUBST([BUILD_WITH_MIC_CPPFLAGS])
5704 AC_SUBST([BUILD_WITH_MIC_LDFLAGS])
5705 AC_SUBST([BUILD_WITH_MIC_LIBS])
5708 # --with-libvarnish {{{
5709 AC_ARG_WITH([libvarnish],
5710 [AS_HELP_STRING([--with-libvarnish@<:@=PREFIX@:>@], [Path to libvarnish.])],
5712 if test "x$withval" = "xno"; then
5713 with_libvarnish="no"
5714 else if test "x$withval" = "xyes"; then
5715 with_libvarnish="use_pkgconfig"
5716 else if test -d "$with_libvarnish/lib"; then
5717 with_libvarnish_cflags="-I$withval/include"
5718 with_libvarnish_libs="-L$withval/lib -lvarnishapi"
5719 with_libvarnish="yes"
5722 [with_libvarnish="use_pkgconfig"]
5725 # configure using pkg-config
5726 if test "x$with_libvarnish" = "xuse_pkgconfig"; then
5727 $PKG_CONFIG --exists 'varnishapi' 2>/dev/null
5728 if test $? -ne 0; then
5729 with_libvarnish="no (pkg-config doesn't know varnishapi)"
5733 if test "x$with_libvarnish" = "xuse_pkgconfig"; then
5734 with_libvarnish_cflags="`$PKG_CONFIG --cflags 'varnishapi'`"
5735 if test $? -ne 0; then
5736 with_libvarnish="no ($PKG_CONFIG failed)"
5739 with_libvarnish_libs="`$PKG_CONFIG --libs 'varnishapi'`"
5740 if test $? -ne 0; then
5741 with_libvarnish="no ($PKG_CONFIG failed)"
5744 if test "x$with_libvarnish" = "xuse_pkgconfig"; then
5745 with_libvarnish="yes"
5748 if test "x$with_libvarnish" = "xyes"; then
5749 SAVE_CPPFLAGS="$CPPFLAGS"
5750 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
5752 $PKG_CONFIG --atleast-version=5.2 'varnishapi' 2>/dev/null
5753 if test $? -eq 0; then
5754 AC_DEFINE([HAVE_VARNISH_V5], [1], [Varnish 5 API support])
5756 AC_CHECK_HEADERS([vapi/vsc.h],
5757 [AC_DEFINE([HAVE_VARNISH_V4], [1], [Varnish 4 API support])],
5759 AC_CHECK_HEADERS([vsc.h],
5760 [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support]) ],
5762 AC_CHECK_HEADERS([varnishapi.h],
5763 [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])],
5764 [with_libvarnish="no (found none of the varnish header files)"]
5772 CPPFLAGS="$SAVE_CPPFLAGS"
5775 if test "x$with_libvarnish" = "xyes"; then
5776 BUILD_WITH_LIBVARNISH_CFLAGS="$with_libvarnish_cflags"
5777 BUILD_WITH_LIBVARNISH_LIBS="$with_libvarnish_libs"
5780 AC_SUBST([BUILD_WITH_LIBVARNISH_CFLAGS])
5781 AC_SUBST([BUILD_WITH_LIBVARNISH_LIBS])
5784 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
5785 $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
5786 if test $? -eq 0; then
5789 with_libxml2="no (pkg-config doesn't know libxml-2.0)"
5792 $PKG_CONFIG --exists libvirt 2>/dev/null
5793 if test $? = 0; then
5796 with_libvirt="no (pkg-config doesn't know libvirt)"
5799 if test "x$with_libxml2" = "xyes"; then
5800 with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
5801 if test $? -ne 0; then
5805 with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
5806 if test $? -ne 0; then
5811 if test "x$with_libxml2" = "xyes"; then
5812 SAVE_CPPFLAGS="$CPPFLAGS"
5813 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
5815 AC_CHECK_HEADERS([libxml/parser.h],
5816 [with_libxml2="yes"],
5817 [with_libxml2="no (libxml/parser.h not found)"]
5820 CPPFLAGS="$SAVE_CPPFLAGS"
5823 if test "x$with_libxml2" = "xyes"; then
5824 SAVE_LDFLAGS="$LDFLAGS"
5825 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
5827 AC_CHECK_LIB([xml2], [xmlXPathEval],
5828 [with_libxml2="yes"],
5829 [with_libxml2="no (symbol xmlXPathEval not found)"]
5832 LDFLAGS="$SAVE_LDFLAGS"
5835 if test "x$with_libxml2" = "xyes"; then
5836 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
5837 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
5840 AC_SUBST([BUILD_WITH_LIBXML2_CFLAGS])
5841 AC_SUBST([BUILD_WITH_LIBXML2_LIBS])
5843 if test "x$with_libvirt" = "xyes"; then
5844 with_libvirt_cflags="`$PKG_CONFIG --cflags libvirt`"
5845 if test $? -ne 0; then
5849 with_libvirt_ldflags="`$PKG_CONFIG --libs libvirt`"
5850 if test $? -ne 0; then
5855 if test "x$with_libvirt" = "xyes"; then
5856 SAVE_CPPFLAGS="$CPPFLAGS"
5857 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
5859 AC_CHECK_HEADERS([libvirt/libvirt.h],
5860 [with_libvirt="yes"],
5861 [with_libvirt="no (libvirt/libvirt.h not found)"]
5864 CPPFLAGS="$SAVE_CPPFLAGS"
5867 if test "x$with_libvirt" = "xyes"; then
5868 SAVE_LDFLAGS="$LDFLAGS"
5869 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
5871 AC_CHECK_LIB([virt], [virDomainBlockStats],
5872 [with_libvirt="yes"],
5873 [with_libvirt="no (symbol virDomainBlockStats not found)"]
5876 LDFLAGS="$SAVE_LDFLAGS"
5879 if test "x$with_libvirt" = "xyes"; then
5880 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
5881 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
5884 AC_SUBST([BUILD_WITH_LIBVIRT_CFLAGS])
5885 AC_SUBST([BUILD_WITH_LIBVIRT_LIBS])
5888 # $PKG_CONFIG --exists OpenIPMIpthread {{{
5889 with_libopenipmipthread="yes"
5890 AC_MSG_CHECKING([for libOpenIPMIpthread])
5891 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
5892 if test $? -ne 0; then
5893 with_libopenipmipthread="no (pkg-config doesn't know OpenIPMIpthread)"
5895 AC_MSG_RESULT([$with_libopenipmipthread])
5897 if test "x$with_libopenipmipthread" = "xyes"; then
5898 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
5899 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
5900 if test $? -eq 0; then
5901 with_libopenipmipthread_cflags="$temp_result"
5903 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
5904 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
5906 AC_MSG_RESULT([$temp_result])
5909 if test "x$with_libopenipmipthread" = "xyes"; then
5910 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
5911 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
5912 if test $? -eq 0; then
5913 with_libopenipmipthread_ldflags="$temp_result"
5915 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
5916 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
5918 AC_MSG_RESULT([$temp_result])
5921 if test "x$with_libopenipmipthread" = "xyes"; then
5922 SAVE_CPPFLAGS="$CPPFLAGS"
5923 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
5925 AC_CHECK_HEADERS([OpenIPMI/ipmi_smi.h],
5926 [with_libopenipmipthread="yes"],
5927 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
5929 #include <OpenIPMI/ipmiif.h>
5930 #include <OpenIPMI/ipmi_err.h>
5931 #include <OpenIPMI/ipmi_posix.h>
5932 #include <OpenIPMI/ipmi_conn.h>
5936 CPPFLAGS="$SAVE_CPPFLAGS"
5939 if test "x$with_libopenipmipthread" = "xyes"; then
5940 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
5941 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
5944 AC_SUBST([BUILD_WITH_OPENIPMI_CFLAGS])
5945 AC_SUBST([BUILD_WITH_OPENIPMI_LIBS])
5948 # --with-libatasmart {{{
5949 AC_ARG_WITH([libatasmart],
5950 [AS_HELP_STRING([--with-libatasmart@<:@=PREFIX@:>@], [Path to libatasmart.])],
5952 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
5953 with_libatasmart_cppflags="-I$withval/include"
5954 with_libatasmart_ldflags="-L$withval/lib"
5955 with_libatasmart="yes"
5957 with_libatasmart="$withval"
5961 if test "x$ac_system" = "xLinux"; then
5962 with_libatasmart="yes"
5964 with_libatasmart="no (Linux only library)"
5969 if test "x$with_libatasmart" = "xyes"; then
5970 SAVE_CPPFLAGS="$CPPFLAGS"
5971 CPPFLAGS="$CPPFLAGS $with_libatasmart_cppflags"
5973 AC_CHECK_HEADERS([atasmart.h],
5974 [with_libatasmart="yes"],
5975 [with_libatasmart="no (atasmart.h not found)"])
5977 CPPFLAGS="$SAVE_CPPFLAGS"
5980 if test "x$with_libatasmart" = "xyes"; then
5981 SAVE_LDFLAGS="$LDFLAGS"
5982 LDFLAGS="$LDFLAGS $with_libatasmart_ldflags"
5984 AC_CHECK_LIB([atasmart], [sk_disk_open],
5985 [with_libatasmart="yes"],
5986 [with_libatasmart="no (Symbol 'sk_disk_open' not found)"]
5989 LDFLAGS="$SAVE_LDFLAGS"
5992 if test "x$with_libatasmart" = "xyes"; then
5993 BUILD_WITH_LIBATASMART_CPPFLAGS="$with_libatasmart_cppflags"
5994 BUILD_WITH_LIBATASMART_LDFLAGS="$with_libatasmart_ldflags"
5995 BUILD_WITH_LIBATASMART_LIBS="-latasmart"
5998 AC_SUBST([BUILD_WITH_LIBATASMART_CPPFLAGS])
5999 AC_SUBST([BUILD_WITH_LIBATASMART_LDFLAGS])
6000 AC_SUBST([BUILD_WITH_LIBATASMART_LIBS])
6003 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
6004 [with_libnotify="yes"],
6005 [with_libnotify="no (pkg-config doesn't know libnotify)"]
6008 PKG_CHECK_MODULES([LIBRIEMANN_CLIENT], [riemann-client >= 1.6.0],
6009 [with_libriemann_client="yes"],
6010 [with_libriemann_client="no (pkg-config doesn't know libriemann-client)"]
6013 # Check for enabled/disabled features
6016 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
6017 # ------------------------------------------------------------
6019 m4_define([my_toupper],[m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
6024 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
6029 m4_define([EnDis],[disabled])dnl
6030 m4_define([YesNo],[no])dnl
6036 m4_define([EnDis],[enabled])dnl
6037 m4_define([YesNo],[yes])dnl
6040 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
6044 m4_if([$3], [feature], [],
6048 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
6054 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
6056 enable_$1='[YesNo]'dnl
6058 if test "x$enable_$1" = "xno"; then
6061 if test "x$enable_$1" = "xyes"; then
6064 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
6069 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [whether or not to enable $3 $4])
6070 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
6072 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
6074 # AC_PLUGIN(name, default, info)
6075 # ------------------------------------------------------------
6083 [AS_HELP_STRING([--enable-$1],[$3])],
6085 if test "x$enableval" = "xyes"; then
6087 else if test "x$enableval" = "xforce"; then
6091 enable_plugin="no (disabled on command line)"
6095 if test "x$enable_all_plugins" = "xauto"; then
6096 if test "x$2" = "xyes"; then
6102 enable_plugin="$enable_all_plugins"
6106 if test "x$enable_plugin" = "xyes"; then
6107 if test "x$2" = "xyes" || test "x$force" = "xyes"; then
6108 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
6109 if test "x$2" != "xyes"; then
6110 dependency_warning="yes"
6112 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
6113 dependency_error="yes"
6114 enable_plugin="$2 (dependency error)"
6117 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), [test "x$enable_plugin" = "xyes"])
6118 enable_$1="$enable_plugin"
6120 )# AC_PLUGIN(name, default, info)
6122 m4_divert_once([HELP_ENABLE], [
6123 collectd features:])
6124 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
6125 AC_COLLECTD([debug], [enable], [feature], [debugging])
6126 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
6127 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
6128 AC_COLLECTD([werror], [disable], [feature], [building with -Werror])
6130 dependency_warning="no"
6131 dependency_error="no"
6134 plugin_barometer="no"
6139 plugin_conntrack="no"
6140 plugin_contextswitch="no"
6143 plugin_cpusleep="no"
6144 plugin_curl_json="no"
6145 plugin_curl_xml="no"
6149 plugin_dpdkevents="no"
6150 plugin_dpdkstat="no"
6157 plugin_hugepages="no"
6158 plugin_intel_pmu="no"
6159 plugin_intel_rdt="no"
6160 plugin_interface="no"
6166 plugin_log_logstash="no"
6169 plugin_multimeter="no"
6172 plugin_ovs_events="no"
6173 plugin_ovs_stats="no"
6176 plugin_processes="no"
6177 plugin_protocols="no"
6182 plugin_synproxy="no"
6184 plugin_tcpconns="no"
6187 plugin_turbostat="no"
6193 plugin_wireless="no"
6194 plugin_write_prometheus="no"
6198 plugin_zookeeper="no"
6201 if test "x$ac_system" = "xLinux"; then
6202 plugin_battery="yes"
6203 plugin_cgroups="yes"
6204 plugin_conntrack="yes"
6205 plugin_contextswitch="yes"
6207 plugin_cpufreq="yes"
6210 plugin_entropy="yes"
6211 plugin_fhcount="yes"
6212 plugin_fscache="yes"
6213 plugin_hugepages="yes"
6214 plugin_interface="yes"
6223 plugin_processes="yes"
6224 plugin_protocols="yes"
6227 plugin_synproxy="yes"
6228 plugin_tcpconns="yes"
6229 plugin_thermal="yes"
6232 plugin_vserver="yes"
6233 plugin_wireless="yes"
6234 plugin_zfs_arc="yes"
6236 if test "x$ac_cv_header_linux_ip_vs_h" = "xyes"; then
6240 if test "x$have_cpuid_h" = "xyes"; then
6241 plugin_turbostat="yes"
6244 if test "x$c_cv_have_clock_boottime_monotonic" = "xyes"; then
6245 plugin_cpusleep="yes"
6248 if test "x$with_libyajl" = "xyes" && test "x$with_libyajl2" = "xyes"; then
6249 plugin_ovs_events="yes"
6250 plugin_ovs_stats="yes"
6254 if test "x$ac_system" = "xOpenBSD"; then
6255 plugin_tcpconns="yes"
6258 if test "x$ac_system" = "xNetBSD"; then
6260 plugin_entropy="yes"
6262 plugin_processes="yes"
6266 if test "x$with_libiokit" = "xyes"; then
6267 plugin_battery="yes"
6273 if test "x$ac_system" = "xAIX"; then
6275 plugin_tcpconns="yes"
6280 if test "x$ac_system" = "xFreeBSD"; then
6282 plugin_zfs_arc="yes"
6286 if test "x$with_perfstat" = "xyes"; then
6287 plugin_contextswitch="yes"
6290 plugin_interface="yes"
6297 if test "x$with_procinfo" = "xyes"; then
6298 plugin_processes="yes"
6302 if test "x$with_kstat" = "xyes"; then
6304 plugin_processes="yes"
6306 plugin_zfs_arc="yes"
6310 if test "x$with_devinfo" = "xyes" && test "x$with_kstat" = "xyes"; then
6313 plugin_interface="yes"
6318 if test "x$with_libi2c" = "xyes"; then
6319 plugin_barometer="yes"
6324 if test "x$with_libstatgrab" = "xyes"; then
6327 plugin_interface="yes"
6334 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"; then
6336 if test "x$have_strptime" = "xyes"; then
6341 if test "x$with_libopenipmipthread" = "xyes"; then
6345 if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"; then
6346 plugin_curl_json="yes"
6349 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"; then
6350 plugin_curl_xml="yes"
6353 if test "x$with_libyajl" = "xyes"; then
6357 if test "x$have_processor_info" = "xyes"; then
6361 if test "x$have_sysctl" = "xyes"; then
6365 if test "x$ac_system" = "xDarwin"; then
6370 if test "x$have_sysctlbyname" = "xyes"; then
6371 plugin_contextswitch="yes"
6374 plugin_tcpconns="yes"
6377 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"; then
6381 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"; then
6385 if test "x$c_cv_have_one_getmntent" = "xyes"; then
6389 if test "x$c_cv_have_getmntent_r" = "xyes"; then
6393 if test "x$plugin_df" = "xyes"; then
6395 if test "x$have_statfs" = "xyes"; then
6399 if test "x$have_statvfs" = "xyes"; then
6404 if test "x$have_linux_sockios_h" = "xyes" && test "x$have_linux_ethtool_h" = "xyes"; then
6405 plugin_ethstat="yes"
6408 if test "x$with_libgps" = "xyes"; then
6413 if test "x$GRPC_CPP_PLUGIN" = "x"; then
6414 plugin_grpc="no (grpc_cpp_plugin not found)"
6416 if test "x$have_protoc3" != "xyes"; then
6417 plugin_grpc="no (protoc3 not found)"
6419 if test "x$with_libprotobuf" != "xyes"; then
6420 plugin_grpc="no (libprotobuf not found)"
6422 if test "x$with_libgrpcpp" != "xyes"; then
6423 plugin_grpc="no (libgrpc++ not found)"
6426 if test "x$have_getifaddrs" = "xyes"; then
6427 plugin_interface="yes"
6430 if test "x$have_getloadavg" = "xyes"; then
6434 if test "x$with_libyajl" = "xyes"; then
6435 plugin_log_logstash="yes"
6438 if test "x$with_libperl" = "xyes" && test "x$c_cv_have_perl_ithreads" = "xyes"; then
6442 if test "x$have_protoc_c" = "xyes" && test "x$with_libprotobuf_c" = "xyes"; then
6444 if test "x$with_libmicrohttpd" = "xyes"; then
6445 plugin_write_prometheus="yes"
6449 # Mac OS X memory interface
6450 if test "x$have_host_statistics" = "xyes"; then
6454 if test "x$have_termios_h" = "xyes"; then
6455 if test "x$ac_system" != "xAIX"; then
6456 plugin_multimeter="yes"
6461 if test "x$have_thread_info" = "xyes"; then
6462 plugin_processes="yes"
6465 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"; then
6466 plugin_processes="yes"
6469 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_openbsd" = "xyes"; then
6470 plugin_processes="yes"
6473 if test "x$with_libpython" != "xno"; then
6477 if test "x$with_libatasmart" = "xyes" && test "x$with_libudev" = "xyes"; then
6481 if test "x$with_kvm_getswapinfo" = "xyes"; then
6485 if test "x$have_swapctl" = "xyes" && test "x$c_cv_have_swapctl_two_args" = "xyes"; then
6489 if test "x$have_swapctl" = "xyes" && test "x$c_cv_have_swapctl_three_args" = "xyes"; then
6493 if test "x$with_kvm_openfiles = "xyes" && $with_kvm_nlist" = "xyes"; then
6494 plugin_tcpconns="yes"
6497 if test "x$have_getutent" = "xyes"; then
6501 if test "x$have_getutxent" = "xyes"; then
6505 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"; then
6509 if test "x$with_libxenctrl" = "xyes"; then
6513 if test "x$with_libdpdk" = "xyes"; then
6514 plugin_dpdkevents="$dpdk_keepalive"
6515 plugin_dpdkstat="yes"
6518 m4_divert_once([HELP_ENABLE], [
6521 AC_ARG_ENABLE([all-plugins],
6522 [AS_HELP_STRING([--enable-all-plugins], [enable all plugins @<:@default=yes@:>@])],
6524 if test "x$enableval" = "xyes"; then
6525 enable_all_plugins="yes"
6526 else if test "x$enableval" = "xauto"; then
6527 enable_all_plugins="auto"
6529 enable_all_plugins="no"
6532 [enable_all_plugins="auto"]
6535 m4_divert_once([HELP_ENABLE], [])
6537 AC_PLUGIN([aggregation], [yes], [Aggregation plugin])
6538 AC_PLUGIN([amqp], [$with_librabbitmq], [AMQP output plugin])
6539 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
6540 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
6541 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple hardware sensors])
6542 AC_PLUGIN([aquaero], [$with_libaquaero5], [Aquaero hardware sensors])
6543 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
6544 AC_PLUGIN([barometer], [$plugin_barometer], [Barometer sensor on I2C])
6545 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
6546 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
6547 AC_PLUGIN([ceph], [$plugin_ceph], [Ceph daemon statistics])
6548 AC_PLUGIN([cgroups], [$plugin_cgroups], [CGroups CPU usage accounting])
6549 AC_PLUGIN([chrony], [yes], [Chrony statistics])
6550 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
6551 AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
6552 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
6553 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
6554 AC_PLUGIN([cpusleep], [$plugin_cpusleep], [CPU sleep statistics])
6555 AC_PLUGIN([csv], [yes], [CSV output plugin])
6556 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
6557 AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics])
6558 AC_PLUGIN([curl_xml], [$plugin_curl_xml], [CURL generic xml statistics])
6559 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
6560 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
6561 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
6562 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
6563 AC_PLUGIN([dpdkevents], [$plugin_dpdkevents], [Events from DPDK])
6564 AC_PLUGIN([dpdkstat], [$plugin_dpdkstat], [Stats from DPDK])
6565 AC_PLUGIN([drbd], [$plugin_drbd], [DRBD statistics])
6566 AC_PLUGIN([email], [yes], [EMail statistics])
6567 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
6568 AC_PLUGIN([ethstat], [$plugin_ethstat], [Stats from NIC driver])
6569 AC_PLUGIN([exec], [yes], [Execution of external programs])
6570 AC_PLUGIN([fhcount], [$plugin_fhcount], [File handles statistics])
6571 AC_PLUGIN([filecount], [yes], [Count files in directories])
6572 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
6573 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
6574 AC_PLUGIN([gps], [$plugin_gps], [GPS plugin])
6575 AC_PLUGIN([grpc], [$plugin_grpc], [gRPC plugin])
6576 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
6577 AC_PLUGIN([hugepages], [$plugin_hugepages], [Hugepages statistics])
6578 AC_PLUGIN([intel_pmu], [$with_libjevents], [Intel performance monitor plugin])
6579 AC_PLUGIN([intel_rdt], [$with_libpqos], [Intel RDT monitor plugin])
6580 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
6581 AC_PLUGIN([ipc], [$plugin_ipc], [IPC statistics])
6582 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
6583 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
6584 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
6585 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
6586 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
6587 AC_PLUGIN([load], [$plugin_load], [System load])
6588 AC_PLUGIN([log_logstash], [$plugin_log_logstash], [Logstash json_event compatible logging])
6589 AC_PLUGIN([logfile], [yes], [File logging plugin])
6590 AC_PLUGIN([lpar], [$with_perfstat], [AIX logical partitions statistics])
6591 AC_PLUGIN([lua], [$with_liblua], [Lua plugin])
6592 AC_PLUGIN([lvm], [$with_liblvm2app], [LVM statistics])
6593 AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
6594 AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
6595 AC_PLUGIN([match_hashed], [yes], [The hashed match])
6596 AC_PLUGIN([match_regex], [yes], [The regex match])
6597 AC_PLUGIN([match_timediff], [yes], [The timediff match])
6598 AC_PLUGIN([match_value], [yes], [The value match])
6599 AC_PLUGIN([mbmon], [yes], [Query mbmond])
6600 AC_PLUGIN([mcelog], [$plugin_mcelog], [Machine Check Exceptions notifications])
6601 AC_PLUGIN([md], [$have_linux_raid_md_u_h], [md (Linux software RAID) devices])
6602 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
6603 AC_PLUGIN([memcached], [yes], [memcached statistics])
6604 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
6605 AC_PLUGIN([mic], [$with_mic], [Intel Many Integrated Core stats])
6606 AC_PLUGIN([modbus], [$with_libmodbus], [Modbus plugin])
6607 AC_PLUGIN([mqtt], [$with_libmosquitto], [MQTT output plugin])
6608 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
6609 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
6610 AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
6611 AC_PLUGIN([netlink], [$with_libmnl], [Enhanced Linux network statistics])
6612 AC_PLUGIN([network], [yes], [Network communication plugin])
6613 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
6614 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
6615 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
6616 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
6617 AC_PLUGIN([notify_nagios], [yes], [Nagios notification plugin])
6618 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
6619 AC_PLUGIN([numa], [$plugin_numa], [NUMA virtual memory statistics])
6620 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
6621 AC_PLUGIN([olsrd], [yes], [olsrd statistics])
6622 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
6623 AC_PLUGIN([openldap], [$with_libldap], [OpenLDAP statistics])
6624 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
6625 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
6626 AC_PLUGIN([ovs_events], [$plugin_ovs_events], [OVS events plugin])
6627 AC_PLUGIN([ovs_stats], [$plugin_ovs_stats], [OVS statistics plugin])
6628 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
6629 AC_PLUGIN([pf], [$have_net_pfvar_h], [BSD packet filter (PF) statistics])
6630 # FIXME: Check for libevent, too.
6631 AC_PLUGIN([pinba], [$plugin_pinba], [Pinba statistics])
6632 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
6633 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
6634 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
6635 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
6636 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
6637 AC_PLUGIN([python], [$plugin_python], [Embed a Python interpreter])
6638 AC_PLUGIN([redis], [$with_libhiredis], [Redis plugin])
6639 AC_PLUGIN([routeros], [$with_librouteros], [RouterOS plugin])
6640 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
6641 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
6642 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
6643 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
6644 AC_PLUGIN([sigrok], [$with_libsigrok], [sigrok acquisition sources])
6645 AC_PLUGIN([smart], [$plugin_smart], [SMART statistics])
6646 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
6647 AC_PLUGIN([snmp_agent], [$with_libnetsnmpagent], [SNMP agent plugin])
6648 AC_PLUGIN([statsd], [yes], [StatsD plugin])
6649 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
6650 AC_PLUGIN([synproxy], [$plugin_synproxy], [Synproxy stats plugin])
6651 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
6652 AC_PLUGIN([table], [yes], [Parsing of tabular data])
6653 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
6654 AC_PLUGIN([tail_csv], [yes], [Parsing of CSV files])
6655 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
6656 AC_PLUGIN([target_notification], [yes], [The notification target])
6657 AC_PLUGIN([target_replace], [yes], [The replace target])
6658 AC_PLUGIN([target_scale], [yes], [The scale target])
6659 AC_PLUGIN([target_set], [yes], [The set target])
6660 AC_PLUGIN([target_v5upgrade], [yes], [The v5upgrade target])
6661 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
6662 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
6663 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
6664 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
6665 AC_PLUGIN([threshold], [yes], [Threshold checking plugin])
6666 AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics])
6667 AC_PLUGIN([turbostat], [$plugin_turbostat], [Advanced statistic on Intel cpu states])
6668 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
6669 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
6670 AC_PLUGIN([users], [$plugin_users], [User statistics])
6671 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
6672 AC_PLUGIN([varnish], [$with_libvarnish], [Varnish cache statistics])
6673 AC_PLUGIN([virt], [$plugin_virt], [Virtual machine statistics])
6674 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
6675 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
6676 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
6677 AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin])
6678 AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
6679 AC_PLUGIN([write_kafka], [$with_librdkafka], [Kafka output plugin])
6680 AC_PLUGIN([write_log], [yes], [Log output plugin])
6681 AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin])
6682 AC_PLUGIN([write_prometheus], [$plugin_write_prometheus], [Prometheus write plugin])
6683 AC_PLUGIN([write_redis], [$with_libhiredis], [Redis output plugin])
6684 AC_PLUGIN([write_riemann], [$with_libriemann_client], [Riemann output plugin])
6685 AC_PLUGIN([write_sensu], [yes], [Sensu output plugin])
6686 AC_PLUGIN([write_tsdb], [yes], [TSDB output plugin])
6687 AC_PLUGIN([xencpu], [$plugin_xencpu], [Xen Host CPU usage])
6688 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
6689 AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
6690 AC_PLUGIN([zone], [$plugin_zone], [Solaris container statistics])
6691 AC_PLUGIN([zookeeper], [yes], [Zookeeper statistics])
6693 dnl Default configuration file
6694 # Load either syslog or logfile
6695 LOAD_PLUGIN_SYSLOG=""
6696 LOAD_PLUGIN_LOGFILE=""
6697 LOAD_PLUGIN_LOG_LOGSTASH=""
6699 AC_MSG_CHECKING([which default log plugin to load])
6700 default_log_plugin="none"
6701 if test "x$enable_syslog" = "xyes"; then
6702 default_log_plugin="syslog"
6704 LOAD_PLUGIN_SYSLOG="##"
6707 if test "x$enable_logfile" = "xyes"; then
6708 if test "x$default_log_plugin" = "xnone"; then
6709 default_log_plugin="logfile"
6711 LOAD_PLUGIN_LOGFILE="#"
6714 LOAD_PLUGIN_LOGFILE="##"
6717 if test "x$enable_log_logstash" = "xyes"; then
6718 LOAD_PLUGIN_LOG_LOGSTASH="#"
6720 LOAD_PLUGIN_LOG_LOGSTASH="##"
6723 AC_MSG_RESULT([$default_log_plugin])
6725 AC_SUBST([LOAD_PLUGIN_SYSLOG])
6726 AC_SUBST([LOAD_PLUGIN_LOGFILE])
6727 AC_SUBST([LOAD_PLUGIN_LOG_LOGSTASH])
6729 if test "x$enable_debug" = "xyes"; then
6730 DEFAULT_LOG_LEVEL="debug"
6732 DEFAULT_LOG_LEVEL="info"
6734 AC_SUBST([DEFAULT_LOG_LEVEL])
6736 # Load only one of rrdtool, network, csv in the default config.
6737 LOAD_PLUGIN_RRDTOOL=""
6738 LOAD_PLUGIN_NETWORK=""
6741 AC_MSG_CHECKING([which default write plugin to load])
6742 default_write_plugin="none"
6743 if test "x$enable_rrdtool" = "xyes"; then
6744 default_write_plugin="rrdtool"
6746 LOAD_PLUGIN_RRDTOOL="##"
6749 if test "x$enable_network" = "xyes"; then
6750 if test "x$default_write_plugin" = "xnone"; then
6751 default_write_plugin="network"
6753 LOAD_PLUGIN_NETWORK="#"
6756 LOAD_PLUGIN_NETWORK="##"
6759 if test "x$enable_csv" = "xyes"; then
6760 if test "x$default_write_plugin" = "xnone"; then
6761 default_write_plugin="csv"
6766 LOAD_PLUGIN_CSV="##"
6768 AC_MSG_RESULT([$default_write_plugin])
6770 AC_SUBST([LOAD_PLUGIN_RRDTOOL])
6771 AC_SUBST([LOAD_PLUGIN_NETWORK])
6772 AC_SUBST([LOAD_PLUGIN_CSV])
6775 PERL_BINDINGS_OPTIONS="PREFIX=${prefix}"
6776 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
6778 if test "x$withval" != "xno" && test "x$withval" != "xyes"; then
6779 PERL_BINDINGS_OPTIONS="$withval"
6780 with_perl_bindings="yes"
6782 with_perl_bindings="$withval"
6786 if test "x$PERL" != "x"; then
6787 with_perl_bindings="yes"
6789 with_perl_bindings="no (no perl interpreter found)"
6793 if test "x$with_perl_bindings" = "xyes"; then
6794 AC_MSG_CHECKING([for the ExtUtils::MakeMaker module])
6795 if $PERL -MExtUtils::MakeMaker -e '' 2>/dev/null; then
6796 AC_MSG_RESULT([yes])
6799 with_perl_bindings="no (ExtUtils::MakeMaker not found)"
6803 if test "x$with_perl_bindings" = "xyes"; then
6804 PERL_BINDINGS="perl"
6809 AC_SUBST([PERL_BINDINGS])
6810 AC_SUBST([PERL_BINDINGS_OPTIONS])
6812 dnl libcollectdclient
6813 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
6814 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
6815 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
6817 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
6819 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
6821 AC_SUBST([LCC_VERSION_MAJOR])
6822 AC_SUBST([LCC_VERSION_MINOR])
6823 AC_SUBST([LCC_VERSION_PATCH])
6824 AC_SUBST([LCC_VERSION_EXTRA])
6825 AC_SUBST([LCC_VERSION_STRING])
6827 AC_CONFIG_FILES([src/libcollectdclient/collectd/lcc_features.h])
6831 if test "x$enable_werror" != "xno"; then
6832 AM_CFLAGS="$AM_CFLAGS -Werror"
6833 AM_CXXFLAGS="$AM_CXXFLAGS -Werror"
6836 AC_SUBST([AM_CFLAGS])
6837 AC_SUBST([AM_CXXFLAGS])
6842 src/libcollectdclient/libcollectdclient.pc \
6847 if test "x$with_librrd" = "xyes" && test "x$librrd_threadsafe" != "xyes"; then
6848 with_librrd="yes (warning: librrd is not thread-safe)"
6851 if test "x$with_libperl" = "xyes"; then
6852 with_libperl="yes (version `$PERL -MConfig -e 'print $Config{version};'`)"
6854 enable_perl="no (needs libperl)"
6857 if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"; then
6858 enable_perl="no (libperl doesn't support ithreads)"
6861 if test "x$with_perl_bindings" = "xyes" && test "x$PERL_BINDINGS_OPTIONS" != "x"; then
6862 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
6866 AC_MSG_RESULT([Configuration:])
6867 AC_MSG_RESULT([ Build:])
6868 AC_MSG_RESULT([ Platform . . . . . . $ac_system])
6869 AC_MSG_RESULT([ Compiler vendor . . . $ax_cv_c_compiler_vendor])
6870 AC_MSG_RESULT([ CC . . . . . . . . . $CC])
6871 AC_MSG_RESULT([ CFLAGS . . . . . . . $AM_CFLAGS $CFLAGS])
6872 AC_MSG_RESULT([ CXXFLAGS . . . . . . $AM_CXXFLAGS $CXXFLAGS])
6873 AC_MSG_RESULT([ CPP . . . . . . . . . $CPP])
6874 AC_MSG_RESULT([ CPPFLAGS . . . . . . $CPPFLAGS])
6875 AC_MSG_RESULT([ GRPC_CPP_PLUGIN . . . $GRPC_CPP_PLUGIN])
6876 AC_MSG_RESULT([ LD . . . . . . . . . $LD])
6877 AC_MSG_RESULT([ LDFLAGS . . . . . . . $LDFLAGS])
6878 AC_MSG_RESULT([ PROTOC . . . . . . . $PROTOC])
6879 AC_MSG_RESULT([ YACC . . . . . . . . $YACC])
6880 AC_MSG_RESULT([ YFLAGS . . . . . . . $YFLAGS])
6882 AC_MSG_RESULT([ Libraries:])
6883 AC_MSG_RESULT([ intel mic . . . . . . $with_mic])
6884 AC_MSG_RESULT([ libaquaero5 . . . . . $with_libaquaero5])
6885 AC_MSG_RESULT([ libatasmart . . . . . $with_libatasmart])
6886 AC_MSG_RESULT([ libcurl . . . . . . . $with_libcurl])
6887 AC_MSG_RESULT([ libdbi . . . . . . . $with_libdbi])
6888 AC_MSG_RESULT([ libdpdk . . . . . . . $with_libdpdk])
6889 AC_MSG_RESULT([ libesmtp . . . . . . $with_libesmtp])
6890 AC_MSG_RESULT([ libganglia . . . . . $with_libganglia])
6891 AC_MSG_RESULT([ libgcrypt . . . . . . $with_libgcrypt])
6892 AC_MSG_RESULT([ libgps . . . . . . . $with_libgps])
6893 AC_MSG_RESULT([ libgrpc++ . . . . . . $with_libgrpcpp])
6894 AC_MSG_RESULT([ libhiredis . . . . . $with_libhiredis])
6895 AC_MSG_RESULT([ libi2c-dev . . . . . $with_libi2c])
6896 AC_MSG_RESULT([ libiokit . . . . . . $with_libiokit])
6897 AC_MSG_RESULT([ libiptc . . . . . . . $with_libiptc])
6898 AC_MSG_RESULT([ libjevents . . . . . $with_libjevents])
6899 AC_MSG_RESULT([ libjvm . . . . . . . $with_java])
6900 AC_MSG_RESULT([ libkstat . . . . . . $with_kstat])
6901 AC_MSG_RESULT([ libkvm . . . . . . . $with_libkvm])
6902 AC_MSG_RESULT([ libldap . . . . . . . $with_libldap])
6903 AC_MSG_RESULT([ liblua . . . . . . . $with_liblua])
6904 AC_MSG_RESULT([ liblvm2app . . . . . $with_liblvm2app])
6905 AC_MSG_RESULT([ libmemcached . . . . $with_libmemcached])
6906 AC_MSG_RESULT([ libmicrohttpd . . . . $with_libmicrohttpd])
6907 AC_MSG_RESULT([ libmnl . . . . . . . $with_libmnl])
6908 AC_MSG_RESULT([ libmodbus . . . . . . $with_libmodbus])
6909 AC_MSG_RESULT([ libmongoc . . . . . . $with_libmongoc])
6910 AC_MSG_RESULT([ libmosquitto . . . . $with_libmosquitto])
6911 AC_MSG_RESULT([ libmysql . . . . . . $with_libmysql])
6912 AC_MSG_RESULT([ libnetapp . . . . . . $with_libnetapp])
6913 AC_MSG_RESULT([ libnetsnmp . . . . . $with_libnetsnmp])
6914 AC_MSG_RESULT([ libnetsnmpagent . . . $with_libnetsnmpagent])
6915 AC_MSG_RESULT([ libnotify . . . . . . $with_libnotify])
6916 AC_MSG_RESULT([ libopenipmi . . . . . $with_libopenipmipthread])
6917 AC_MSG_RESULT([ liboping . . . . . . $with_liboping])
6918 AC_MSG_RESULT([ libowcapi . . . . . . $with_libowcapi])
6919 AC_MSG_RESULT([ libpcap . . . . . . . $with_libpcap])
6920 AC_MSG_RESULT([ libperfstat . . . . . $with_perfstat])
6921 AC_MSG_RESULT([ libperl . . . . . . . $with_libperl])
6922 AC_MSG_RESULT([ libpq . . . . . . . . $with_libpq])
6923 AC_MSG_RESULT([ libpqos . . . . . . . $with_libpqos])
6924 AC_MSG_RESULT([ libprotobuf . . . . . $with_libprotobuf])
6925 AC_MSG_RESULT([ libprotobuf-c . . . . $with_libprotobuf_c])
6926 AC_MSG_RESULT([ libpython . . . . . . $with_libpython])
6927 AC_MSG_RESULT([ librabbitmq . . . . . $with_librabbitmq])
6928 AC_MSG_RESULT([ libriemann-client . . $with_libriemann_client])
6929 AC_MSG_RESULT([ librdkafka . . . . . $with_librdkafka])
6930 AC_MSG_RESULT([ librouteros . . . . . $with_librouteros])
6931 AC_MSG_RESULT([ librrd . . . . . . . $with_librrd])
6932 AC_MSG_RESULT([ libsensors . . . . . $with_libsensors])
6933 AC_MSG_RESULT([ libsigrok . . . . . $with_libsigrok])
6934 AC_MSG_RESULT([ libstatgrab . . . . . $with_libstatgrab])
6935 AC_MSG_RESULT([ libtokyotyrant . . . $with_libtokyotyrant])
6936 AC_MSG_RESULT([ libudev . . . . . . . $with_libudev])
6937 AC_MSG_RESULT([ libupsclient . . . . $with_libupsclient])
6938 AC_MSG_RESULT([ libvarnish . . . . . $with_libvarnish])
6939 AC_MSG_RESULT([ libvirt . . . . . . . $with_libvirt])
6940 AC_MSG_RESULT([ libxenctrl . . . . . $with_libxenctrl])
6941 AC_MSG_RESULT([ libxml2 . . . . . . . $with_libxml2])
6942 AC_MSG_RESULT([ libxmms . . . . . . . $with_libxmms])
6943 AC_MSG_RESULT([ libyajl . . . . . . . $with_libyajl])
6944 AC_MSG_RESULT([ oracle . . . . . . . $with_oracle])
6945 AC_MSG_RESULT([ protobuf-c . . . . . $have_protoc_c])
6946 AC_MSG_RESULT([ protoc 3 . . . . . . $have_protoc3])
6948 AC_MSG_RESULT([ Features:])
6949 AC_MSG_RESULT([ daemon mode . . . . . $enable_daemon])
6950 AC_MSG_RESULT([ debug . . . . . . . . $enable_debug])
6952 AC_MSG_RESULT([ Bindings:])
6953 AC_MSG_RESULT([ perl . . . . . . . . $with_perl_bindings])
6955 AC_MSG_RESULT([ Modules:])
6956 AC_MSG_RESULT([ aggregation . . . . . $enable_aggregation])
6957 AC_MSG_RESULT([ amqp . . . . . . . $enable_amqp])
6958 AC_MSG_RESULT([ apache . . . . . . . $enable_apache])
6959 AC_MSG_RESULT([ apcups . . . . . . . $enable_apcups])
6960 AC_MSG_RESULT([ apple_sensors . . . . $enable_apple_sensors])
6961 AC_MSG_RESULT([ aquaero . . . . . . . $enable_aquaero])
6962 AC_MSG_RESULT([ ascent . . . . . . . $enable_ascent])
6963 AC_MSG_RESULT([ barometer . . . . . . $enable_barometer])
6964 AC_MSG_RESULT([ battery . . . . . . . $enable_battery])
6965 AC_MSG_RESULT([ bind . . . . . . . . $enable_bind])
6966 AC_MSG_RESULT([ ceph . . . . . . . . $enable_ceph])
6967 AC_MSG_RESULT([ cgroups . . . . . . . $enable_cgroups])
6968 AC_MSG_RESULT([ chrony. . . . . . . . $enable_chrony])
6969 AC_MSG_RESULT([ conntrack . . . . . . $enable_conntrack])
6970 AC_MSG_RESULT([ contextswitch . . . . $enable_contextswitch])
6971 AC_MSG_RESULT([ cpu . . . . . . . . . $enable_cpu])
6972 AC_MSG_RESULT([ cpufreq . . . . . . . $enable_cpufreq])
6973 AC_MSG_RESULT([ cpusleep . . . . . . $enable_cpusleep])
6974 AC_MSG_RESULT([ csv . . . . . . . . . $enable_csv])
6975 AC_MSG_RESULT([ curl . . . . . . . . $enable_curl])
6976 AC_MSG_RESULT([ curl_json . . . . . . $enable_curl_json])
6977 AC_MSG_RESULT([ curl_xml . . . . . . $enable_curl_xml])
6978 AC_MSG_RESULT([ dbi . . . . . . . . . $enable_dbi])
6979 AC_MSG_RESULT([ df . . . . . . . . . $enable_df])
6980 AC_MSG_RESULT([ disk . . . . . . . . $enable_disk])
6981 AC_MSG_RESULT([ dns . . . . . . . . . $enable_dns])
6982 AC_MSG_RESULT([ dpdkevents. . . . . . $enable_dpdkevents])
6983 AC_MSG_RESULT([ dpdkstat . . . . . . $enable_dpdkstat])
6984 AC_MSG_RESULT([ drbd . . . . . . . . $enable_drbd])
6985 AC_MSG_RESULT([ email . . . . . . . . $enable_email])
6986 AC_MSG_RESULT([ entropy . . . . . . . $enable_entropy])
6987 AC_MSG_RESULT([ ethstat . . . . . . . $enable_ethstat])
6988 AC_MSG_RESULT([ exec . . . . . . . . $enable_exec])
6989 AC_MSG_RESULT([ fhcount . . . . . . . $enable_fhcount])
6990 AC_MSG_RESULT([ filecount . . . . . . $enable_filecount])
6991 AC_MSG_RESULT([ fscache . . . . . . . $enable_fscache])
6992 AC_MSG_RESULT([ gmond . . . . . . . . $enable_gmond])
6993 AC_MSG_RESULT([ gps . . . . . . . . . $enable_gps])
6994 AC_MSG_RESULT([ grpc . . . . . . . . $enable_grpc])
6995 AC_MSG_RESULT([ hddtemp . . . . . . . $enable_hddtemp])
6996 AC_MSG_RESULT([ hugepages . . . . . . $enable_hugepages])
6997 AC_MSG_RESULT([ intel_pmu . . . . . . $enable_intel_pmu])
6998 AC_MSG_RESULT([ intel_rdt . . . . . . $enable_intel_rdt])
6999 AC_MSG_RESULT([ interface . . . . . . $enable_interface])
7000 AC_MSG_RESULT([ ipc . . . . . . . . . $enable_ipc])
7001 AC_MSG_RESULT([ ipmi . . . . . . . . $enable_ipmi])
7002 AC_MSG_RESULT([ iptables . . . . . . $enable_iptables])
7003 AC_MSG_RESULT([ ipvs . . . . . . . . $enable_ipvs])
7004 AC_MSG_RESULT([ irq . . . . . . . . . $enable_irq])
7005 AC_MSG_RESULT([ java . . . . . . . . $enable_java])
7006 AC_MSG_RESULT([ load . . . . . . . . $enable_load])
7007 AC_MSG_RESULT([ logfile . . . . . . . $enable_logfile])
7008 AC_MSG_RESULT([ log_logstash . . . . $enable_log_logstash])
7009 AC_MSG_RESULT([ lpar . . . . . . . . $enable_lpar])
7010 AC_MSG_RESULT([ lua . . . . . . . . . $enable_lua])
7011 AC_MSG_RESULT([ lvm . . . . . . . . . $enable_lvm])
7012 AC_MSG_RESULT([ madwifi . . . . . . . $enable_madwifi])
7013 AC_MSG_RESULT([ match_empty_counter . $enable_match_empty_counter])
7014 AC_MSG_RESULT([ match_hashed . . . . $enable_match_hashed])
7015 AC_MSG_RESULT([ match_regex . . . . . $enable_match_regex])
7016 AC_MSG_RESULT([ match_timediff . . . $enable_match_timediff])
7017 AC_MSG_RESULT([ match_value . . . . . $enable_match_value])
7018 AC_MSG_RESULT([ mbmon . . . . . . . . $enable_mbmon])
7019 AC_MSG_RESULT([ mcelog . . . . . . . $enable_mcelog])
7020 AC_MSG_RESULT([ md . . . . . . . . . $enable_md])
7021 AC_MSG_RESULT([ memcachec . . . . . . $enable_memcachec])
7022 AC_MSG_RESULT([ memcached . . . . . . $enable_memcached])
7023 AC_MSG_RESULT([ memory . . . . . . . $enable_memory])
7024 AC_MSG_RESULT([ mic . . . . . . . . . $enable_mic])
7025 AC_MSG_RESULT([ modbus . . . . . . . $enable_modbus])
7026 AC_MSG_RESULT([ mqtt . . . . . . . . $enable_mqtt])
7027 AC_MSG_RESULT([ multimeter . . . . . $enable_multimeter])
7028 AC_MSG_RESULT([ mysql . . . . . . . . $enable_mysql])
7029 AC_MSG_RESULT([ netapp . . . . . . . $enable_netapp])
7030 AC_MSG_RESULT([ netlink . . . . . . . $enable_netlink])
7031 AC_MSG_RESULT([ network . . . . . . . $enable_network])
7032 AC_MSG_RESULT([ nfs . . . . . . . . . $enable_nfs])
7033 AC_MSG_RESULT([ nginx . . . . . . . . $enable_nginx])
7034 AC_MSG_RESULT([ notify_desktop . . . $enable_notify_desktop])
7035 AC_MSG_RESULT([ notify_email . . . . $enable_notify_email])
7036 AC_MSG_RESULT([ notify_nagios . . . . $enable_notify_nagios])
7037 AC_MSG_RESULT([ ntpd . . . . . . . . $enable_ntpd])
7038 AC_MSG_RESULT([ numa . . . . . . . . $enable_numa])
7039 AC_MSG_RESULT([ nut . . . . . . . . . $enable_nut])
7040 AC_MSG_RESULT([ olsrd . . . . . . . . $enable_olsrd])
7041 AC_MSG_RESULT([ onewire . . . . . . . $enable_onewire])
7042 AC_MSG_RESULT([ openldap . . . . . . $enable_openldap])
7043 AC_MSG_RESULT([ openvpn . . . . . . . $enable_openvpn])
7044 AC_MSG_RESULT([ oracle . . . . . . . $enable_oracle])
7045 AC_MSG_RESULT([ ovs_events . . . . . $enable_ovs_events])
7046 AC_MSG_RESULT([ ovs_stats . . . . . . $enable_ovs_stats])
7047 AC_MSG_RESULT([ perl . . . . . . . . $enable_perl])
7048 AC_MSG_RESULT([ pf . . . . . . . . . $enable_pf])
7049 AC_MSG_RESULT([ pinba . . . . . . . . $enable_pinba])
7050 AC_MSG_RESULT([ ping . . . . . . . . $enable_ping])
7051 AC_MSG_RESULT([ postgresql . . . . . $enable_postgresql])
7052 AC_MSG_RESULT([ powerdns . . . . . . $enable_powerdns])
7053 AC_MSG_RESULT([ processes . . . . . . $enable_processes])
7054 AC_MSG_RESULT([ protocols . . . . . . $enable_protocols])
7055 AC_MSG_RESULT([ python . . . . . . . $enable_python])
7056 AC_MSG_RESULT([ redis . . . . . . . . $enable_redis])
7057 AC_MSG_RESULT([ routeros . . . . . . $enable_routeros])
7058 AC_MSG_RESULT([ rrdcached . . . . . . $enable_rrdcached])
7059 AC_MSG_RESULT([ rrdtool . . . . . . . $enable_rrdtool])
7060 AC_MSG_RESULT([ sensors . . . . . . . $enable_sensors])
7061 AC_MSG_RESULT([ serial . . . . . . . $enable_serial])
7062 AC_MSG_RESULT([ sigrok . . . . . . . $enable_sigrok])
7063 AC_MSG_RESULT([ smart . . . . . . . . $enable_smart])
7064 AC_MSG_RESULT([ snmp . . . . . . . . $enable_snmp])
7065 AC_MSG_RESULT([ snmp_agent . . . . . $enable_snmp_agent])
7066 AC_MSG_RESULT([ statsd . . . . . . . $enable_statsd])
7067 AC_MSG_RESULT([ swap . . . . . . . . $enable_swap])
7068 AC_MSG_RESULT([ synproxy . . . . . . $enable_synproxy])
7069 AC_MSG_RESULT([ syslog . . . . . . . $enable_syslog])
7070 AC_MSG_RESULT([ table . . . . . . . . $enable_table])
7071 AC_MSG_RESULT([ tail_csv . . . . . . $enable_tail_csv])
7072 AC_MSG_RESULT([ tail . . . . . . . . $enable_tail])
7073 AC_MSG_RESULT([ tape . . . . . . . . $enable_tape])
7074 AC_MSG_RESULT([ target_notification . $enable_target_notification])
7075 AC_MSG_RESULT([ target_replace . . . $enable_target_replace])
7076 AC_MSG_RESULT([ target_scale . . . . $enable_target_scale])
7077 AC_MSG_RESULT([ target_set . . . . . $enable_target_set])
7078 AC_MSG_RESULT([ target_v5upgrade . . $enable_target_v5upgrade])
7079 AC_MSG_RESULT([ tcpconns . . . . . . $enable_tcpconns])
7080 AC_MSG_RESULT([ teamspeak2 . . . . . $enable_teamspeak2])
7081 AC_MSG_RESULT([ ted . . . . . . . . . $enable_ted])
7082 AC_MSG_RESULT([ thermal . . . . . . . $enable_thermal])
7083 AC_MSG_RESULT([ threshold . . . . . . $enable_threshold])
7084 AC_MSG_RESULT([ tokyotyrant . . . . . $enable_tokyotyrant])
7085 AC_MSG_RESULT([ turbostat . . . . . . $enable_turbostat])
7086 AC_MSG_RESULT([ unixsock . . . . . . $enable_unixsock])
7087 AC_MSG_RESULT([ uptime . . . . . . . $enable_uptime])
7088 AC_MSG_RESULT([ users . . . . . . . . $enable_users])
7089 AC_MSG_RESULT([ uuid . . . . . . . . $enable_uuid])
7090 AC_MSG_RESULT([ varnish . . . . . . . $enable_varnish])
7091 AC_MSG_RESULT([ virt . . . . . . . . $enable_virt])
7092 AC_MSG_RESULT([ vmem . . . . . . . . $enable_vmem])
7093 AC_MSG_RESULT([ vserver . . . . . . . $enable_vserver])
7094 AC_MSG_RESULT([ wireless . . . . . . $enable_wireless])
7095 AC_MSG_RESULT([ write_graphite . . . $enable_write_graphite])
7096 AC_MSG_RESULT([ write_http . . . . . $enable_write_http])
7097 AC_MSG_RESULT([ write_kafka . . . . . $enable_write_kafka])
7098 AC_MSG_RESULT([ write_log . . . . . . $enable_write_log])
7099 AC_MSG_RESULT([ write_mongodb . . . . $enable_write_mongodb])
7100 AC_MSG_RESULT([ write_prometheus. . . $enable_write_prometheus])
7101 AC_MSG_RESULT([ write_redis . . . . . $enable_write_redis])
7102 AC_MSG_RESULT([ write_riemann . . . . $enable_write_riemann])
7103 AC_MSG_RESULT([ write_sensu . . . . . $enable_write_sensu])
7104 AC_MSG_RESULT([ write_tsdb . . . . . $enable_write_tsdb])
7105 AC_MSG_RESULT([ xencpu . . . . . . . $enable_xencpu])
7106 AC_MSG_RESULT([ xmms . . . . . . . . $enable_xmms])
7107 AC_MSG_RESULT([ zfs_arc . . . . . . . $enable_zfs_arc])
7108 AC_MSG_RESULT([ zone . . . . . . . . $enable_zone])
7109 AC_MSG_RESULT([ zookeeper . . . . . . $enable_zookeeper])
7112 if test "x$dependency_error" = "xyes"; then
7113 AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
7116 if test "x$dependency_warning" = "xyes"; then
7117 AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
7120 # vim: set fdm=marker sw=2 sts=2 ts=2 et :