1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT([collectd],[m4_esyscmd(./version-gen.sh)])
3 AC_CONFIG_SRCDIR(src/collectd.c)
4 AC_CONFIG_HEADERS(src/config.h)
5 AC_CONFIG_AUX_DIR([libltdl/config])
7 dnl older automake's default of ARFLAGS=cru is noisy on newer binutils;
8 dnl we don't really need the 'u' even in older toolchains. Then there is
9 dnl older libtool, which spelled it AR_FLAGS
10 m4_divert_text([DEFAULTS], [: "${ARFLAGS=cr} ${AR_FLAGS=cr}"])
12 m4_ifdef([LT_PACKAGE_VERSION],
15 LT_CONFIG_LTDL_DIR([libltdl])
17 LTDL_INIT([convenience])
18 AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
23 AC_LIBLTDL_CONVENIENCE
27 AC_CONFIG_SUBDIRS(libltdl)
28 AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
32 AM_CONDITIONAL([BUILD_INCLUDED_LTDL], [test "x$LTDLDEPS" != "x"])
34 AM_INIT_AUTOMAKE([tar-pax dist-bzip2 foreign])
35 m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
38 AC_PREFIX_DEFAULT("/opt/collectd")
43 # Checks for programs.
52 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
59 # Warn when pkg.m4 is missing
60 m4_pattern_forbid([^_?PKG_[A-Z_]+$],[*** pkg.m4 missing, please install pkg-config])
64 AC_CACHE_CHECK([if bison is the parser generator],
65 [collectd_cv_prog_bison],
66 [AS_IF([$YACC --version 2>/dev/null | $EGREP -q '^bison '],
67 [collectd_cv_prog_bison=yes], [collectd_cv_prog_bison=no]
71 if test "x$collectd_cv_prog_bison" = "xno" && test ! -f "${srcdir}/src/liboconfig/parser.c"
73 AC_MSG_ERROR([bison is missing and you do not have ${srcdir}/src/liboconfig/parser.c. Please install bison])
76 AC_CHECK_PROG([have_protoc_c], [protoc-c], [yes], [no])
77 if test "x$have_protoc_c" = "xno"
79 have_protoc_c="no (protoc-c compiler not found)"
82 if test "x$have_protoc_c" = "xyes"
84 AC_CHECK_HEADERS([protobuf-c/protobuf-c.h google/protobuf-c/protobuf-c.h],
85 [have_protoc_c="yes"; break],
86 [have_protoc_c="no (<google/protobuf-c/protobuf-c.h> not found)"])
88 if test "x$have_protoc_c" = "xyes"
90 AC_CHECK_LIB([protobuf-c], [protobuf_c_message_pack],
91 [have_protoc_c="yes"],
92 [have_protoc_c="no (libprotobuf-c not found)"])
95 AM_CONDITIONAL(HAVE_PROTOC_C, test "x$have_protoc_c" = "xyes")
97 AC_MSG_CHECKING([for kernel type ($host_os)])
100 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
104 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
114 AC_DEFINE([KERNEL_AIX], 1, [True if program is to be compiled for a AIX kernel])
118 AC_DEFINE([KERNEL_FREEBSD], 1, [True if program is to be compiled for a FreeBSD kernel])
124 AC_MSG_RESULT([$ac_system])
126 if test "x$ac_system" = "xLinux"
128 AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
129 if test -z "$KERNEL_DIR"
131 KERNEL_DIR="/lib/modules/`uname -r`/source"
134 KERNEL_CFLAGS="-I$KERNEL_DIR/include"
135 AC_SUBST(KERNEL_CFLAGS)
138 if test "x$ac_system" = "xSolaris"
140 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to enforce POSIX thread semantics under Solaris.])
141 AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.])
143 if test "x$ac_system" = "xAIX"
145 AC_DEFINE(_THREAD_SAFE_ERRNO, 1, [Define to use the thread-safe version of errno under AIX.])
148 # Where to install .pc files.
149 pkgconfigdir="${libdir}/pkgconfig"
150 AC_SUBST(pkgconfigdir)
152 # Check for standards compliance mode
153 AC_ARG_ENABLE(standards,
154 AS_HELP_STRING([--enable-standards], [Enable standards compliance mode]),
155 [enable_standards="$enableval"],
156 [enable_standards="no"])
157 if test "x$enable_standards" = "xyes"
159 AC_DEFINE(_ISOC99_SOURCE, 1, [Define to enforce ISO C99 compliance.])
160 AC_DEFINE(_POSIX_C_SOURCE, 200809L, [Define to enforce POSIX.1-2008 compliance.])
161 AC_DEFINE(_XOPEN_SOURCE, 700, [Define to enforce X/Open 7 (XSI) compliance.])
162 AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.])
163 if test "x$GCC" = "xyes"
165 CFLAGS="$CFLAGS -std=c99"
168 AM_CONDITIONAL(BUILD_FEATURE_STANDARDS, test "x$enable_standards" = "xyes")
171 # Checks for header files.
178 AC_CHECK_HEADERS(stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h sys/isa_defs.h fnmatch.h libgen.h)
181 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
186 # include <sys/types.h>
189 AC_CHECK_HEADERS(netinet/in.h, [], [],
194 # include <sys/types.h>
196 #if HAVE_NETINET_IN_SYSTM_H
197 # include <netinet/in_systm.h>
200 AC_CHECK_HEADERS(netinet/ip.h, [], [],
205 # include <sys/types.h>
207 #if HAVE_NETINET_IN_SYSTM_H
208 # include <netinet/in_systm.h>
210 #if HAVE_NETINET_IN_H
211 # include <netinet/in.h>
214 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
219 # include <sys/types.h>
221 #if HAVE_NETINET_IN_SYSTM_H
222 # include <netinet/in_systm.h>
224 #if HAVE_NETINET_IN_H
225 # include <netinet/in.h>
227 #if HAVE_NETINET_IP_H
228 # include <netinet/ip.h>
231 AC_CHECK_HEADERS(netinet/ip_var.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>
244 #if HAVE_NETINET_IP_H
245 # include <netinet/ip.h>
248 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
253 # include <sys/types.h>
255 #if HAVE_NETINET_IN_SYSTM_H
256 # include <netinet/in_systm.h>
258 #if HAVE_NETINET_IN_H
259 # include <netinet/in.h>
262 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
267 # include <sys/types.h>
269 #if HAVE_NETINET_IN_SYSTM_H
270 # include <netinet/in_systm.h>
272 #if HAVE_NETINET_IN_H
273 # include <netinet/in.h>
275 #if HAVE_NETINET_IP6_H
276 # include <netinet/ip6.h>
279 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
284 # include <sys/types.h>
286 #if HAVE_NETINET_IN_SYSTM_H
287 # include <netinet/in_systm.h>
289 #if HAVE_NETINET_IN_H
290 # include <netinet/in.h>
292 #if HAVE_NETINET_IP_H
293 # include <netinet/ip.h>
296 AC_CHECK_HEADERS(netinet/udp.h, [], [],
301 # include <sys/types.h>
303 #if HAVE_NETINET_IN_SYSTM_H
304 # include <netinet/in_systm.h>
306 #if HAVE_NETINET_IN_H
307 # include <netinet/in.h>
309 #if HAVE_NETINET_IP_H
310 # include <netinet/ip.h>
315 AC_CHECK_TYPES([struct ip6_ext], [have_ip6_ext="yes"], [have_ip6_ext="no"],
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_IP6_H
329 # include <netinet/ip6.h>
333 if test "x$have_ip6_ext" = "xno"; then
334 SAVE_CFLAGS="$CFLAGS"
335 CFLAGS="$CFLAGS -DSOLARIS2=8"
337 AC_CHECK_TYPES([struct ip6_ext],
338 [have_ip6_ext="yes, with -DSOLARIS2=8"],
344 # include <sys/types.h>
346 #if HAVE_NETINET_IN_SYSTM_H
347 # include <netinet/in_systm.h>
349 #if HAVE_NETINET_IN_H
350 # include <netinet/in.h>
352 #if HAVE_NETINET_IP6_H
353 # include <netinet/ip6.h>
357 if test "x$have_ip6_ext" = "xno"; then
358 CFLAGS="$SAVE_CFLAGS"
363 AC_CHECK_HEADERS(sys/dkstat.h)
364 if test "x$ac_system" = "xDarwin"
366 AC_CHECK_HEADERS(mach/mach_init.h mach/host_priv.h mach/mach_error.h mach/mach_host.h mach/mach_port.h mach/mach_types.h mach/message.h mach/processor_set.h mach/processor.h mach/processor_info.h mach/task.h mach/thread_act.h mach/vm_region.h mach/vm_map.h mach/vm_prot.h mach/vm_statistics.h mach/kern_return.h)
367 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
368 # For the battery plugin
369 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
371 #if HAVE_IOKIT_IOKITLIB_H
372 # include <IOKit/IOKitLib.h>
374 #if HAVE_IOKIT_IOTYPES_H
375 # include <IOKit/IOTypes.h>
381 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
384 # include <sys/types.h>
387 # include <sys/param.h>
391 AC_MSG_CHECKING([for sysctl kern.cp_times])
392 if test -x /sbin/sysctl
394 /sbin/sysctl kern.cp_times 2>/dev/null
398 AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIMES, 1,
399 [Define if sysctl supports kern.cp_times])
408 AC_CHECK_HEADERS(linux/major.h)
410 # For md module (Linux only)
411 if test "x$ac_system" = "xLinux"
413 AC_CHECK_HEADERS(linux/raid/md_u.h,
414 [have_linux_raid_md_u_h="yes"],
415 [have_linux_raid_md_u_h="no"],
417 #include <sys/ioctl.h>
418 #include <linux/major.h>
419 #include <linux/types.h>
422 have_linux_raid_md_u_h="no"
425 # For the swap module
426 have_linux_wireless_h="no"
427 if test "x$ac_system" = "xLinux"
429 AC_CHECK_HEADERS(linux/wireless.h,
430 [have_linux_wireless_h="yes"],
431 [have_linux_wireless_h="no"],
434 #include <sys/ioctl.h>
435 #include <sys/socket.h>
439 # For the swap module
440 have_sys_swap_h="yes"
441 AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
443 #undef _FILE_OFFSET_BITS
444 #undef _LARGEFILE64_SOURCE
446 # include <sys/types.h>
449 # include <sys/param.h>
453 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
456 if test "x$GCC" = "xyes"
458 hint_64="CFLAGS='-m64'"
460 hint_64="CFLAGS='-xarch=v9'"
462 AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
466 # For the processes plugin
468 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
470 # For interface plugin
471 AC_CHECK_HEADERS(ifaddrs.h)
472 AC_CHECK_HEADERS(net/if.h, [], [],
475 # include <sys/types.h>
477 #if HAVE_SYS_SOCKET_H
478 # include <sys/socket.h>
481 AC_CHECK_HEADERS(linux/if.h, [], [],
484 # include <sys/types.h>
486 #if HAVE_SYS_SOCKET_H
487 # include <sys/socket.h>
490 AC_CHECK_HEADERS(linux/inet_diag.h, [], [],
493 # include <sys/types.h>
495 #if HAVE_SYS_SOCKET_H
496 # include <sys/socket.h>
498 #if HAVE_LINUX_INET_DIAG_H
499 # include <linux/inet_diag.h>
502 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
505 # include <sys/types.h>
507 #if HAVE_SYS_SOCKET_H
508 # include <sys/socket.h>
511 # include <linux/if.h>
516 AC_CHECK_HEADERS(linux/sockios.h,
517 [have_linux_sockios_h="yes"],
518 [have_linux_sockios_h="no"],
521 # include <sys/ioctl.h>
527 AC_CHECK_HEADERS(linux/ethtool.h,
528 [have_linux_ethtool_h="yes"],
529 [have_linux_ethtool_h="no"],
532 # include <sys/ioctl.h>
537 #if HAVE_LINUX_SOCKIOS_H
538 # include <linux/sockios.h>
543 have_linux_ip_vs_h="no"
544 have_net_ip_vs_h="no"
546 ip_vs_h_needs_kernel_cflags="no"
547 if test "x$ac_system" = "xLinux"
549 AC_CHECK_HEADERS(linux/ip_vs.h, [have_linux_ip_vs_h="yes"])
550 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
551 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
553 if test "x$have_linux_ip_vs_h$have_net_ip_vs_h$have_ip_vs_h" = "xnonono" && test -d "$KERNEL_DIR"
555 SAVE_CFLAGS="$CFLAGS"
556 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
558 AC_MSG_NOTICE([Did not find ip_vs.h. Trying again using headers from $KERNEL_DIR.])
560 AC_CHECK_HEADERS(linux/ip_vs.h, [have_linux_ip_vs_h="yes"])
561 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
562 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
564 if test "x$have_linux_ip_vs_h" = "xyes" || test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"
566 ip_vs_h_needs_kernel_cflags="yes"
569 CFLAGS="$SAVE_CFLAGS"
572 AM_CONDITIONAL(IP_VS_H_NEEDS_KERNEL_CFLAGS, test "x$ip_vs_h_needs_kernel_cflags" = "xyes")
575 AC_CHECK_HEADERS(sys/ucred.h, [], [],
578 # include <sys/types.h>
581 # include <sys/param.h>
585 # For mount interface
586 AC_CHECK_HEADERS(sys/mount.h, [], [],
589 # include <sys/types.h>
592 # include <sys/param.h>
596 # For the email plugin
597 AC_CHECK_HEADERS(linux/un.h, [], [],
599 #if HAVE_SYS_SOCKET_H
600 # include <sys/socket.h>
627 AC_CHECK_HEADERS([xfs/xqm.h], [], [],
633 AC_CHECK_HEADERS(arpa/nameser.h)
634 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
636 #if HAVE_ARPA_NAMESER_H
637 # include <arpa/nameser.h>
641 AC_CHECK_HEADERS(net/if_arp.h, [], [],
642 [#if HAVE_SYS_SOCKET_H
643 # include <sys/socket.h>
646 AC_CHECK_HEADERS(net/ppp_defs.h)
647 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
648 [#if HAVE_NET_PPP_DEFS_H
649 # include <net/ppp_defs.h>
652 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
657 # include <sys/types.h>
659 #if HAVE_SYS_SOCKET_H
660 # include <sys/socket.h>
665 #if HAVE_NETINET_IN_H
666 # include <netinet/in.h>
670 AC_CHECK_HEADERS(netinet/ip_compat.h)
672 have_net_pfvar_h="no"
673 AC_CHECK_HEADERS(net/pfvar.h,
674 [have_net_pfvar_h="yes"],
675 [have_net_pfvar_h="no"],
678 # include <sys/ioctl.h>
680 #if HAVE_SYS_SOCKET_H
681 # include <sys/socket.h>
686 #if HAVE_NETINET_IN_H
687 # include <netinet/in.h>
691 # For the multimeter plugin
693 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
696 # Checks for typedefs, structures, and compiler characteristics.
705 # Checks for library functions.
707 AC_PROG_GCC_TRADITIONAL
708 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf setenv if_indextoname)
712 SAVE_CFLAGS="$CFLAGS"
713 # Emulate behavior of src/Makefile.am
714 if test "x$GCC" = "xyes"
716 CFLAGS="$CFLAGS -Wall -Werror"
719 AC_CACHE_CHECK([for strtok_r],
720 [c_cv_have_strtok_r_default],
729 char buffer[] = "foo,bar,baz";
736 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
739 printf ("token = %s;\n", token);
743 [c_cv_have_strtok_r_default="yes"],
744 [c_cv_have_strtok_r_default="no"]
748 if test "x$c_cv_have_strtok_r_default" = "xno"
750 CFLAGS="$CFLAGS -D_REENTRANT=1"
752 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
753 [c_cv_have_strtok_r_reentrant],
762 char buffer[] = "foo,bar,baz";
769 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
772 printf ("token = %s;\n", token);
776 [c_cv_have_strtok_r_reentrant="yes"],
777 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
782 CFLAGS="$SAVE_CFLAGS"
783 if test "x$c_cv_have_strtok_r_reentrant" = "xyes"
785 CFLAGS="$CFLAGS -D_REENTRANT=1"
788 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
790 socket_needs_socket="no"
791 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
792 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
794 clock_gettime_needs_rt="no"
795 clock_gettime_needs_posix4="no"
796 have_clock_gettime="no"
797 AC_CHECK_FUNCS(clock_gettime, [have_clock_gettime="yes"])
798 if test "x$have_clock_gettime" = "xno"
800 AC_CHECK_LIB(rt, clock_gettime, [clock_gettime_needs_rt="yes"
801 have_clock_gettime="yes"])
803 if test "x$have_clock_gettime" = "xno"
805 AC_CHECK_LIB(posix4, clock_gettime, [clock_gettime_needs_posix4="yes"
806 have_clock_gettime="yes"])
808 if test "x$have_clock_gettime" = "xyes"
810 AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if the clock_gettime(2) function is available.])
812 AC_MSG_WARN(cannot find clock_gettime)
815 nanosleep_needs_rt="no"
816 nanosleep_needs_posix4="no"
817 AC_CHECK_FUNCS(nanosleep,
819 AC_CHECK_LIB(rt, nanosleep,
820 [nanosleep_needs_rt="yes"],
821 AC_CHECK_LIB(posix4, nanosleep,
822 [nanosleep_needs_posix4="yes"],
823 AC_MSG_ERROR(cannot find nanosleep))))
825 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$clock_gettime_needs_rt" = "xyes" || test "x$nanosleep_needs_rt" = "xyes")
826 AM_CONDITIONAL(BUILD_WITH_LIBPOSIX4, test "x$clock_gettime_needs_posix4" = "xyes" || test "x$nanosleep_needs_posix4" = "xyes")
828 AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
829 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
830 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
831 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
832 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
833 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
834 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
835 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
836 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
837 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
838 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
839 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
841 # Check for strptime {{{
842 if test "x$GCC" = "xyes"
844 SAVE_CFLAGS="$CFLAGS"
845 CFLAGS="$CFLAGS -Wall -Wextra -Werror"
848 AC_CHECK_FUNCS(strptime, [have_strptime="yes"], [have_strptime="no"])
849 if test "x$have_strptime" = "xyes"
851 AC_CACHE_CHECK([whether strptime is exported by default],
852 [c_cv_have_strptime_default],
853 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
859 (void) strptime ("2010-12-30%13:42:42", "%Y-%m-%dT%T", &stm);
862 [c_cv_have_strptime_default="yes"],
863 [c_cv_have_strptime_default="no"]))
865 if test "x$have_strptime" = "xyes" && test "x$c_cv_have_strptime_default" = "xno"
867 AC_CACHE_CHECK([whether strptime needs standards mode],
868 [c_cv_have_strptime_standards],
869 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
871 #ifndef _ISOC99_SOURCE
872 # define _ISOC99_SOURCE 1
874 #ifndef _POSIX_C_SOURCE
875 # define _POSIX_C_SOURCE 200112L
877 #ifndef _XOPEN_SOURCE
878 # define _XOPEN_SOURCE 500
884 (void) strptime ("2010-12-30%13:42:42", "%Y-%m-%dT%T", &stm);
887 [c_cv_have_strptime_standards="yes"],
888 [c_cv_have_strptime_standards="no"]))
890 if test "x$c_cv_have_strptime_standards" = "xyes"
892 AC_DEFINE([STRPTIME_NEEDS_STANDARDS], 1, [Set to true if strptime is only exported in X/Open mode (GNU libc).])
898 if test "x$GCC" = "xyes"
900 CFLAGS="$SAVE_CFLAGS"
902 # }}} Check for strptime
904 AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
905 if test "x$have_swapctl" = "xyes"; then
906 AC_CACHE_CHECK([whether swapctl takes two arguments],
907 [c_cv_have_swapctl_two_args],
908 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
910 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
911 # undef _FILE_OFFSET_BITS
912 # undef _LARGEFILE64_SOURCE
914 #include <sys/stat.h>
915 #include <sys/swap.h>
918 int num = swapctl(0, NULL);
921 [c_cv_have_swapctl_two_args="yes"],
922 [c_cv_have_swapctl_two_args="no"]
925 AC_CACHE_CHECK([whether swapctl takes three arguments],
926 [c_cv_have_swapctl_three_args],
930 #if HAVE_SYS_SWAP_H && !defined(_LP64) && _FILE_OFFSET_BITS == 64
931 # undef _FILE_OFFSET_BITS
932 # undef _LARGEFILE64_SOURCE
934 #include <sys/stat.h>
935 #include <sys/swap.h>
938 int num = swapctl(0, NULL, 0);
941 [c_cv_have_swapctl_three_args="yes"],
942 [c_cv_have_swapctl_three_args="no"]
946 # Check for different versions of `swapctl' here..
947 if test "x$have_swapctl" = "xyes"; then
948 if test "x$c_cv_have_swapctl_two_args" = "xyes"; then
949 AC_DEFINE(HAVE_SWAPCTL_TWO_ARGS, 1,
950 [Define if the function swapctl exists and takes two arguments.])
952 if test "x$c_cv_have_swapctl_three_args" = "xyes"; then
953 AC_DEFINE(HAVE_SWAPCTL_THREE_ARGS, 1,
954 [Define if the function swapctl exists and takes three arguments.])
959 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
961 if test "x$withval" = "xno"; then
963 else if test "x$withval" = "xyes"; then
970 if test "x$nan_type" = "xnone"; then
971 AC_CACHE_CHECK([whether NAN is defined by default],
972 [c_cv_have_nan_default],
973 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
977 static double foo = NAN;
986 [c_cv_have_nan_default="yes"],
987 [c_cv_have_nan_default="no"]
990 if test "x$c_cv_have_nan_default" = "xyes"
995 if test "x$nan_type" = "xnone"; then
996 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
997 [c_cv_have_nan_isoc],
998 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
1001 #define __USE_ISOC99 1
1003 static double foo = NAN;
1012 [c_cv_have_nan_isoc="yes"],
1013 [c_cv_have_nan_isoc="no"]
1016 if test "x$c_cv_have_nan_isoc" = "xyes"
1021 if test "x$nan_type" = "xnone"; then
1022 SAVE_LDFLAGS=$LDFLAGS
1023 LDFLAGS="$LDFLAGS -lm"
1024 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
1025 [c_cv_have_nan_zero],
1026 AC_RUN_IFELSE([AC_LANG_PROGRAM(
1033 #define NAN (0.0 / 0.0)
1035 # define isnan(f) ((f) != (f))
1037 static double foo = NAN;
1046 [c_cv_have_nan_zero="yes"],
1047 [c_cv_have_nan_zero="no"]
1050 LDFLAGS=$SAVE_LDFLAGS
1051 if test "x$c_cv_have_nan_zero" = "xyes"
1057 if test "x$nan_type" = "xdefault"; then
1058 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
1059 [Define if NAN is defined by default and can initialize static variables.])
1060 else if test "x$nan_type" = "xisoc99"; then
1061 AC_DEFINE(NAN_STATIC_ISOC, 1,
1062 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
1063 else if test "x$nan_type" = "xzero"; then
1064 AC_DEFINE(NAN_ZERO_ZERO, 1,
1065 [Define if NAN can be defined as (0.0 / 0.0)])
1067 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
1070 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
1072 if test "x$withval" = "xnothing"; then
1073 fp_layout_type="nothing"
1074 else if test "x$withval" = "xendianflip"; then
1075 fp_layout_type="endianflip"
1076 else if test "x$withval" = "xintswap"; then
1077 fp_layout_type="intswap"
1079 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
1082 [fp_layout_type="unknown"])
1084 if test "x$fp_layout_type" = "xunknown"; then
1085 AC_CACHE_CHECK([if doubles are stored in x86 representation],
1086 [c_cv_fp_layout_need_nothing],
1087 AC_RUN_IFELSE([AC_LANG_PROGRAM(
1093 # include <stdint.h>
1096 # include <inttypes.h>
1099 # include <stdbool.h>
1109 memcpy ((void *) &i0, (void *) &d, 8);
1112 memcpy ((void *) c, (void *) &i1, 8);
1114 if ((c[0] == 0x2f) && (c[1] == 0x25)
1115 && (c[2] == 0xc0) && (c[3] == 0xc7)
1116 && (c[4] == 0x43) && (c[5] == 0x2b)
1117 && (c[6] == 0x1f) && (c[7] == 0x5b))
1123 [c_cv_fp_layout_need_nothing="yes"],
1124 [c_cv_fp_layout_need_nothing="no"]
1127 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
1128 fp_layout_type="nothing"
1131 if test "x$fp_layout_type" = "xunknown"; then
1132 AC_CACHE_CHECK([if endianflip converts to x86 representation],
1133 [c_cv_fp_layout_need_endianflip],
1134 AC_RUN_IFELSE([AC_LANG_PROGRAM(
1140 # include <stdint.h>
1143 # include <inttypes.h>
1146 # include <stdbool.h>
1148 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
1149 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
1150 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
1151 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
1152 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
1153 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
1154 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
1155 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
1164 memcpy ((void *) &i0, (void *) &d, 8);
1166 i1 = endianflip (i0);
1167 memcpy ((void *) c, (void *) &i1, 8);
1169 if ((c[0] == 0x2f) && (c[1] == 0x25)
1170 && (c[2] == 0xc0) && (c[3] == 0xc7)
1171 && (c[4] == 0x43) && (c[5] == 0x2b)
1172 && (c[6] == 0x1f) && (c[7] == 0x5b))
1178 [c_cv_fp_layout_need_endianflip="yes"],
1179 [c_cv_fp_layout_need_endianflip="no"]
1182 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
1183 fp_layout_type="endianflip"
1186 if test "x$fp_layout_type" = "xunknown"; then
1187 AC_CACHE_CHECK([if intswap converts to x86 representation],
1188 [c_cv_fp_layout_need_intswap],
1189 AC_RUN_IFELSE([AC_LANG_PROGRAM(
1195 # include <stdint.h>
1198 # include <inttypes.h>
1201 # include <stdbool.h>
1203 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
1204 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
1213 memcpy ((void *) &i0, (void *) &d, 8);
1216 memcpy ((void *) c, (void *) &i1, 8);
1218 if ((c[0] == 0x2f) && (c[1] == 0x25)
1219 && (c[2] == 0xc0) && (c[3] == 0xc7)
1220 && (c[4] == 0x43) && (c[5] == 0x2b)
1221 && (c[6] == 0x1f) && (c[7] == 0x5b))
1227 [c_cv_fp_layout_need_intswap="yes"],
1228 [c_cv_fp_layout_need_intswap="no"]
1231 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
1232 fp_layout_type="intswap"
1236 if test "x$fp_layout_type" = "xnothing"; then
1237 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
1238 [Define if doubles are stored in x86 representation.])
1239 else if test "x$fp_layout_type" = "xendianflip"; then
1240 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
1241 [Define if endianflip is needed to convert to x86 representation.])
1242 else if test "x$fp_layout_type" = "xintswap"; then
1243 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
1244 [Define if intswap is needed to convert to x86 representation.])
1246 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
1250 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
1251 have_getvfsstat="no"
1252 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
1253 have_listmntent="no"
1254 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
1255 have_getmntent_r="no"
1256 AC_CHECK_FUNCS(getmntent_r, [have_getmntent_r="yes"])
1259 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
1260 if test "x$have_getmntent" = "xno"; then
1261 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
1263 if test "x$have_getmntent" = "xno"; then
1264 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
1266 if test "x$have_getmntent" = "xno"; then
1267 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
1270 if test "x$have_getmntent" = "xc"; then
1271 AC_CACHE_CHECK([whether getmntent takes one argument],
1272 [c_cv_have_one_getmntent],
1276 #include "$srcdir/src/utils_mount.h"
1281 fh = setmntent ("/etc/mtab", "r");
1282 me = getmntent (fh);
1283 return(me->mnt_passno);
1286 [c_cv_have_one_getmntent="yes"],
1287 [c_cv_have_one_getmntent="no"]
1290 AC_CACHE_CHECK([whether getmntent takes two arguments],
1291 [c_cv_have_two_getmntent],
1295 #include "$srcdir/src/utils_mount.h"
1301 fh = fopen ("/etc/mnttab", "r");
1302 status = getmntent (fh, &mt);
1306 [c_cv_have_two_getmntent="yes"],
1307 [c_cv_have_two_getmntent="no"]
1312 # Check for different versions of `getmntent' here..
1314 if test "x$have_getmntent" = "xc"; then
1315 if test "x$c_cv_have_one_getmntent" = "xyes"; then
1316 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
1317 [Define if the function getmntent exists and takes one argument.])
1319 if test "x$c_cv_have_two_getmntent" = "xyes"; then
1320 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
1321 [Define if the function getmntent exists and takes two arguments.])
1324 if test "x$have_getmntent" = "xsun"; then
1325 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
1326 [Define if the function getmntent exists. It's the version from libsun.])
1328 if test "x$have_getmntent" = "xseq"; then
1329 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
1330 [Define if the function getmntent exists. It's the version from libseq.])
1332 if test "x$have_getmntent" = "xgen"; then
1333 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
1334 [Define if the function getmntent exists. It's the version from libgen.])
1338 AC_CACHE_CHECK([if have htonll defined],
1340 AC_LINK_IFELSE([AC_LANG_PROGRAM(
1342 #include <sys/types.h>
1343 #include <netinet/in.h>
1345 # include <inttypes.h>
1352 [c_cv_have_htonll="yes"],
1353 [c_cv_have_htonll="no"]
1356 if test "x$c_cv_have_htonll" = "xyes"
1358 AC_DEFINE(HAVE_HTONLL, 1, [Define if the function htonll exists.])
1361 # Check for structures
1362 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
1363 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
1366 #include <sys/types.h>
1367 #include <sys/socket.h>
1370 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
1371 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
1374 #include <sys/types.h>
1375 #include <sys/socket.h>
1376 #include <linux/if.h>
1377 #include <linux/netdevice.h>
1379 AC_CHECK_MEMBERS([struct inet_diag_req.id, struct inet_diag_req.idiag_states],
1380 [AC_DEFINE(HAVE_STRUCT_LINUX_INET_DIAG_REQ, 1, [Define if struct inet_diag_req exists and is usable.])],
1383 #include <linux/inet_diag.h>
1387 AC_CHECK_MEMBERS([struct ip_mreqn.imr_ifindex], [],
1390 #include <netinet/in.h>
1394 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
1396 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
1397 [Define if struct kinfo_proc exists in the FreeBSD variant.])
1398 have_struct_kinfo_proc_freebsd="yes"
1401 have_struct_kinfo_proc_freebsd="no"
1405 #include <sys/param.h>
1406 #include <sys/sysctl.h>
1407 #include <sys/user.h>
1410 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
1412 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
1413 [Define if struct kinfo_proc exists in the OpenBSD variant.])
1414 have_struct_kinfo_proc_openbsd="yes"
1417 have_struct_kinfo_proc_openbsd="no"
1420 #include <sys/param.h>
1421 #include <sys/sysctl.h>
1425 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
1426 [#define _BSD_SOURCE
1427 #define _DEFAULT_SOURCE
1429 # include <stdint.h>
1431 #if HAVE_SYS_TYPES_H
1432 # include <sys/types.h>
1434 #if HAVE_NETINET_IN_SYSTM_H
1435 # include <netinet/in_systm.h>
1437 #if HAVE_NETINET_IN_H
1438 # include <netinet/in.h>
1440 #if HAVE_NETINET_IP_H
1441 # include <netinet/ip.h>
1443 #if HAVE_NETINET_UDP_H
1444 # include <netinet/udp.h>
1447 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
1448 [#define _BSD_SOURCE
1449 #define _DEFAULT_SOURCE
1451 # include <stdint.h>
1453 #if HAVE_SYS_TYPES_H
1454 # include <sys/types.h>
1456 #if HAVE_NETINET_IN_SYSTM_H
1457 # include <netinet/in_systm.h>
1459 #if HAVE_NETINET_IN_H
1460 # include <netinet/in.h>
1462 #if HAVE_NETINET_IP_H
1463 # include <netinet/ip.h>
1465 #if HAVE_NETINET_UDP_H
1466 # include <netinet/udp.h>
1470 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
1480 # Checks for libraries begin here
1483 with_libresolv="yes"
1484 AC_CHECK_LIB(resolv, res_search,
1486 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
1488 [with_libresolv="no"])
1489 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
1491 dnl Check for HAL (hardware abstraction library)
1493 AC_CHECK_LIB(hal,libhal_device_property_exists,
1494 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
1496 if test "x$with_libhal" = "xyes"; then
1497 if test "x$PKG_CONFIG" != "x"; then
1498 BUILD_WITH_LIBHAL_CFLAGS="`$PKG_CONFIG --cflags hal`"
1499 BUILD_WITH_LIBHAL_LIBS="`$PKG_CONFIG --libs hal`"
1500 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
1501 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
1505 m4_divert_once([HELP_WITH], [
1506 collectd additional packages:])
1508 AM_CONDITIONAL([BUILD_FREEBSD],[test "x$x$ac_system" = "xFreeBSD"])
1510 AM_CONDITIONAL([BUILD_AIX],[test "x$x$ac_system" = "xAIX"])
1512 if test "x$ac_system" = "xAIX"
1517 with_perfstat="no (AIX only)"
1518 with_procinfo="no (AIX only)"
1521 if test "x$with_perfstat" = "xyes"
1523 AC_CHECK_LIB(perfstat, perfstat_reset, [with_perfstat="yes"], [with_perfstat="no (perfstat not found)"], [])
1524 # AC_CHECK_HEADERS(sys/protosw.h libperfstat.h,, [with_perfstat="no (perfstat not found)"])
1526 if test "x$with_perfstat" = "xyes"
1528 AC_DEFINE(HAVE_PERFSTAT, 1, [Define to 1 if you have the 'perfstat' library (-lperfstat)])
1529 # struct members pertaining to donation have been added to libperfstat somewhere between AIX5.3ML5 and AIX5.3ML9
1530 AC_CHECK_MEMBER([perfstat_partition_type_t.b.donate_enabled], [], [], [[#include <libperfstat.h]])
1531 if test "x$av_cv_member_perfstat_partition_type_t_b_donate_enabled" = "xyes"
1533 AC_DEFINE(PERFSTAT_SUPPORTS_DONATION, 1, [Define to 1 if your version of the 'perfstat' library supports donation])
1536 AM_CONDITIONAL(BUILD_WITH_PERFSTAT, test "x$with_perfstat" = "xyes")
1538 # Processes plugin under AIX.
1539 if test "x$with_procinfo" = "xyes"
1541 AC_CHECK_HEADERS(procinfo.h,, [with_procinfo="no (procinfo.h not found)"])
1543 if test "x$with_procinfo" = "xyes"
1545 AC_DEFINE(HAVE_PROCINFO_H, 1, [Define to 1 if you have the procinfo.h])
1548 if test "x$ac_system" = "xSolaris"
1553 with_kstat="no (Solaris only)"
1554 with_devinfo="no (Solaris only)"
1557 if test "x$with_kstat" = "xyes"
1559 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1561 if test "x$with_kstat" = "xyes"
1563 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1564 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1566 if test "x$with_kstat" = "xyes"
1568 AC_DEFINE(HAVE_LIBKSTAT, 1,
1569 [Define to 1 if you have the 'kstat' library (-lkstat)])
1571 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1572 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1575 if test "x$ac_system" = "xDarwin"
1581 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1584 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1585 if test "x$with_kvm_getprocs" = "xyes"
1587 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1588 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1591 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1593 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1594 if test "x$with_kvm_getswapinfo" = "xyes"
1596 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1597 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1600 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1602 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1603 if test "x$with_kvm_nlist" = "xyes"
1605 AC_CHECK_HEADERS(bsd/nlist.h nlist.h)
1606 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1607 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1610 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1612 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1613 if test "x$with_kvm_openfiles" = "xyes"
1615 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1616 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1619 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1621 # --with-libaquaero5 {{{
1622 AC_ARG_WITH(libaquaero5, [AS_HELP_STRING([--with-libaquaero5@<:@=PREFIX@:>@], [Path to aquatools-ng source code.])],
1624 if test "x$withval" = "xyes"
1626 with_libaquaero5="yes"
1627 else if test "x$withval" = "xno"
1629 with_libaquaero5="no"
1631 with_libaquaero5="yes"
1632 LIBAQUAERO5_CFLAGS="$LIBAQUAERO5_CFLAGS -I$withval/src"
1633 LIBAQUAERO5_LDFLAGS="$LIBAQUAERO5_LDFLAGS -L$withval/obj"
1636 [with_libaquaero5="yes"])
1638 SAVE_CPPFLAGS="$CPPFLAGS"
1639 SAVE_LDFLAGS="$LDFLAGS"
1641 CPPFLAGS="$CPPFLAGS $LIBAQUAERO5_CFLAGS"
1642 LDFLAGS="$LDFLAGS $LIBAQUAERO5_LDFLAGS"
1644 if test "x$with_libaquaero5" = "xyes"
1646 if test "x$LIBAQUAERO5_CFLAGS" != "x"
1648 AC_MSG_NOTICE([libaquaero5 CPPFLAGS: $LIBAQUAERO5_CFLAGS])
1650 AC_CHECK_HEADERS(libaquaero5.h,
1651 [with_libaquaero5="yes"],
1652 [with_libaquaero5="no (libaquaero5.h not found)"])
1654 if test "x$with_libaquaero5" = "xyes"
1656 if test "x$LIBAQUAERO5_LDFLAGS" != "x"
1658 AC_MSG_NOTICE([libaquaero5 LDFLAGS: $LIBAQUAERO5_LDFLAGS])
1660 AC_CHECK_LIB(aquaero5, libaquaero5_poll,
1661 [with_libaquaero5="yes"],
1662 [with_libaquaero5="no (symbol 'libaquaero5_poll' not found)"])
1665 CPPFLAGS="$SAVE_CPPFLAGS"
1666 LDFLAGS="$SAVE_LDFLAGS"
1668 if test "x$with_libaquaero5" = "xyes"
1670 BUILD_WITH_LIBAQUAERO5_CFLAGS="$LIBAQUAERO5_CFLAGS"
1671 BUILD_WITH_LIBAQUAERO5_LDFLAGS="$LIBAQUAERO5_LDFLAGS"
1672 AC_SUBST(BUILD_WITH_LIBAQUAERO5_CFLAGS)
1673 AC_SUBST(BUILD_WITH_LIBAQUAERO5_LDFLAGS)
1675 AM_CONDITIONAL(BUILD_WITH_LIBAQUAERO5, test "x$with_libaquaero5" = "xyes")
1678 # --with-libcredis {{{
1679 AC_ARG_WITH(libcredis, [AS_HELP_STRING([--with-libcredis@<:@=PREFIX@:>@], [Path to libcredis.])],
1681 if test "x$withval" = "xyes"
1683 with_libcredis="yes"
1684 else if test "x$withval" = "xno"
1688 with_libcredis="yes"
1689 LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS -I$withval/include"
1690 LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS -L$withval/lib"
1693 [with_libcredis="yes"])
1695 SAVE_CPPFLAGS="$CPPFLAGS"
1696 SAVE_LDFLAGS="$LDFLAGS"
1698 CPPFLAGS="$CPPFLAGS $LIBCREDIS_CPPFLAGS"
1699 LDFLAGS="$LDFLAGS $LIBCREDIS_LDFLAGS"
1701 if test "x$with_libcredis" = "xyes"
1703 if test "x$LIBCREDIS_CPPFLAGS" != "x"
1705 AC_MSG_NOTICE([libcredis CPPFLAGS: $LIBCREDIS_CPPFLAGS])
1707 AC_CHECK_HEADERS(credis.h,
1708 [with_libcredis="yes"],
1709 [with_libcredis="no (credis.h not found)"])
1711 if test "x$with_libcredis" = "xyes"
1713 if test "x$LIBCREDIS_LDFLAGS" != "x"
1715 AC_MSG_NOTICE([libcredis LDFLAGS: $LIBCREDIS_LDFLAGS])
1717 AC_CHECK_LIB(credis, credis_info,
1718 [with_libcredis="yes"],
1719 [with_libcredis="no (symbol 'credis_info' not found)"])
1723 CPPFLAGS="$SAVE_CPPFLAGS"
1724 LDFLAGS="$SAVE_LDFLAGS"
1726 if test "x$with_libcredis" = "xyes"
1728 BUILD_WITH_LIBCREDIS_CPPFLAGS="$LIBCREDIS_CPPFLAGS"
1729 BUILD_WITH_LIBCREDIS_LDFLAGS="$LIBCREDIS_LDFLAGS"
1730 AC_SUBST(BUILD_WITH_LIBCREDIS_CPPFLAGS)
1731 AC_SUBST(BUILD_WITH_LIBCREDIS_LDFLAGS)
1733 AM_CONDITIONAL(BUILD_WITH_LIBCREDIS, test "x$with_libcredis" = "xyes")
1736 # --with-libcurl {{{
1737 with_curl_config="curl-config"
1740 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1742 if test "x$withval" = "xno"
1745 else if test "x$withval" = "xyes"
1749 if test -f "$withval" && test -x "$withval"
1751 with_curl_config="$withval"
1753 else if test -x "$withval/bin/curl-config"
1755 with_curl_config="$withval/bin/curl-config"
1764 if test "x$with_libcurl" = "xyes"
1766 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1767 curl_config_status=$?
1769 if test $curl_config_status -ne 0
1771 with_libcurl="no ($with_curl_config failed)"
1773 SAVE_CPPFLAGS="$CPPFLAGS"
1774 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1776 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1778 CPPFLAGS="$SAVE_CPPFLAGS"
1781 if test "x$with_libcurl" = "xyes"
1783 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1784 curl_config_status=$?
1786 if test $curl_config_status -ne 0
1788 with_libcurl="no ($with_curl_config failed)"
1790 AC_CHECK_LIB(curl, curl_easy_init,
1791 [with_libcurl="yes"],
1792 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1796 if test "x$with_libcurl" = "xyes"
1798 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1799 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1800 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1801 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1803 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1807 with_libdbi_cppflags=""
1808 with_libdbi_ldflags=""
1809 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1811 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1813 with_libdbi_cppflags="-I$withval/include"
1814 with_libdbi_ldflags="-L$withval/lib"
1817 with_libdbi="$withval"
1823 if test "x$with_libdbi" = "xyes"
1825 SAVE_CPPFLAGS="$CPPFLAGS"
1826 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1828 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1830 CPPFLAGS="$SAVE_CPPFLAGS"
1832 if test "x$with_libdbi" = "xyes"
1834 SAVE_CPPFLAGS="$CPPFLAGS"
1835 SAVE_LDFLAGS="$LDFLAGS"
1836 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1837 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1839 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1841 CPPFLAGS="$SAVE_CPPFLAGS"
1842 LDFLAGS="$SAVE_LDFLAGS"
1844 if test "x$with_libdbi" = "xyes"
1846 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1847 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1848 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1849 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1850 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1851 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1853 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1856 # --with-libesmtp {{{
1857 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1859 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1861 LDFLAGS="$LDFLAGS -L$withval/lib"
1862 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1865 with_libesmtp="$withval"
1871 if test "x$with_libesmtp" = "xyes"
1873 AC_CHECK_LIB(esmtp, smtp_create_session,
1875 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1876 ], [with_libesmtp="no (libesmtp not found)"])
1878 if test "x$with_libesmtp" = "xyes"
1880 AC_CHECK_HEADERS(libesmtp.h,
1882 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1883 ], [with_libesmtp="no (libesmtp.h not found)"])
1885 if test "x$with_libesmtp" = "xyes"
1891 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1892 [Wether or not to use the esmtp library])
1893 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1896 # --with-libganglia {{{
1897 AC_ARG_WITH(libganglia, [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
1899 if test -f "$withval" && test -x "$withval"
1901 with_libganglia_config="$withval"
1902 with_libganglia="yes"
1903 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"
1905 with_libganglia_config="$withval/bin/ganglia-config"
1906 with_libganglia="yes"
1907 else if test -d "$withval"
1909 GANGLIA_CPPFLAGS="-I$withval/include"
1910 GANGLIA_LDFLAGS="-L$withval/lib"
1911 with_libganglia="yes"
1913 with_libganglia="$withval"
1917 with_libganglia="yes"
1920 if test "x$with_libganglia" = "xyes"
1922 if test "x$with_libganglia_config" != "x"
1924 if test "x$GANGLIA_CPPFLAGS" = "x"
1926 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
1929 if test "x$GANGLIA_LDFLAGS" = "x"
1931 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
1934 if test "x$GANGLIA_LIBS" = "x"
1936 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
1939 GANGLIA_LIBS="-lganglia"
1943 SAVE_CPPFLAGS="$CPPFLAGS"
1944 SAVE_LDFLAGS="$LDFLAGS"
1945 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
1946 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
1948 if test "x$with_libganglia" = "xyes"
1950 AC_CHECK_HEADERS(gm_protocol.h,
1952 AC_DEFINE(HAVE_GM_PROTOCOL_H, 1,
1953 [Define to 1 if you have the <gm_protocol.h> header file.])
1954 ], [with_libganglia="no (gm_protocol.h not found)"])
1957 if test "x$with_libganglia" = "xyes"
1959 AC_CHECK_LIB(ganglia, xdr_Ganglia_value_msg,
1961 AC_DEFINE(HAVE_LIBGANGLIA, 1,
1962 [Define to 1 if you have the ganglia library (-lganglia).])
1963 ], [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"])
1966 CPPFLAGS="$SAVE_CPPFLAGS"
1967 LDFLAGS="$SAVE_LDFLAGS"
1969 AC_SUBST(GANGLIA_CPPFLAGS)
1970 AC_SUBST(GANGLIA_LDFLAGS)
1971 AC_SUBST(GANGLIA_LIBS)
1972 AM_CONDITIONAL(BUILD_WITH_LIBGANGLIA, test "x$with_libganglia" = "xyes")
1975 # --with-libgcrypt {{{
1976 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
1977 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
1978 GCRYPT_LIBS="$GCRYPT_LIBS"
1979 AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
1981 if test -f "$withval" && test -x "$withval"
1983 with_libgcrypt_config="$withval"
1984 with_libgcrypt="yes"
1985 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"
1987 with_libgcrypt_config="$withval/bin/gcrypt-config"
1988 with_libgcrypt="yes"
1989 else if test -d "$withval"
1991 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
1992 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
1993 with_libgcrypt="yes"
1995 with_libgcrypt_config="gcrypt-config"
1996 with_libgcrypt="$withval"
2000 with_libgcrypt_config="libgcrypt-config"
2001 with_libgcrypt="yes"
2004 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"
2006 if test "x$GCRYPT_CPPFLAGS" = "x"
2008 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
2011 if test "x$GCRYPT_LIBS" = "x"
2013 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
2017 SAVE_CPPFLAGS="$CPPFLAGS"
2018 SAVE_LDFLAGS="$LDFLAGS"
2020 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
2021 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
2022 LIBS="$LIBS $GCRYPT_LIBS"
2024 if test "x$with_libgcrypt" = "xyes"
2026 if test "x$GCRYPT_CPPFLAGS" != "x"
2028 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
2030 AC_CHECK_HEADERS(gcrypt.h,
2031 [with_libgcrypt="yes"],
2032 [with_libgcrypt="no (gcrypt.h not found)"])
2035 if test "x$with_libgcrypt" = "xyes"
2037 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
2038 [with_libgcrypt="yes"],
2039 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
2041 if test "$with_libgcrypt" != "no"; then
2042 m4_ifdef([AM_PATH_LIBGCRYPT],[AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")])
2043 GCRYPT_CPPFLAGS="$LIBGCRYPT_CPPFLAGS $LIBGCRYPT_CFLAGS"
2044 GCRYPT_LIBS="$LIBGCRYPT_LIBS"
2048 CPPFLAGS="$SAVE_CPPFLAGS"
2049 LDFLAGS="$SAVE_LDFLAGS"
2052 if test "x$with_libgcrypt" = "xyes"
2054 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to 1 if you have the gcrypt library (-lgcrypt).])
2057 AC_SUBST(GCRYPT_CPPFLAGS)
2058 AC_SUBST(GCRYPT_LDFLAGS)
2059 AC_SUBST(GCRYPT_LIBS)
2060 AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes")
2063 # --with-libiptc {{{
2064 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
2066 if test "x$withval" = "xshipped"
2069 else if test "x$withval" = "xyes"
2071 with_libiptc="pkgconfig"
2072 else if test "x$withval" = "xno"
2077 with_libiptc_cflags="-I$withval/include"
2078 with_libiptc_libs="-L$withval/lib"
2082 if test "x$ac_system" = "xLinux"
2084 with_libiptc="pkgconfig"
2086 with_libiptc="no (Linux only)"
2090 if test "x$with_libiptc" = "xpkgconfig" && test "x$PKG_CONFIG" = "x"
2092 with_libiptc="no (Don't have pkg-config)"
2095 if test "x$with_libiptc" = "xpkgconfig"
2097 $PKG_CONFIG --exists 'libiptc' 2>/dev/null
2100 with_libiptc="no (pkg-config doesn't know libiptc)"
2103 if test "x$with_libiptc" = "xpkgconfig"
2105 with_libiptc_cflags="`$PKG_CONFIG --cflags 'libiptc'`"
2108 with_libiptc="no ($PKG_CONFIG failed)"
2110 with_libiptc_libs="`$PKG_CONFIG --libs 'libiptc'`"
2113 with_libiptc="no ($PKG_CONFIG failed)"
2117 SAVE_CPPFLAGS="$CPPFLAGS"
2118 CPPFLAGS="$CPPFLAGS $with_libiptc_cflags"
2120 # check whether the header file for libiptc is available.
2121 if test "x$with_libiptc" = "xpkgconfig"
2123 AC_CHECK_HEADERS(libiptc/libiptc.h libiptc/libip6tc.h, ,
2124 [with_libiptc="no (header file missing)"])
2126 # If the header file is available, check for the required type declaractions.
2127 # They may be missing in old versions of libiptc. In that case, they will be
2128 # declared in the iptables plugin.
2129 if test "x$with_libiptc" = "xpkgconfig"
2131 AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [])
2133 # Check for the iptc_init symbol in the library.
2134 # This could be in iptc or ip4tc
2135 if test "x$with_libiptc" = "xpkgconfig"
2138 AC_SEARCH_LIBS(iptc_init, [iptc ip4tc],
2139 [with_libiptc="pkgconfig"],
2140 [with_libiptc="no"],
2141 [$with_libiptc_libs])
2144 if test "x$with_libiptc" = "xpkgconfig"
2149 CPPFLAGS="$SAVE_CPPFLAGS"
2151 if test "x$with_libiptc" = "xown"
2153 with_libiptc_cflags=""
2154 with_libiptc_libs=""
2156 if test "x$with_libiptc" = "xown"
2158 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
2160 with_libiptc="no (Linux iptables headers not found)"
2163 #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
2166 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_libiptc" = "xown")
2167 if test "x$with_libiptc" = "xown"
2169 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
2173 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
2174 if test "x$with_libiptc" = "xyes"
2176 BUILD_WITH_LIBIPTC_CPPFLAGS="$with_libiptc_cflags"
2177 BUILD_WITH_LIBIPTC_LDFLAGS="$with_libiptc_libs"
2178 AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
2179 AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
2184 with_java_home="$JAVA_HOME"
2185 if test "x$with_java_home" = "x"
2187 with_java_home="/usr/lib/jvm"
2189 with_java_vmtype="client"
2194 AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
2196 if test "x$withval" = "xno"
2199 else if test "x$withval" = "xyes"
2203 with_java_home="$withval"
2208 if test "x$with_java" = "xyes"
2210 if test -d "$with_java_home"
2212 AC_MSG_CHECKING([for jni.h])
2213 TMPVAR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
2214 if test "x$TMPVAR" != "x"
2216 AC_MSG_RESULT([found in $TMPVAR])
2217 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR"
2219 AC_MSG_RESULT([not found])
2222 AC_MSG_CHECKING([for jni_md.h])
2223 TMPVAR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
2224 if test "x$TMPVAR" != "x"
2226 AC_MSG_RESULT([found in $TMPVAR])
2227 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPVAR"
2229 AC_MSG_RESULT([not found])
2232 AC_MSG_CHECKING([for libjvm.so])
2233 TMPVAR=`find -L "$with_java_home" -type f \( -name libjvm.so -o -name libjvm.dylib \) -exec 'dirname' '{}' ';' 2>/dev/null | head -n 1`
2234 if test "x$TMPVAR" != "x"
2236 AC_MSG_RESULT([found in $TMPVAR])
2237 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPVAR -Wl,-rpath -Wl,$TMPVAR"
2239 AC_MSG_RESULT([not found])
2242 if test "x$JAVAC" = "x"
2244 AC_MSG_CHECKING([for javac])
2245 TMPVAR=`find -L "$with_java_home" -name javac -type f 2>/dev/null | head -n 1`
2246 if test "x$TMPVAR" != "x"
2249 AC_MSG_RESULT([$JAVAC])
2251 AC_MSG_RESULT([not found])
2254 if test "x$JAR" = "x"
2256 AC_MSG_CHECKING([for jar])
2257 TMPVAR=`find -L "$with_java_home" -name jar -type f 2>/dev/null | head -n 1`
2258 if test "x$TMPVAR" != "x"
2261 AC_MSG_RESULT([$JAR])
2263 AC_MSG_RESULT([not found])
2266 else if test "x$with_java_home" != "x"
2268 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
2272 if test "x$JAVA_CPPFLAGS" != "x"
2274 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
2276 if test "x$JAVA_CFLAGS" != "x"
2278 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
2280 if test "x$JAVA_LDFLAGS" != "x"
2282 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
2284 if test "x$JAVAC" = "x"
2286 with_javac_path="$PATH"
2287 if test "x$with_java_home" != "x"
2289 with_javac_path="$with_java_home:with_javac_path"
2290 if test -d "$with_java_home/bin"
2292 with_javac_path="$with_java_home/bin:with_javac_path"
2296 AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path")
2298 if test "x$JAVAC" = "x"
2300 with_java="no (javac not found)"
2302 if test "x$JAR" = "x"
2304 with_jar_path="$PATH"
2305 if test "x$with_java_home" != "x"
2307 with_jar_path="$with_java_home:$with_jar_path"
2308 if test -d "$with_java_home/bin"
2310 with_jar_path="$with_java_home/bin:$with_jar_path"
2314 AC_PATH_PROG(JAR, jar, [], "$with_jar_path")
2316 if test "x$JAR" = "x"
2318 with_java="no (jar not found)"
2321 SAVE_CPPFLAGS="$CPPFLAGS"
2322 SAVE_CFLAGS="$CFLAGS"
2323 SAVE_LDFLAGS="$LDFLAGS"
2324 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
2325 CFLAGS="$CFLAGS $JAVA_CFLAGS"
2326 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
2328 if test "x$with_java" = "xyes"
2330 AC_CHECK_HEADERS(jni.h, [], [with_java="no (jni.h not found)"])
2332 if test "x$with_java" = "xyes"
2334 AC_CHECK_LIB(jvm, JNI_CreateJavaVM,
2336 [with_java="no (libjvm not found)"],
2339 if test "x$with_java" = "xyes"
2341 JAVA_LIBS="$JAVA_LIBS -ljvm"
2342 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
2345 CPPFLAGS="$SAVE_CPPFLAGS"
2346 CFLAGS="$SAVE_CFLAGS"
2347 LDFLAGS="$SAVE_LDFLAGS"
2349 AC_SUBST(JAVA_CPPFLAGS)
2350 AC_SUBST(JAVA_CFLAGS)
2351 AC_SUBST(JAVA_LDFLAGS)
2353 AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
2356 # --with-liblvm2app {{{
2357 with_liblvm2app_cppflags=""
2358 with_liblvm2app_ldflags=""
2359 AC_ARG_WITH(liblvm2app, [AS_HELP_STRING([--with-liblvm2app@<:@=PREFIX@:>@], [Path to liblvm2app.])],
2361 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2363 with_liblvm2app_cppflags="-I$withval/include"
2364 with_liblvm2app_ldflags="-L$withval/lib"
2365 with_liblvm2app="yes"
2367 with_liblvm2app="$withval"
2371 with_liblvm2app="yes"
2373 if test "x$with_liblvm2app" = "xyes"
2375 SAVE_CPPFLAGS="$CPPFLAGS"
2376 CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
2378 AC_CHECK_HEADERS(lvm2app.h, [with_liblvm2app="yes"], [with_liblvm2app="no (lvm2app.h not found)"])
2380 CPPFLAGS="$SAVE_CPPFLAGS"
2383 if test "x$with_liblvm2app" = "xyes"
2385 SAVE_CPPFLAGS="$CPPFLAGS"
2386 SAVE_LDFLAGS="$LDFLAGS"
2387 CPPFLAGS="$CPPFLAGS $with_liblvm2app_cppflags"
2388 LDFLAGS="$LDFLAGS $with_liblvm2app_ldflags"
2390 AC_CHECK_LIB(lvm2app, lvm_init, [with_liblvm2app="yes"], [with_liblvm2app="no (Symbol 'lvm_init' not found)"])
2392 CPPFLAGS="$SAVE_CPPFLAGS"
2393 LDFLAGS="$SAVE_LDFLAGS"
2395 if test "x$with_liblvm2app" = "xyes"
2397 BUILD_WITH_LIBLVM2APP_CPPFLAGS="$with_liblvm2app_cppflags"
2398 BUILD_WITH_LIBLVM2APP_LDFLAGS="$with_liblvm2app_ldflags"
2399 BUILD_WITH_LIBLVM2APP_LIBS="-llvm2app"
2400 AC_SUBST(BUILD_WITH_LIBLVM2APP_CPPFLAGS)
2401 AC_SUBST(BUILD_WITH_LIBLVM2APP_LDFLAGS)
2402 AC_SUBST(BUILD_WITH_LIBLVM2APP_LIBS)
2403 AC_DEFINE(HAVE_LIBLVM2APP, 1, [Define if liblvm2app is present and usable.])
2405 AM_CONDITIONAL(BUILD_WITH_LIBLVM2APP, test "x$with_liblvm2app" = "xyes")
2408 # --with-libmemcached {{{
2409 with_libmemcached_cppflags=""
2410 with_libmemcached_ldflags=""
2411 AC_ARG_WITH(libmemcached, [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
2413 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2415 with_libmemcached_cppflags="-I$withval/include"
2416 with_libmemcached_ldflags="-L$withval/lib"
2417 with_libmemcached="yes"
2419 with_libmemcached="$withval"
2423 with_libmemcached="yes"
2425 if test "x$with_libmemcached" = "xyes"
2427 SAVE_CPPFLAGS="$CPPFLAGS"
2428 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
2430 AC_CHECK_HEADERS(libmemcached/memcached.h, [with_libmemcached="yes"], [with_libmemcached="no (libmemcached/memcached.h not found)"])
2432 CPPFLAGS="$SAVE_CPPFLAGS"
2434 if test "x$with_libmemcached" = "xyes"
2436 SAVE_CPPFLAGS="$CPPFLAGS"
2437 SAVE_LDFLAGS="$LDFLAGS"
2438 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
2439 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
2441 AC_CHECK_LIB(memcached, memcached_create, [with_libmemcached="yes"], [with_libmemcached="no (Symbol 'memcached_create' not found)"])
2443 CPPFLAGS="$SAVE_CPPFLAGS"
2444 LDFLAGS="$SAVE_LDFLAGS"
2446 if test "x$with_libmemcached" = "xyes"
2448 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
2449 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
2450 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
2451 AC_SUBST(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
2452 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
2453 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LIBS)
2454 AC_DEFINE(HAVE_LIBMEMCACHED, 1, [Define if libmemcached is present and usable.])
2456 AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
2459 # --with-libmodbus {{{
2460 with_libmodbus_config=""
2461 with_libmodbus_cflags=""
2462 with_libmodbus_libs=""
2463 AC_ARG_WITH(libmodbus, [AS_HELP_STRING([--with-libmodbus@<:@=PREFIX@:>@], [Path to the modbus library.])],
2465 if test "x$withval" = "xno"
2468 else if test "x$withval" = "xyes"
2470 with_libmodbus="use_pkgconfig"
2471 else if test -d "$with_libmodbus/lib"
2473 AC_MSG_NOTICE([Not checking for libmodbus: Manually configured])
2474 with_libmodbus_cflags="-I$withval/include"
2475 with_libmodbus_libs="-L$withval/lib -lmodbus"
2476 with_libmodbus="yes"
2479 [with_libmodbus="use_pkgconfig"])
2481 # configure using pkg-config
2482 if test "x$with_libmodbus" = "xuse_pkgconfig"
2484 if test "x$PKG_CONFIG" = "x"
2486 with_libmodbus="no (Don't have pkg-config)"
2489 if test "x$with_libmodbus" = "xuse_pkgconfig"
2491 AC_MSG_NOTICE([Checking for libmodbus using $PKG_CONFIG])
2492 $PKG_CONFIG --exists 'libmodbus' 2>/dev/null
2495 with_libmodbus="no (pkg-config doesn't know libmodbus)"
2498 if test "x$with_libmodbus" = "xuse_pkgconfig"
2500 with_libmodbus_cflags="`$PKG_CONFIG --cflags 'libmodbus'`"
2503 with_libmodbus="no ($PKG_CONFIG failed)"
2505 with_libmodbus_libs="`$PKG_CONFIG --libs 'libmodbus'`"
2508 with_libmodbus="no ($PKG_CONFIG failed)"
2511 if test "x$with_libmodbus" = "xuse_pkgconfig"
2513 with_libmodbus="yes"
2516 # with_libmodbus_cflags and with_libmodbus_libs are set up now, let's do
2517 # the actual checks.
2518 if test "x$with_libmodbus" = "xyes"
2520 SAVE_CPPFLAGS="$CPPFLAGS"
2521 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
2523 AC_CHECK_HEADERS(modbus.h, [], [with_libmodbus="no (modbus.h not found)"])
2525 CPPFLAGS="$SAVE_CPPFLAGS"
2527 if test "x$with_libmodbus" = "xyes"
2529 SAVE_CPPFLAGS="$CPPFLAGS"
2530 SAVE_LDFLAGS="$LDFLAGS"
2532 CPPFLAGS="$CPPFLAGS $with_libmodbus_cflags"
2533 LDFLAGS="$LDFLAGS $with_libmodbus_libs"
2535 AC_CHECK_LIB(modbus, modbus_connect,
2536 [with_libmodbus="yes"],
2537 [with_libmodbus="no (symbol modbus_connect not found)"])
2539 CPPFLAGS="$SAVE_CPPFLAGS"
2540 LDFLAGS="$SAVE_LDFLAGS"
2542 if test "x$with_libmodbus" = "xyes"
2544 BUILD_WITH_LIBMODBUS_CFLAGS="$with_libmodbus_cflags"
2545 BUILD_WITH_LIBMODBUS_LIBS="$with_libmodbus_libs"
2546 AC_SUBST(BUILD_WITH_LIBMODBUS_CFLAGS)
2547 AC_SUBST(BUILD_WITH_LIBMODBUS_LIBS)
2551 # --with-libmongoc {{{
2552 AC_ARG_WITH(libmongoc, [AS_HELP_STRING([--with-libmongoc@<:@=PREFIX@:>@], [Path to libmongoc.])],
2554 if test "x$withval" = "xyes"
2556 with_libmongoc="yes"
2557 else if test "x$withval" = "xno"
2561 with_libmongoc="yes"
2562 LIBMONGOC_CPPFLAGS="$LIBMONGOC_CPPFLAGS -I$withval/include"
2563 LIBMONGOC_LDFLAGS="$LIBMONGOC_LDFLAGS -L$withval/lib"
2566 [with_libmongoc="yes"])
2568 SAVE_CPPFLAGS="$CPPFLAGS"
2569 SAVE_LDFLAGS="$LDFLAGS"
2571 CPPFLAGS="$CPPFLAGS $LIBMONGOC_CPPFLAGS"
2572 LDFLAGS="$LDFLAGS $LIBMONGOC_LDFLAGS"
2574 if test "x$with_libmongoc" = "xyes"
2576 if test "x$LIBMONGOC_CPPFLAGS" != "x"
2578 AC_MSG_NOTICE([libmongoc CPPFLAGS: $LIBMONGOC_CPPFLAGS])
2580 AC_CHECK_HEADERS(mongo.h,
2581 [with_libmongoc="yes"],
2582 [with_libmongoc="no ('mongo.h' not found)"],
2584 # define MONGO_HAVE_STDINT 1
2586 # define MONGO_USE_LONG_LONG_INT 1
2590 if test "x$with_libmongoc" = "xyes"
2592 if test "x$LIBMONGOC_LDFLAGS" != "x"
2594 AC_MSG_NOTICE([libmongoc LDFLAGS: $LIBMONGOC_LDFLAGS])
2596 AC_CHECK_LIB(mongoc, mongo_run_command,
2597 [with_libmongoc="yes"],
2598 [with_libmongoc="no (symbol 'mongo_run_command' not found)"])
2601 CPPFLAGS="$SAVE_CPPFLAGS"
2602 LDFLAGS="$SAVE_LDFLAGS"
2604 if test "x$with_libmongoc" = "xyes"
2606 BUILD_WITH_LIBMONGOC_CPPFLAGS="$LIBMONGOC_CPPFLAGS"
2607 BUILD_WITH_LIBMONGOC_LDFLAGS="$LIBMONGOC_LDFLAGS"
2608 AC_SUBST(BUILD_WITH_LIBMONGOC_CPPFLAGS)
2609 AC_SUBST(BUILD_WITH_LIBMONGOC_LDFLAGS)
2611 AM_CONDITIONAL(BUILD_WITH_LIBMONGOC, test "x$with_libmongoc" = "xyes")
2614 # --with-libmysql {{{
2615 with_mysql_config="mysql_config"
2616 with_mysql_cflags=""
2618 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
2620 if test "x$withval" = "xno"
2623 else if test "x$withval" = "xyes"
2627 if test -f "$withval" && test -x "$withval";
2629 with_mysql_config="$withval"
2630 else if test -x "$withval/bin/mysql_config"
2632 with_mysql_config="$withval/bin/mysql_config"
2640 if test "x$with_libmysql" = "xyes"
2642 with_mysql_cflags=`$with_mysql_config --include 2>/dev/null`
2643 mysql_config_status=$?
2645 if test $mysql_config_status -ne 0
2647 with_libmysql="no ($with_mysql_config failed)"
2649 SAVE_CPPFLAGS="$CPPFLAGS"
2650 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
2653 have_mysql_mysql_h="no"
2654 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
2656 if test "x$have_mysql_h" = "xno"
2658 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
2661 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
2663 with_libmysql="no (mysql.h not found)"
2666 CPPFLAGS="$SAVE_CPPFLAGS"
2669 if test "x$with_libmysql" = "xyes"
2671 with_mysql_libs=`$with_mysql_config --libs_r 2>/dev/null`
2672 mysql_config_status=$?
2674 if test $mysql_config_status -ne 0
2676 with_libmysql="no ($with_mysql_config failed)"
2678 SAVE_CPPFLAGS="$CPPFLAGS"
2679 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
2681 LIBS="$with_mysql_libs"
2682 AC_SEARCH_LIBS([mysql_get_server_version],
2684 [with_libmysql="yes"],
2685 [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
2687 CPPFLAGS="$SAVE_CPPFLAGS"
2691 if test "x$with_libmysql" = "xyes"
2693 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
2694 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
2695 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
2696 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
2698 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
2702 with_libmnl_cflags=""
2704 AC_ARG_WITH(libmnl, [AS_HELP_STRING([--with-libmnl@<:@=PREFIX@:>@], [Path to libmnl.])],
2706 echo "libmnl: withval = $withval"
2707 if test "x$withval" = "xyes"
2710 else if test "x$withval" = "xno"
2714 if test -d "$withval/include"
2716 with_libmnl_cflags="-I$withval/include"
2717 with_libmnl_libs="-L$withval/lib -lmnl"
2720 AC_MSG_ERROR("no such directory: $withval/include")
2725 if test "x$ac_system" = "xLinux"
2729 with_libmnl="no (Linux only library)"
2732 if test "x$PKG_CONFIG" = "x"
2734 with_libmnl="no (Don't have pkg-config)"
2736 if test "x$with_libmnl" = "xyes"
2738 if $PKG_CONFIG --exists libmnl 2>/dev/null; then
2739 with_libmnl_cflags="$with_libmnl_ldflags `$PKG_CONFIG --cflags libmnl`"
2740 with_libmnl_libs="$with_libmnl_libs `$PKG_CONFIG --libs libmnl`"
2743 AC_CHECK_HEADERS(libmnl.h libmnl/libmnl.h,
2749 #include <sys/types.h>
2750 #include <asm/types.h>
2751 #include <sys/socket.h>
2752 #include <linux/netlink.h>
2753 #include <linux/rtnetlink.h>])
2754 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
2756 #include <sys/types.h>
2757 #include <asm/types.h>
2758 #include <sys/socket.h>])
2760 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
2763 #include <sys/types.h>
2764 #include <asm/types.h>
2765 #include <sys/socket.h>
2766 #include <linux/netlink.h>
2767 #include <linux/rtnetlink.h>
2770 int retval = TCA_STATS2;
2774 [AC_DEFINE([HAVE_TCA_STATS2], [1], [True if the enum-member TCA_STATS2 exists])])
2776 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
2779 #include <sys/types.h>
2780 #include <asm/types.h>
2781 #include <sys/socket.h>
2782 #include <linux/netlink.h>
2783 #include <linux/rtnetlink.h>
2786 int retval = TCA_STATS;
2790 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])])
2792 if test "x$with_libmnl" = "xyes"
2794 AC_CHECK_LIB(mnl, mnl_nlmsg_get_payload,
2795 [with_libmnl="yes"],
2796 [with_libmnl="no (symbol 'mnl_nlmsg_get_payload' not found)"],
2797 [$with_libmnl_libs])
2799 if test "x$with_libmnl" = "xyes"
2801 AC_DEFINE(HAVE_LIBMNL, 1, [Define if libmnl is present and usable.])
2802 BUILD_WITH_LIBMNL_CFLAGS="$with_libmnl_cflags"
2803 BUILD_WITH_LIBMNL_LIBS="$with_libmnl_libs"
2804 AC_SUBST(BUILD_WITH_LIBMNL_CFLAGS)
2805 AC_SUBST(BUILD_WITH_LIBMNL_LIBS)
2807 AM_CONDITIONAL(BUILD_WITH_LIBMNL, test "x$with_libmnl" = "xyes")
2810 # --with-libnetapp {{{
2811 AC_ARG_VAR([LIBNETAPP_CPPFLAGS], [C preprocessor flags required to build with libnetapp])
2812 AC_ARG_VAR([LIBNETAPP_LDFLAGS], [Linker flags required to build with libnetapp])
2813 AC_ARG_VAR([LIBNETAPP_LIBS], [Other libraries required to link against libnetapp])
2814 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS"
2815 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS"
2816 LIBNETAPP_LIBS="$LIBNETAPP_LIBS"
2817 AC_ARG_WITH(libnetapp, [AS_HELP_STRING([--with-libnetapp@<:@=PREFIX@:>@], [Path to libnetapp.])],
2819 if test -d "$withval"
2821 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS -I$withval/include"
2822 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS -L$withval/lib"
2823 with_libnetapp="yes"
2825 with_libnetapp="$withval"
2829 with_libnetapp="yes"
2832 SAVE_CPPFLAGS="$CPPFLAGS"
2833 SAVE_LDFLAGS="$LDFLAGS"
2834 CPPFLAGS="$CPPFLAGS $LIBNETAPP_CPPFLAGS"
2835 LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
2837 if test "x$with_libnetapp" = "xyes"
2839 if test "x$LIBNETAPP_CPPFLAGS" != "x"
2841 AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
2843 AC_CHECK_HEADERS(netapp_api.h,
2844 [with_libnetapp="yes"],
2845 [with_libnetapp="no (netapp_api.h not found)"])
2848 if test "x$with_libnetapp" = "xyes"
2850 if test "x$LIBNETAPP_LDFLAGS" != "x"
2852 AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
2855 if test "x$LIBNETAPP_LIBS" = "x"
2857 LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm -lcrypto -lz"
2859 AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
2861 AC_CHECK_LIB(netapp, na_server_invoke_elem,
2862 [with_libnetapp="yes"],
2863 [with_libnetapp="no (symbol na_server_invoke_elem not found)"],
2865 LIBNETAPP_LIBS="-lnetapp $LIBNETAPP_LIBS"
2868 CPPFLAGS="$SAVE_CPPFLAGS"
2869 LDFLAGS="$SAVE_LDFLAGS"
2871 if test "x$with_libnetapp" = "xyes"
2873 AC_DEFINE(HAVE_LIBNETAPP, 1, [Define to 1 if you have the netapp library (-lnetapp).])
2876 AC_SUBST(LIBNETAPP_CPPFLAGS)
2877 AC_SUBST(LIBNETAPP_LDFLAGS)
2878 AC_SUBST(LIBNETAPP_LIBS)
2879 AM_CONDITIONAL(BUILD_WITH_LIBNETAPP, test "x$with_libnetapp" = "xyes")
2882 # --with-libnetsnmp {{{
2883 with_snmp_config="net-snmp-config"
2886 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
2888 if test "x$withval" = "xno"
2890 with_libnetsnmp="no"
2891 else if test "x$withval" = "xyes"
2893 with_libnetsnmp="yes"
2895 if test -x "$withval"
2897 with_snmp_config="$withval"
2898 with_libnetsnmp="yes"
2900 with_snmp_config="$withval/bin/net-snmp-config"
2901 with_libnetsnmp="yes"
2905 [with_libnetsnmp="yes"])
2906 if test "x$with_libnetsnmp" = "xyes"
2908 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
2909 snmp_config_status=$?
2911 if test $snmp_config_status -ne 0
2913 with_libnetsnmp="no ($with_snmp_config failed)"
2915 SAVE_CPPFLAGS="$CPPFLAGS"
2916 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
2918 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
2920 CPPFLAGS="$SAVE_CPPFLAGS"
2923 if test "x$with_libnetsnmp" = "xyes"
2925 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
2926 snmp_config_status=$?
2928 if test $snmp_config_status -ne 0
2930 with_libnetsnmp="no ($with_snmp_config failed)"
2932 AC_CHECK_LIB(netsnmp, init_snmp,
2933 [with_libnetsnmp="yes"],
2934 [with_libnetsnmp="no (libnetsnmp not found)"],
2938 if test "x$with_libnetsnmp" = "xyes"
2940 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
2941 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
2942 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
2943 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
2945 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
2948 # --with-liboconfig {{{
2949 with_own_liboconfig="no"
2950 liboconfig_LDFLAGS="$LDFLAGS"
2951 liboconfig_CPPFLAGS="$CPPFLAGS"
2952 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
2954 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2956 if test -d "$withval/lib"
2958 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
2960 if test -d "$withval/include"
2962 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
2965 if test "x$withval" = "xno"
2967 AC_MSG_ERROR("liboconfig is required")
2971 with_liboconfig="yes"
2974 save_LDFLAGS="$LDFLAGS"
2975 save_CPPFLAGS="$CPPFLAGS"
2976 LDFLAGS="$liboconfig_LDFLAGS"
2977 CPPFLAGS="$liboconfig_CPPFLAGS"
2978 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
2980 with_liboconfig="yes"
2981 with_own_liboconfig="no"
2984 with_liboconfig="yes"
2985 with_own_liboconfig="yes"
2986 LDFLAGS="$save_LDFLAGS"
2987 CPPFLAGS="$save_CPPFLAGS"
2990 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
2991 if test "x$with_own_liboconfig" = "xyes"
2993 with_liboconfig="yes (shipped version)"
2997 # --with-liboping {{{
2998 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
3000 if test "x$withval" = "xyes"
3003 else if test "x$withval" = "xno"
3008 LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS -I$withval/include"
3009 LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS -L$withval/lib"
3012 [with_liboping="yes"])
3014 SAVE_CPPFLAGS="$CPPFLAGS"
3015 SAVE_LDFLAGS="$LDFLAGS"
3017 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
3018 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
3020 if test "x$with_liboping" = "xyes"
3022 if test "x$LIBOPING_CPPFLAGS" != "x"
3024 AC_MSG_NOTICE([liboping CPPFLAGS: $LIBOPING_CPPFLAGS])
3026 AC_CHECK_HEADERS(oping.h,
3027 [with_liboping="yes"],
3028 [with_liboping="no (oping.h not found)"])
3030 if test "x$with_liboping" = "xyes"
3032 if test "x$LIBOPING_LDFLAGS" != "x"
3034 AC_MSG_NOTICE([liboping LDFLAGS: $LIBOPING_LDFLAGS])
3036 AC_CHECK_LIB(oping, ping_construct,
3037 [with_liboping="yes"],
3038 [with_liboping="no (symbol 'ping_construct' not found)"])
3041 CPPFLAGS="$SAVE_CPPFLAGS"
3042 LDFLAGS="$SAVE_LDFLAGS"
3044 if test "x$with_liboping" = "xyes"
3046 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
3047 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
3048 AC_SUBST(BUILD_WITH_LIBOPING_CPPFLAGS)
3049 AC_SUBST(BUILD_WITH_LIBOPING_LDFLAGS)
3051 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
3055 with_oracle_cppflags=""
3057 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
3059 if test "x$withval" = "xyes"
3061 if test "x$ORACLE_HOME" = "x"
3063 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
3066 else if test "x$withval" = "xno"
3071 ORACLE_HOME="$withval"
3075 if test "x$ORACLE_HOME" = "x"
3077 with_oracle="no (ORACLE_HOME is not set)"
3082 if test "x$ORACLE_HOME" != "x"
3084 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
3086 if test -e "$ORACLE_HOME/lib/ldflags"
3088 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
3090 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
3091 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
3093 if test "x$with_oracle" = "xyes"
3095 SAVE_CPPFLAGS="$CPPFLAGS"
3096 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
3098 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
3100 CPPFLAGS="$SAVE_CPPFLAGS"
3102 if test "x$with_oracle" = "xyes"
3104 SAVE_CPPFLAGS="$CPPFLAGS"
3106 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
3107 LIBS="$LIBS $with_oracle_libs"
3109 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
3111 CPPFLAGS="$SAVE_CPPFLAGS"
3114 if test "x$with_oracle" = "xyes"
3116 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
3117 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
3118 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
3119 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
3123 # --with-libowcapi {{{
3124 with_libowcapi_cppflags=""
3125 with_libowcapi_libs="-lowcapi"
3126 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
3128 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3130 with_libowcapi_cppflags="-I$withval/include"
3131 with_libowcapi_libs="-L$withval/lib -lowcapi"
3132 with_libowcapi="yes"
3134 with_libowcapi="$withval"
3138 with_libowcapi="yes"
3140 if test "x$with_libowcapi" = "xyes"
3142 SAVE_CPPFLAGS="$CPPFLAGS"
3143 CPPFLAGS="$with_libowcapi_cppflags"
3145 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
3147 CPPFLAGS="$SAVE_CPPFLAGS"
3149 if test "x$with_libowcapi" = "xyes"
3151 SAVE_LDFLAGS="$LDFLAGS"
3152 SAVE_CPPFLAGS="$CPPFLAGS"
3153 LDFLAGS="$with_libowcapi_libs"
3154 CPPFLAGS="$with_libowcapi_cppflags"
3156 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
3158 LDFLAGS="$SAVE_LDFLAGS"
3159 CPPFLAGS="$SAVE_CPPFLAGS"
3161 if test "x$with_libowcapi" = "xyes"
3163 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
3164 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
3165 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
3166 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
3170 # --with-libpcap {{{
3171 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
3173 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3175 LDFLAGS="$LDFLAGS -L$withval/lib"
3176 CPPFLAGS="$CPPFLAGS -I$withval/include"
3179 with_libpcap="$withval"
3185 if test "x$with_libpcap" = "xyes"
3187 AC_CHECK_LIB(pcap, pcap_open_live,
3189 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
3190 ], [with_libpcap="no (libpcap not found)"])
3192 if test "x$with_libpcap" = "xyes"
3194 AC_CHECK_HEADERS(pcap.h,,
3195 [with_libpcap="no (pcap.h not found)"])
3197 if test "x$with_libpcap" = "xyes"
3199 AC_CACHE_CHECK([whether libpcap has PCAP_ERROR_IFACE_NOT_UP],
3200 [c_cv_libpcap_have_pcap_error_iface_not_up],
3201 AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
3206 int val = PCAP_ERROR_IFACE_NOT_UP;
3210 [c_cv_libpcap_have_pcap_error_iface_not_up="yes"],
3211 [c_cv_libpcap_have_pcap_error_iface_not_up="no"]))
3213 if test "x$c_cv_libpcap_have_pcap_error_iface_not_up" != "xyes"
3215 with_libpcap="no (pcap.h misses PCAP_ERROR_IFACE_NOT_UP)"
3217 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
3220 # --with-libperl {{{
3221 perl_interpreter="perl"
3222 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
3224 if test -f "$withval" && test -x "$withval"
3226 perl_interpreter="$withval"
3228 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
3230 LDFLAGS="$LDFLAGS -L$withval/lib"
3231 CPPFLAGS="$CPPFLAGS -I$withval/include"
3232 perl_interpreter="$withval/bin/perl"
3235 with_libperl="$withval"
3242 AC_MSG_CHECKING([for perl])
3243 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
3244 if test -x "$perl_interpreter"
3246 AC_MSG_RESULT([yes ($perl_interpreter)])
3252 AC_SUBST(PERL, "$perl_interpreter")
3254 if test "x$with_libperl" = "xyes" \
3255 && test -n "$perl_interpreter"
3257 SAVE_CFLAGS="$CFLAGS"
3259 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
3260 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
3261 PERL_LIBS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
3262 CFLAGS="$CFLAGS $PERL_CFLAGS"
3263 LIBS="$LIBS $PERL_LIBS"
3265 AC_CACHE_CHECK([for libperl],
3266 [c_cv_have_libperl],
3267 AC_LINK_IFELSE([AC_LANG_PROGRAM(
3269 #define PERL_NO_GET_CONTEXT
3276 load_module (PERL_LOADMOD_NOIMPORT,
3277 newSVpv ("Collectd::Plugin::FooBar", 24),
3281 [c_cv_have_libperl="yes"],
3282 [c_cv_have_libperl="no"]
3286 if test "x$c_cv_have_libperl" = "xyes"
3288 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
3289 AC_SUBST(PERL_CFLAGS)
3295 CFLAGS="$SAVE_CFLAGS"
3297 else if test -z "$perl_interpreter"; then
3298 with_libperl="no (no perl interpreter found)"
3299 c_cv_have_libperl="no"
3301 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
3303 if test "x$with_libperl" = "xyes"
3305 SAVE_CFLAGS="$CFLAGS"
3307 CFLAGS="$CFLAGS $PERL_CFLAGS"
3308 LIBS="$LIBS $PERL_LIBS"
3310 AC_CACHE_CHECK([if perl supports ithreads],
3311 [c_cv_have_perl_ithreads],
3312 AC_LINK_IFELSE([AC_LANG_PROGRAM(
3318 #if !defined(USE_ITHREADS)
3319 # error "Perl does not support ithreads!"
3320 #endif /* !defined(USE_ITHREADS) */
3324 [c_cv_have_perl_ithreads="yes"],
3325 [c_cv_have_perl_ithreads="no"]
3329 if test "x$c_cv_have_perl_ithreads" = "xyes"
3331 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
3334 CFLAGS="$SAVE_CFLAGS"
3338 if test "x$with_libperl" = "xyes"
3340 SAVE_CFLAGS="$CFLAGS"
3342 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
3343 # (see issues #41 and #42)
3344 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
3345 LIBS="$LIBS $PERL_LIBS"
3347 AC_CACHE_CHECK([for broken Perl_load_module()],
3348 [c_cv_have_broken_perl_load_module],
3349 AC_LINK_IFELSE([AC_LANG_PROGRAM(
3351 #define PERL_NO_GET_CONTEXT
3358 load_module (PERL_LOADMOD_NOIMPORT,
3359 newSVpv ("Collectd::Plugin::FooBar", 24),
3363 [c_cv_have_broken_perl_load_module="no"],
3364 [c_cv_have_broken_perl_load_module="yes"]
3368 CFLAGS="$SAVE_CFLAGS"
3371 AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
3372 test "x$c_cv_have_broken_perl_load_module" = "xyes")
3374 if test "x$with_libperl" = "xyes"
3376 SAVE_CFLAGS="$CFLAGS"
3378 CFLAGS="$CFLAGS $PERL_CFLAGS"
3379 LIBS="$LIBS $PERL_LIBS"
3382 [struct mgvtbl.svt_local],
3383 [have_struct_mgvtbl_svt_local="yes"],
3384 [have_struct_mgvtbl_svt_local="no"],
3391 if test "x$have_struct_mgvtbl_svt_local" = "xyes"
3393 AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
3394 [Define if Perl's struct mgvtbl has member svt_local.])
3397 CFLAGS="$SAVE_CFLAGS"
3403 with_pg_config="pg_config"
3404 with_libpq_includedir=""
3405 with_libpq_libdir=""
3406 with_libpq_cppflags=""
3407 with_libpq_ldflags=""
3408 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
3411 if test "x$withval" = "xno"
3414 else if test "x$withval" = "xyes"
3418 if test -f "$withval" && test -x "$withval";
3420 with_pg_config="$withval"
3421 else if test -x "$withval/bin/pg_config"
3423 with_pg_config="$withval/bin/pg_config"
3431 if test "x$with_libpq" = "xyes"
3433 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
3436 if test $pg_config_status -eq 0
3438 if test -n "$with_libpq_includedir"; then
3439 for dir in $with_libpq_includedir; do
3440 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
3444 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
3447 SAVE_CPPFLAGS="$CPPFLAGS"
3448 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
3450 AC_CHECK_HEADERS(libpq-fe.h, [],
3451 [with_libpq="no (libpq-fe.h not found)"], [])
3453 CPPFLAGS="$SAVE_CPPFLAGS"
3455 if test "x$with_libpq" = "xyes"
3457 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
3460 if test $pg_config_status -eq 0
3462 if test -n "$with_libpq_libdir"; then
3463 for dir in $with_libpq_libdir; do
3464 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
3468 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
3471 SAVE_LDFLAGS="$LDFLAGS"
3472 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
3474 AC_CHECK_LIB(pq, PQconnectdb,
3476 [with_libpq="no (symbol 'PQconnectdb' not found)"])
3478 AC_CHECK_LIB(pq, PQserverVersion,
3480 [with_libpq="no (symbol 'PQserverVersion' not found)"])
3482 LDFLAGS="$SAVE_LDFLAGS"
3484 if test "x$with_libpq" = "xyes"
3486 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
3487 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
3488 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
3489 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
3491 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
3494 # --with-libpthread {{{
3495 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
3496 [ if test "x$withval" != "xno" \
3497 && test "x$withval" != "xyes"
3499 LDFLAGS="$LDFLAGS -L$withval/lib"
3500 CPPFLAGS="$CPPFLAGS -I$withval/include"
3501 with_libpthread="yes"
3503 if test "x$withval" = "xno"
3505 with_libpthread="no (disabled)"
3508 ], [with_libpthread="yes"])
3509 if test "x$with_libpthread" = "xyes"
3511 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
3514 if test "x$with_libpthread" = "xyes"
3516 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
3518 if test "x$with_libpthread" = "xyes"
3524 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
3525 [Wether or not to use pthread (POSIX threads) library])
3526 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
3531 with_python_path="$PATH"
3532 AC_ARG_WITH(python, [AS_HELP_STRING([--with-python@<:@=PREFIX@:>@], [Path to the python interpreter.])],
3534 if test "x$withval" = "xyes" || test "x$withval" = "xno"
3536 with_python="$withval"
3537 else if test -x "$withval"
3539 with_python_prog="$withval"
3540 with_python_path="`dirname \"$withval\"`$PATH_SEPARATOR$with_python_path"
3542 else if test -d "$withval"
3544 with_python_path="$withval$PATH_SEPARATOR$with_python_path"
3547 AC_MSG_WARN([Argument not recognized: $withval])
3549 ], [with_python="yes"])
3552 SAVE_CPPFLAGS="$CPPFLAGS"
3553 SAVE_LDFLAGS="$LDFLAGS"
3556 PATH="$with_python_path"
3558 if test "x$with_python" = "xyes" && test "x$with_python_prog" = "x"
3560 AC_MSG_CHECKING([for python])
3561 with_python_prog="`which python 2>/dev/null`"
3562 if test "x$with_python_prog" = "x"
3564 AC_MSG_RESULT([not found])
3565 with_python="no (interpreter not found)"
3567 AC_MSG_RESULT([$with_python_prog])
3571 if test "x$with_python" = "xyes"
3573 AC_MSG_CHECKING([for Python CPPFLAGS])
3574 python_include_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_python_inc())" | "$with_python_prog" 2>&1`
3575 python_config_status=$?
3577 if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x"
3579 AC_MSG_RESULT([failed with status $python_config_status (output: $python_include_path)])
3582 AC_MSG_RESULT([$python_include_path])
3586 if test "x$with_python" = "xyes"
3588 CPPFLAGS="-I$python_include_path $CPPFLAGS"
3589 AC_CHECK_HEADERS(Python.h,
3590 [with_python="yes"],
3591 [with_python="no ('Python.h' not found)"])
3594 if test "x$with_python" = "xyes"
3596 AC_MSG_CHECKING([for Python LDFLAGS])
3597 python_library_path=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0))" | "$with_python_prog" 2>&1`
3598 python_config_status=$?
3600 if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x"
3602 AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_path)])
3605 AC_MSG_RESULT([$python_library_path])
3609 if test "x$with_python" = "xyes"
3611 AC_MSG_CHECKING([for Python LIBS])
3612 python_library_flags=`echo "import distutils.sysconfig;import sys;sys.stdout.write(distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0))" | "$with_python_prog" 2>&1`
3613 python_config_status=$?
3615 if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
3617 AC_MSG_RESULT([failed with status $python_config_status (output: $python_library_flags)])
3620 AC_MSG_RESULT([$python_library_flags])
3624 if test "x$with_python" = "xyes"
3626 LDFLAGS="-L$python_library_path $LDFLAGS"
3627 LIBS="$python_library_flags $LIBS"
3629 AC_CHECK_FUNC(PyObject_CallFunction,
3630 [with_python="yes"],
3631 [with_python="no (Symbol 'PyObject_CallFunction' not found)"])
3635 CPPFLAGS="$SAVE_CPPFLAGS"
3636 LDFLAGS="$SAVE_LDFLAGS"
3639 if test "x$with_python" = "xyes"
3641 BUILD_WITH_PYTHON_CPPFLAGS="-I$python_include_path"
3642 BUILD_WITH_PYTHON_LDFLAGS="-L$python_library_path"
3643 BUILD_WITH_PYTHON_LIBS="$python_library_flags"
3644 AC_SUBST(BUILD_WITH_PYTHON_CPPFLAGS)
3645 AC_SUBST(BUILD_WITH_PYTHON_LDFLAGS)
3646 AC_SUBST(BUILD_WITH_PYTHON_LIBS)
3650 # --with-librabbitmq {{{
3651 with_librabbitmq_cppflags=""
3652 with_librabbitmq_ldflags=""
3653 AC_ARG_WITH(librabbitmq, [AS_HELP_STRING([--with-librabbitmq@<:@=PREFIX@:>@], [Path to librabbitmq.])],
3655 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3657 with_librabbitmq_cppflags="-I$withval/include"
3658 with_librabbitmq_ldflags="-L$withval/lib"
3659 with_librabbitmq="yes"
3661 with_librabbitmq="$withval"
3665 with_librabbitmq="yes"
3667 SAVE_CPPFLAGS="$CPPFLAGS"
3668 SAVE_LDFLAGS="$LDFLAGS"
3669 CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
3670 LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags"
3671 if test "x$with_librabbitmq" = "xyes"
3673 AC_CHECK_HEADERS(amqp.h, [with_librabbitmq="yes"], [with_librabbitmq="no (amqp.h not found)"])
3675 if test "x$with_librabbitmq" = "xyes"
3677 # librabbitmq up to version 0.9.1 provides "library_errno", later
3678 # versions use "library_error". The library does not provide a version
3679 # macro :( Use "AC_CHECK_MEMBERS" (plural) for automatic defines.
3680 AC_CHECK_MEMBERS([amqp_rpc_reply_t.library_errno],,,
3683 # include <stdlib.h>
3689 # include <stdint.h>
3692 # include <inttypes.h>
3697 if test "x$with_librabbitmq" = "xyes"
3699 AC_CHECK_LIB(rabbitmq, amqp_basic_publish, [with_librabbitmq="yes"], [with_librabbitmq="no (Symbol 'amqp_basic_publish' not found)"])
3701 if test "x$with_librabbitmq" = "xyes"
3703 BUILD_WITH_LIBRABBITMQ_CPPFLAGS="$with_librabbitmq_cppflags"
3704 BUILD_WITH_LIBRABBITMQ_LDFLAGS="$with_librabbitmq_ldflags"
3705 BUILD_WITH_LIBRABBITMQ_LIBS="-lrabbitmq"
3706 AC_SUBST(BUILD_WITH_LIBRABBITMQ_CPPFLAGS)
3707 AC_SUBST(BUILD_WITH_LIBRABBITMQ_LDFLAGS)
3708 AC_SUBST(BUILD_WITH_LIBRABBITMQ_LIBS)
3709 AC_DEFINE(HAVE_LIBRABBITMQ, 1, [Define if librabbitmq is present and usable.])
3711 CPPFLAGS="$SAVE_CPPFLAGS"
3712 LDFLAGS="$SAVE_LDFLAGS"
3713 AM_CONDITIONAL(BUILD_WITH_LIBRABBITMQ, test "x$with_librabbitmq" = "xyes")
3715 with_amqp_tcp_socket="no"
3716 if test "x$with_librabbitmq" = "xyes"
3718 SAVE_CPPFLAGS="$CPPFLAGS"
3719 SAVE_LDFLAGS="$LDFLAGS"
3721 CPPFLAGS="$CPPFLAGS $with_librabbitmq_cppflags"
3722 LDFLAGS="$LDFLAGS $with_librabbitmq_ldflags"
3725 AC_CHECK_HEADERS(amqp_tcp_socket.h amqp_socket.h)
3726 AC_CHECK_FUNC(amqp_tcp_socket_new, [with_amqp_tcp_socket="yes"], [with_amqp_tcp_socket="no"])
3727 if test "x$with_amqp_tcp_socket" = "xyes"
3729 AC_DEFINE(HAVE_AMQP_TCP_SOCKET, 1,
3730 [Define if librabbitmq provides the new TCP socket interface.])
3733 AC_CHECK_DECLS(amqp_socket_close,
3734 [amqp_socket_close_decl="yes"], [amqp_socket_close_decl="no"],
3737 #ifdef HAVE_AMQP_TCP_SOCKET_H
3738 # include <amqp_tcp_socket.h>
3740 #ifdef HAVE_AMQP_SOCKET_H
3741 # include <amqp_socket.h>
3745 CPPFLAGS="$SAVE_CPPFLAGS"
3746 LDFLAGS="$SAVE_LDFLAGS"
3751 # --with-librouteros {{{
3752 AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
3754 if test "x$withval" = "xyes"
3756 with_librouteros="yes"
3757 else if test "x$withval" = "xno"
3759 with_librouteros="no"
3761 with_librouteros="yes"
3762 LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS -I$withval/include"
3763 LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS -L$withval/lib"
3766 [with_librouteros="yes"])
3768 SAVE_CPPFLAGS="$CPPFLAGS"
3769 SAVE_LDFLAGS="$LDFLAGS"
3771 CPPFLAGS="$CPPFLAGS $LIBROUTEROS_CPPFLAGS"
3772 LDFLAGS="$LDFLAGS $LIBROUTEROS_LDFLAGS"
3774 if test "x$with_librouteros" = "xyes"
3776 if test "x$LIBROUTEROS_CPPFLAGS" != "x"
3778 AC_MSG_NOTICE([librouteros CPPFLAGS: $LIBROUTEROS_CPPFLAGS])
3780 AC_CHECK_HEADERS(routeros_api.h,
3781 [with_librouteros="yes"],
3782 [with_librouteros="no (routeros_api.h not found)"])
3784 if test "x$with_librouteros" = "xyes"
3786 if test "x$LIBROUTEROS_LDFLAGS" != "x"
3788 AC_MSG_NOTICE([librouteros LDFLAGS: $LIBROUTEROS_LDFLAGS])
3790 AC_CHECK_LIB(routeros, ros_interface,
3791 [with_librouteros="yes"],
3792 [with_librouteros="no (symbol 'ros_interface' not found)"])
3795 CPPFLAGS="$SAVE_CPPFLAGS"
3796 LDFLAGS="$SAVE_LDFLAGS"
3798 if test "x$with_librouteros" = "xyes"
3800 BUILD_WITH_LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS"
3801 BUILD_WITH_LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS"
3802 AC_SUBST(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
3803 AC_SUBST(BUILD_WITH_LIBROUTEROS_LDFLAGS)
3805 AM_CONDITIONAL(BUILD_WITH_LIBROUTEROS, test "x$with_librouteros" = "xyes")
3811 librrd_threadsafe="no"
3812 librrd_rrdc_update="no"
3814 [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
3816 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3818 librrd_cflags="-I$withval/include"
3819 librrd_ldflags="-L$withval/lib"
3822 with_librrd="$withval"
3828 if test "x$with_librrd" = "xyes"
3830 SAVE_LDFLAGS="$LDFLAGS"
3831 LDFLAGS="$LDFLAGS $librrd_ldflags"
3832 PKG_CHECK_MODULES([RRD], [librrd >= 1.6.0],
3834 AC_CHECK_LIB([rrd], [rrd_update_r],
3835 [librrd_threadsafe="yes"],
3838 AC_CHECK_LIB([rrd], [rrdc_update],
3839 [librrd_rrdc_update="yes"],
3844 LDFLAGS="$SAVE_LDFLAGS"
3846 SAVE_CPPFLAGS="$CPPFLAGS"
3847 CPPFLAGS="$CPPFLAGS $RRD_CFLAGS $librrd_cflags"
3849 AC_CHECK_HEADERS([rrd.h],, [with_librrd="no (rrd.h not found)"])
3851 CPPFLAGS="$SAVE_CPPFLAGS"
3854 if test "x$with_librrd" = "xyes" && test "x$librrd_threadsafe" = "xno"
3856 SAVE_LDFLAGS="$LDFLAGS"
3857 LDFLAGS="$LDFLAGS $librrd_ldflags"
3859 AC_CHECK_LIB([rrd_th], [rrd_update_r],
3861 librrd_ldflags="$librrd_ldflags -lrrd_th"
3862 librrd_threadsafe="yes"
3863 AC_CHECK_LIB([rrd_th], [rrdc_update],
3864 [librrd_rrdc_update="yes"],
3870 LDFLAGS="$SAVE_LDFLAGS"
3873 if test "x$with_librrd" = "xyes" && test "x$librrd_threadsafe" = "xno"
3875 SAVE_LDFLAGS="$LDFLAGS"
3876 LDFLAGS="$LDFLAGS $librrd_ldflags"
3878 AC_CHECK_LIB([rrd], [rrd_update],
3880 librrd_ldflags="$librrd_ldflags -lrrd"
3881 AC_CHECK_LIB([rrd], [rrdc_update],
3882 [librrd_rrdc_update="yes"],
3886 [with_librrd="no (symbol 'rrd_update' not found)"]
3888 LDFLAGS="$SAVE_LDFLAGS"
3891 if test "x$with_librrd" = "xyes"
3893 BUILD_WITH_LIBRRD_CFLAGS="$RRD_CFLAGS $librrd_cflags"
3894 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
3895 BUILD_WITH_LIBRRD_LIBS="$RRD_LIBS"
3896 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
3897 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
3898 AC_SUBST(BUILD_WITH_LIBRRD_LIBS)
3900 if test "x$librrd_threadsafe" = "xyes"
3902 AC_DEFINE([HAVE_THREADSAFE_LIBRRD], [1],
3903 [Define to 1 if the rrd library is thread-safe]
3908 # --with-libsensors {{{
3909 with_sensors_cflags=""
3910 with_sensors_ldflags=""
3911 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
3913 if test "x$withval" = "xno"
3915 with_libsensors="no"
3917 with_libsensors="yes"
3918 if test "x$withval" != "xyes"
3920 with_sensors_cflags="-I$withval/include"
3921 with_sensors_ldflags="-L$withval/lib"
3922 with_libsensors="yes"
3927 if test "x$ac_system" = "xLinux"
3929 with_libsensors="yes"
3931 with_libsensors="no (Linux only library)"
3934 if test "x$with_libsensors" = "xyes"
3936 SAVE_CPPFLAGS="$CPPFLAGS"
3937 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
3939 # AC_CHECK_HEADERS(sensors/sensors.h,
3941 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
3943 # [with_libsensors="no (sensors/sensors.h not found)"])
3944 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
3946 CPPFLAGS="$SAVE_CPPFLAGS"
3948 if test "x$with_libsensors" = "xyes"
3950 SAVE_CPPFLAGS="$CPPFLAGS"
3951 SAVE_LDFLAGS="$LDFLAGS"
3952 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
3953 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
3955 AC_CHECK_LIB(sensors, sensors_init,
3957 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
3959 [with_libsensors="no (libsensors not found)"])
3961 CPPFLAGS="$SAVE_CPPFLAGS"
3962 LDFLAGS="$SAVE_LDFLAGS"
3964 if test "x$with_libsensors" = "xyes"
3966 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
3967 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
3968 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
3969 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
3971 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
3974 # --with-libsigrok {{{
3975 with_libsigrok_cflags=""
3976 with_libsigrok_ldflags=""
3977 AC_ARG_WITH(libsigrok, [AS_HELP_STRING([--with-libsigrok@<:@=PREFIX@:>@], [Path to libsigrok.])],
3979 if test "x$withval" = "xno"
3983 with_libsigrok="yes"
3984 if test "x$withval" != "xyes"
3986 with_libsigrok_cflags="-I$withval/include"
3987 with_libsigrok_ldflags="-L$withval/lib"
3990 ],[with_libsigrok="yes"])
3992 # libsigrok has a glib dependency
3993 if test "x$with_libsigrok" = "xyes"
3995 m4_ifdef([AM_PATH_GLIB_2_0],
3997 AM_PATH_GLIB_2_0([2.28.0],
3998 [with_libsigrok_cflags="$with_libsigrok_cflags $GLIB_CFLAGS"; with_libsigrok_ldflags="$with_libsigrok_ldflags $GLIB_LIBS"])
4001 with_libsigrok="no (glib not available)"
4007 if test "x$with_libsigrok" = "xyes"
4009 SAVE_CPPFLAGS="$CPPFLAGS"
4010 CPPFLAGS="$CPPFLAGS $with_libsigrok_cflags"
4012 AC_CHECK_HEADERS(libsigrok/libsigrok.h, [], [with_libsigrok="no (libsigrok/libsigrok.h not found)"])
4014 CPPFLAGS="$SAVE_CPPFLAGS"
4018 if test "x$with_libsigrok" = "xyes"
4020 SAVE_CPPFLAGS="$CPPFLAGS"
4021 SAVE_LDFLAGS="$LDFLAGS"
4022 CPPFLAGS="$CPPFLAGS $with_libsigrok_cflags"
4023 LDFLAGS="$LDFLAGS $with_libsigrok_ldflags"
4025 AC_CHECK_LIB(sigrok, sr_init,
4027 AC_DEFINE(HAVE_LIBSIGROK, 1, [Define to 1 if you have the sigrok library (-lsigrok).])
4029 [with_libsigrok="no (libsigrok not found)"])
4031 CPPFLAGS="$SAVE_CPPFLAGS"
4032 LDFLAGS="$SAVE_LDFLAGS"
4034 if test "x$with_libsigrok" = "xyes"
4036 BUILD_WITH_LIBSIGROK_CFLAGS="$with_libsigrok_cflags"
4037 BUILD_WITH_LIBSIGROK_LDFLAGS="$with_libsigrok_ldflags"
4038 AC_SUBST(BUILD_WITH_LIBSIGROK_CFLAGS)
4039 AC_SUBST(BUILD_WITH_LIBSIGROK_LDFLAGS)
4041 AM_CONDITIONAL(BUILD_WITH_LIBSIGROK, test "x$with_libsigrok" = "xyes")
4044 # --with-libstatgrab {{{
4045 with_libstatgrab_cflags=""
4046 with_libstatgrab_ldflags=""
4047 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
4049 if test "x$withval" != "xno" \
4050 && test "x$withval" != "xyes"
4052 with_libstatgrab_cflags="-I$withval/include"
4053 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
4054 with_libstatgrab="yes"
4055 with_libstatgrab_pkg_config="no"
4057 with_libstatgrab="$withval"
4058 with_libstatgrab_pkg_config="yes"
4062 with_libstatgrab="yes"
4063 with_libstatgrab_pkg_config="yes"
4066 if test "x$with_libstatgrab" = "xyes" \
4067 && test "x$with_libstatgrab_pkg_config" = "xyes"
4069 if test "x$PKG_CONFIG" != "x"
4071 AC_MSG_CHECKING([pkg-config for libstatgrab])
4073 $PKG_CONFIG --exists libstatgrab 2>/dev/null
4076 with_libstatgrab_pkg_config="no"
4077 with_libstatgrab="no (pkg-config doesn't know libstatgrab)"
4078 temp_result="not found"
4080 AC_MSG_RESULT([$temp_result])
4082 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
4083 with_libstatgrab_pkg_config="no"
4084 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
4088 if test "x$with_libstatgrab" = "xyes" \
4089 && test "x$with_libstatgrab_pkg_config" = "xyes" \
4090 && test "x$with_libstatgrab_cflags" = "x"
4092 AC_MSG_CHECKING([for libstatgrab CFLAGS])
4093 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
4096 with_libstatgrab_cflags="$temp_result"
4098 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
4099 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
4101 AC_MSG_RESULT([$temp_result])
4104 if test "x$with_libstatgrab" = "xyes" \
4105 && test "x$with_libstatgrab_pkg_config" = "xyes" \
4106 && test "x$with_libstatgrab_ldflags" = "x"
4108 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
4109 temp_result="`$PKG_CONFIG --libs libstatgrab`"
4112 with_libstatgrab_ldflags="$temp_result"
4114 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
4115 temp_result="$PKG_CONFIG --libs libstatgrab failed"
4117 AC_MSG_RESULT([$temp_result])
4120 if test "x$with_libstatgrab" = "xyes"
4122 SAVE_CPPFLAGS="$CPPFLAGS"
4123 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
4125 AC_CHECK_HEADERS(statgrab.h,
4126 [with_libstatgrab="yes"],
4127 [with_libstatgrab="no (statgrab.h not found)"])
4129 CPPFLAGS="$SAVE_CPPFLAGS"
4132 if test "x$with_libstatgrab" = "xyes"
4134 SAVE_CFLAGS="$CFLAGS"
4135 SAVE_LDFLAGS="$LDFLAGS"
4137 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
4138 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
4140 AC_CHECK_LIB(statgrab, sg_init,
4141 [with_libstatgrab="yes"],
4142 [with_libstatgrab="no (symbol sg_init not found)"])
4144 CFLAGS="$SAVE_CFLAGS"
4145 LDFLAGS="$SAVE_LDFLAGS"
4148 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
4149 if test "x$with_libstatgrab" = "xyes"
4151 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
4152 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
4153 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
4154 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
4155 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
4159 # --with-libtokyotyrant {{{
4160 with_libtokyotyrant_cppflags=""
4161 with_libtokyotyrant_ldflags=""
4162 with_libtokyotyrant_libs=""
4163 AC_ARG_WITH(libtokyotyrant, [AS_HELP_STRING([--with-libtokyotyrant@<:@=PREFIX@:>@], [Path to libtokyotyrant.])],
4165 if test "x$withval" = "xno"
4167 with_libtokyotyrant="no"
4168 else if test "x$withval" = "xyes"
4170 with_libtokyotyrant="yes"
4172 with_libtokyotyrant_cppflags="-I$withval/include"
4173 with_libtokyotyrant_ldflags="-L$withval/include"
4174 with_libtokyotyrant_libs="-ltokyotyrant"
4175 with_libtokyotyrant="yes"
4179 with_libtokyotyrant="yes"
4182 if test "x$with_libtokyotyrant" = "xyes"
4184 if $PKG_CONFIG --exists tokyotyrant
4186 with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
4187 with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `$PKG_CONFIG --libs-only-L tokyotyrant`"
4188 with_libtokyotyrant_libs="$with_libtokyotyrant_libs `$PKG_CONFIG --libs-only-l tokyotyrant`"
4192 SAVE_CPPFLAGS="$CPPFLAGS"
4193 SAVE_LDFLAGS="$LDFLAGS"
4194 CPPFLAGS="$CPPFLAGS $with_libtokyotyrant_cppflags"
4195 LDFLAGS="$LDFLAGS $with_libtokyotyrant_ldflags"
4197 if test "x$with_libtokyotyrant" = "xyes"
4199 AC_CHECK_HEADERS(tcrdb.h,
4201 AC_DEFINE(HAVE_TCRDB_H, 1,
4202 [Define to 1 if you have the <tcrdb.h> header file.])
4203 ], [with_libtokyotyrant="no (tcrdb.h not found)"])
4206 if test "x$with_libtokyotyrant" = "xyes"
4208 AC_CHECK_LIB(tokyotyrant, tcrdbrnum,
4210 AC_DEFINE(HAVE_LIBTOKYOTYRANT, 1,
4211 [Define to 1 if you have the tokyotyrant library (-ltokyotyrant).])
4213 [with_libtokyotyrant="no (symbol tcrdbrnum not found)"],
4214 [$with_libtokyotyrant_libs])
4217 CPPFLAGS="$SAVE_CPPFLAGS"
4218 LDFLAGS="$SAVE_LDFLAGS"
4220 if test "x$with_libtokyotyrant" = "xyes"
4222 BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
4223 BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
4224 BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
4225 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
4226 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
4227 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
4229 AM_CONDITIONAL(BUILD_WITH_LIBTOKYOTYRANT, test "x$with_libtokyotyrant" = "xyes")
4232 # --with-libupsclient {{{
4233 with_libupsclient_config=""
4234 with_libupsclient_cflags=""
4235 with_libupsclient_libs=""
4236 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the upsclient library.])],
4238 if test "x$withval" = "xno"
4240 with_libupsclient="no"
4241 else if test "x$withval" = "xyes"
4243 with_libupsclient="use_pkgconfig"
4245 if test -x "$withval"
4247 with_libupsclient_config="$withval"
4248 with_libupsclient="use_libupsclient_config"
4249 else if test -x "$withval/bin/libupsclient-config"
4251 with_libupsclient_config="$withval/bin/libupsclient-config"
4252 with_libupsclient="use_libupsclient_config"
4254 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
4255 with_libupsclient_cflags="-I$withval/include"
4256 with_libupsclient_libs="-L$withval/lib -lupsclient"
4257 with_libupsclient="yes"
4261 [with_libupsclient="use_pkgconfig"])
4263 # configure using libupsclient-config
4264 if test "x$with_libupsclient" = "xuse_libupsclient_config"
4266 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
4267 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
4270 with_libupsclient="no ($with_libupsclient_config failed)"
4272 with_libupsclient_libs="`$with_libupsclient_config --libs`"
4275 with_libupsclient="no ($with_libupsclient_config failed)"
4278 if test "x$with_libupsclient" = "xuse_libupsclient_config"
4280 with_libupsclient="yes"
4283 # configure using pkg-config
4284 if test "x$with_libupsclient" = "xuse_pkgconfig"
4286 if test "x$PKG_CONFIG" = "x"
4288 with_libupsclient="no (Don't have pkg-config)"
4291 if test "x$with_libupsclient" = "xuse_pkgconfig"
4293 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
4294 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
4297 with_libupsclient="no (pkg-config doesn't know libupsclient)"
4300 if test "x$with_libupsclient" = "xuse_pkgconfig"
4302 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
4305 with_libupsclient="no ($PKG_CONFIG failed)"
4307 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
4310 with_libupsclient="no ($PKG_CONFIG failed)"
4313 if test "x$with_libupsclient" = "xuse_pkgconfig"
4315 with_libupsclient="yes"
4318 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
4319 # the actual checks.
4320 if test "x$with_libupsclient" = "xyes"
4322 SAVE_CPPFLAGS="$CPPFLAGS"
4323 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
4325 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
4327 CPPFLAGS="$SAVE_CPPFLAGS"
4329 if test "x$with_libupsclient" = "xyes"
4331 SAVE_CPPFLAGS="$CPPFLAGS"
4332 SAVE_LDFLAGS="$LDFLAGS"
4334 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
4335 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
4337 AC_CHECK_LIB(upsclient, upscli_connect,
4338 [with_libupsclient="yes"],
4339 [with_libupsclient="no (symbol upscli_connect not found)"])
4341 CPPFLAGS="$SAVE_CPPFLAGS"
4342 LDFLAGS="$SAVE_LDFLAGS"
4344 if test "x$with_libupsclient" = "xyes"
4346 SAVE_CPPFLAGS="$CPPFLAGS"
4347 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
4349 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
4350 [#include <stdlib.h>
4352 #include <upsclient.h>])
4354 CPPFLAGS="$SAVE_CPPFLAGS"
4356 if test "x$with_libupsclient" = "xyes"
4358 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
4359 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
4360 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
4361 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
4365 # --with-libxmms {{{
4366 with_xmms_config="xmms-config"
4369 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
4371 if test "x$withval" != "xno" \
4372 && test "x$withval" != "xyes"
4374 if test -f "$withval" && test -x "$withval";
4376 with_xmms_config="$withval"
4377 else if test -x "$withval/bin/xmms-config"
4379 with_xmms_config="$withval/bin/xmms-config"
4382 else if test "x$withval" = "xno"
4392 if test "x$with_libxmms" = "xyes"
4394 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
4395 xmms_config_status=$?
4397 if test $xmms_config_status -ne 0
4402 if test "x$with_libxmms" = "xyes"
4404 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
4405 xmms_config_status=$?
4407 if test $xmms_config_status -ne 0
4412 if test "x$with_libxmms" = "xyes"
4414 AC_CHECK_LIB(xmms, xmms_remote_get_info,
4416 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
4417 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
4418 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
4419 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
4426 with_libxmms_numeric=0
4427 if test "x$with_libxmms" = "xyes"
4429 with_libxmms_numeric=1
4431 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
4432 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
4435 # --with-libyajl {{{
4436 with_libyajl_cppflags=""
4437 with_libyajl_ldflags=""
4438 AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
4440 if test "x$withval" != "xno" && test "x$withval" != "xyes"
4442 with_libyajl_cppflags="-I$withval/include"
4443 with_libyajl_ldflags="-L$withval/lib"
4446 with_libyajl="$withval"
4452 if test "x$with_libyajl" = "xyes"
4454 SAVE_CPPFLAGS="$CPPFLAGS"
4455 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
4457 AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"])
4458 AC_CHECK_HEADERS(yajl/yajl_version.h)
4460 CPPFLAGS="$SAVE_CPPFLAGS"
4462 if test "x$with_libyajl" = "xyes"
4464 SAVE_CPPFLAGS="$CPPFLAGS"
4465 SAVE_LDFLAGS="$LDFLAGS"
4466 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
4467 LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
4469 AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"])
4471 CPPFLAGS="$SAVE_CPPFLAGS"
4472 LDFLAGS="$SAVE_LDFLAGS"
4474 if test "x$with_libyajl" = "xyes"
4476 BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
4477 BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
4478 BUILD_WITH_LIBYAJL_LIBS="-lyajl"
4479 AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS)
4480 AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS)
4481 AC_SUBST(BUILD_WITH_LIBYAJL_LIBS)
4482 AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.])
4484 AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
4488 with_mic_cflags="-I/opt/intel/mic/sysmgmt/sdk/include"
4489 with_mic_ldpath="-L/opt/intel/mic/sysmgmt/sdk/lib/Linux"
4491 AC_ARG_WITH(mic,[AS_HELP_STRING([--with-mic@<:@=PREFIX@:>@], [Path to Intel MIC Access API.])],
4493 if test "x$withval" = "xno"
4496 else if test "x$withval" = "xyes"
4499 else if test -d "$with_mic/lib"
4501 AC_MSG_NOTICE([Not checking for Intel Mic: Manually configured])
4502 with_mic_cflags="-I$withval/include"
4503 with_mic_ldpath="-L$withval/lib/Linux"
4504 with_mic_libs="-lMicAccessSDK -lscif -lpthread"
4509 if test "x$with_mic" = "xyes"
4511 SAVE_CPPFLAGS="$CPPFLAGS"
4512 CPPFLAGS="$CPPFLAGS $with_mic_cflags"
4513 AC_CHECK_HEADERS(MicAccessApi.h,[],[with_mic="no (MicAccessApi not found)"])
4514 CPPFLAGS="$SAVE_CPPFLAGS"
4516 if test "x$with_mic" = "xyes"
4518 SAVE_CPPFLAGS="$CPPFLAGS"
4519 SAVE_LDFLAGS="$LDFLAGS"
4521 CPPFLAGS="$CPPFLAGS $with_mic_cflags"
4522 LDFLAGS="$LDFLAGS $with_mic_ldpath"
4524 AC_CHECK_LIB(MicAccessSDK, MicInitAPI,
4525 [with_mic_ldpath="$with_mic_ldpath"
4526 with_mic_libs="-lMicAccessSDK -lscif -lpthread"],
4527 [with_mic="no (symbol MicInitAPI not found)"],[-lscif -lpthread])
4529 CPPFLAGS="$SAVE_CPPFLAGS"
4530 LDFLAGS="$SAVE_LDFLAGS"
4533 if test "x$with_mic" = "xyes"
4535 BUILD_WITH_MIC_CPPFLAGS="$with_mic_cflags"
4536 BUILD_WITH_MIC_LIBPATH="$with_mic_ldpath"
4537 BUILD_WITH_MIC_LDADD="$with_mic_libs"
4538 AC_SUBST(BUILD_WITH_MIC_CPPFLAGS)
4539 AC_SUBST(BUILD_WITH_MIC_LIBPATH)
4540 AC_SUBST(BUILD_WITH_MIC_LDADD)
4544 # --with-libvarnish {{{
4545 with_libvarnish_cppflags=""
4546 with_libvarnish_cflags=""
4547 with_libvarnish_libs=""
4548 AC_ARG_WITH(libvarnish, [AS_HELP_STRING([--with-libvarnish@<:@=PREFIX@:>@], [Path to libvarnish.])],
4550 if test "x$withval" = "xno"
4552 with_libvarnish="no"
4553 else if test "x$withval" = "xyes"
4555 with_libvarnish="use_pkgconfig"
4556 else if test -d "$with_libvarnish/lib"
4558 AC_MSG_NOTICE([Not checking for libvarnish: Manually configured])
4559 with_libvarnish_cflags="-I$withval/include"
4560 with_libvarnish_libs="-L$withval/lib -lvarnishapi"
4561 with_libvarnish="yes"
4564 [with_libvarnish="use_pkgconfig"])
4566 # configure using pkg-config
4567 if test "x$with_libvarnish" = "xuse_pkgconfig"
4569 if test "x$PKG_CONFIG" = "x"
4571 with_libvarnish="no (Don't have pkg-config)"
4574 if test "x$with_libvarnish" = "xuse_pkgconfig"
4576 AC_MSG_NOTICE([Checking for varnishapi using $PKG_CONFIG])
4577 $PKG_CONFIG --exists 'varnishapi' 2>/dev/null
4580 with_libvarnish="no (pkg-config doesn't know varnishapi)"
4583 if test "x$with_libvarnish" = "xuse_pkgconfig"
4585 with_libvarnish_cflags="`$PKG_CONFIG --cflags 'varnishapi'`"
4588 with_libvarnish="no ($PKG_CONFIG failed)"
4590 with_libvarnish_libs="`$PKG_CONFIG --libs 'varnishapi'`"
4593 with_libvarnish="no ($PKG_CONFIG failed)"
4596 if test "x$with_libvarnish" = "xuse_pkgconfig"
4598 with_libvarnish="yes"
4601 # with_libvarnish_cflags and with_libvarnish_libs are set up now, let's do
4602 # the actual checks.
4603 if test "x$with_libvarnish" = "xyes"
4605 SAVE_CPPFLAGS="$CPPFLAGS"
4606 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
4607 AC_CHECK_HEADERS(varnish/varnishapi.h, [], [with_libvarnish="no (varnish/varnishapi.h not found)"])
4609 CPPFLAGS="$SAVE_CPPFLAGS"
4611 if test "x$with_libvarnish" = "xyes"
4613 SAVE_CPPFLAGS="$CPPFLAGS"
4614 #SAVE_LDFLAGS="$LDFLAGS"
4616 CPPFLAGS="$CPPFLAGS $with_libvarnish_cflags"
4617 #LDFLAGS="$LDFLAGS $with_libvarnish_libs"
4619 AC_CHECK_HEADERS(varnish/vsc.h,
4620 [AC_DEFINE([HAVE_VARNISH_V3], [1], [Varnish 3 API support])],
4621 [AC_DEFINE([HAVE_VARNISH_V2], [1], [Varnish 2 API support])])
4623 CPPFLAGS="$SAVE_CPPFLAGS"
4624 #LDFLAGS="$SAVE_LDFLAGS"
4626 if test "x$with_libvarnish" = "xyes"
4628 BUILD_WITH_LIBVARNISH_CFLAGS="$with_libvarnish_cflags"
4629 BUILD_WITH_LIBVARNISH_LIBS="$with_libvarnish_libs"
4630 AC_SUBST(BUILD_WITH_LIBVARNISH_CFLAGS)
4631 AC_SUBST(BUILD_WITH_LIBVARNISH_LIBS)
4635 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
4636 with_libxml2="no (pkg-config isn't available)"
4637 with_libxml2_cflags=""
4638 with_libxml2_ldflags=""
4639 with_libvirt="no (pkg-config isn't available)"
4640 with_libvirt_cflags=""
4641 with_libvirt_ldflags=""
4642 if test "x$PKG_CONFIG" != "x"
4644 $PKG_CONFIG --exists 'libxml-2.0' 2>/dev/null
4649 with_libxml2="no (pkg-config doesn't know libxml-2.0)"
4652 $PKG_CONFIG --exists libvirt 2>/dev/null
4657 with_libvirt="no (pkg-config doesn't know libvirt)"
4660 if test "x$with_libxml2" = "xyes"
4662 with_libxml2_cflags="`$PKG_CONFIG --cflags libxml-2.0`"
4667 with_libxml2_ldflags="`$PKG_CONFIG --libs libxml-2.0`"
4673 if test "x$with_libxml2" = "xyes"
4675 SAVE_CPPFLAGS="$CPPFLAGS"
4676 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
4678 AC_CHECK_HEADERS(libxml/parser.h, [],
4679 [with_libxml2="no (libxml/parser.h not found)"])
4681 CPPFLAGS="$SAVE_CPPFLAGS"
4683 if test "x$with_libxml2" = "xyes"
4685 SAVE_CFLAGS="$CFLAGS"
4686 SAVE_LDFLAGS="$LDFLAGS"
4688 CFLAGS="$CFLAGS $with_libxml2_cflags"
4689 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
4691 AC_CHECK_LIB(xml2, xmlXPathEval,
4692 [with_libxml2="yes"],
4693 [with_libxml2="no (symbol xmlXPathEval not found)"])
4695 CFLAGS="$SAVE_CFLAGS"
4696 LDFLAGS="$SAVE_LDFLAGS"
4698 dnl Add the right compiler flags and libraries.
4699 if test "x$with_libxml2" = "xyes"; then
4700 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
4701 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
4702 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
4703 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
4705 if test "x$with_libvirt" = "xyes"
4707 with_libvirt_cflags="`$PKG_CONFIG --cflags libvirt`"
4712 with_libvirt_ldflags="`$PKG_CONFIG --libs libvirt`"
4718 if test "x$with_libvirt" = "xyes"
4720 SAVE_CPPFLAGS="$CPPFLAGS"
4721 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
4723 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
4724 [with_libvirt="no (libvirt/libvirt.h not found)"])
4726 CPPFLAGS="$SAVE_CPPFLAGS"
4728 if test "x$with_libvirt" = "xyes"
4730 SAVE_CFLAGS="$CFLAGS"
4731 SAVE_LDFLAGS="$LDFLAGS"
4733 CFLAGS="$CFLAGS $with_libvirt_cflags"
4734 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
4736 AC_CHECK_LIB(virt, virDomainBlockStats,
4737 [with_libvirt="yes"],
4738 [with_libvirt="no (symbol virDomainBlockStats not found)"])
4740 CFLAGS="$SAVE_CFLAGS"
4741 LDFLAGS="$SAVE_LDFLAGS"
4743 dnl Add the right compiler flags and libraries.
4744 if test "x$with_libvirt" = "xyes"; then
4745 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
4746 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
4747 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
4748 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
4752 # $PKG_CONFIG --exists OpenIPMIpthread {{{
4753 with_libopenipmipthread="yes"
4754 with_libopenipmipthread_cflags=""
4755 with_libopenipmipthread_libs=""
4757 AC_MSG_CHECKING([for pkg-config])
4759 if test "x$PKG_CONFIG" = "x"
4761 with_libopenipmipthread="no"
4764 temp_result="$PKG_CONFIG"
4766 AC_MSG_RESULT([$temp_result])
4768 if test "x$with_libopenipmipthread" = "xyes"
4770 AC_MSG_CHECKING([for libOpenIPMIpthread])
4771 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
4774 with_libopenipmipthread="no (pkg-config doesn't know OpenIPMIpthread)"
4776 AC_MSG_RESULT([$with_libopenipmipthread])
4779 if test "x$with_libopenipmipthread" = "xyes"
4781 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
4782 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
4785 with_libopenipmipthread_cflags="$temp_result"
4787 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
4788 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
4790 AC_MSG_RESULT([$temp_result])
4793 if test "x$with_libopenipmipthread" = "xyes"
4795 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
4796 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
4799 with_libopenipmipthread_ldflags="$temp_result"
4801 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
4802 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
4804 AC_MSG_RESULT([$temp_result])
4807 if test "x$with_libopenipmipthread" = "xyes"
4809 SAVE_CPPFLAGS="$CPPFLAGS"
4810 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
4812 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
4813 [with_libopenipmipthread="yes"],
4814 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
4815 [#include <OpenIPMI/ipmiif.h>
4816 #include <OpenIPMI/ipmi_err.h>
4817 #include <OpenIPMI/ipmi_posix.h>
4818 #include <OpenIPMI/ipmi_conn.h>
4821 CPPFLAGS="$SAVE_CPPFLAGS"
4824 if test "x$with_libopenipmipthread" = "xyes"
4826 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
4827 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
4828 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
4829 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
4833 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
4834 [with_libnotify="yes"],
4835 [if test "x$LIBNOTIFY_PKG_ERRORS" = "x"; then
4838 with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"
4841 # Check for enabled/disabled features
4844 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
4845 # ------------------------------------------------------------
4847 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
4852 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
4857 m4_define([EnDis],[disabled])dnl
4858 m4_define([YesNo],[no])dnl
4864 m4_define([EnDis],[enabled])dnl
4865 m4_define([YesNo],[yes])dnl
4868 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
4872 m4_if([$3], [feature], [],
4876 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
4882 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
4884 enable_$1='[YesNo]'dnl
4886 if test "x$enable_$1" = "xno"
4890 if test "x$enable_$1" = "xyes"
4894 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
4899 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
4900 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
4902 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
4904 # AC_PLUGIN(name, default, info)
4905 # ------------------------------------------------------------
4912 AC_ARG_ENABLE([$1], AS_HELP_STRING([--enable-$1],[$3]),
4914 if test "x$enableval" = "xyes"
4917 else if test "x$enableval" = "xforce"
4922 enable_plugin="no (disabled on command line)"
4926 if test "x$enable_all_plugins" = "xauto"
4928 if test "x$2" = "xyes"
4935 enable_plugin="$enable_all_plugins"
4938 if test "x$enable_plugin" = "xyes"
4940 if test "x$2" = "xyes" || test "x$force" = "xyes"
4942 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
4943 if test "x$2" != "xyes"
4945 dependency_warning="yes"
4947 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
4948 dependency_error="yes"
4949 enable_plugin="no (dependency error)"
4952 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
4953 enable_$1="$enable_plugin"
4955 )# AC_PLUGIN(name, default, info)
4957 m4_divert_once([HELP_ENABLE], [
4958 collectd features:])
4959 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
4960 AC_COLLECTD([debug], [enable], [feature], [debugging])
4961 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
4962 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
4964 dependency_warning="no"
4965 dependency_error="no"
4971 plugin_conntrack="no"
4972 plugin_contextswitch="no"
4975 plugin_curl_json="no"
4976 plugin_curl_xml="no"
4982 plugin_interface="no"
4989 plugin_multimeter="no"
4993 plugin_processes="no"
4994 plugin_protocols="no"
4998 plugin_tcpconns="no"
5005 plugin_wireless="no"
5009 if test "x$ac_system" = "xLinux"
5011 plugin_battery="yes"
5012 plugin_conntrack="yes"
5013 plugin_contextswitch="yes"
5014 plugin_cgroups="yes"
5016 plugin_cpufreq="yes"
5018 plugin_entropy="yes"
5019 plugin_fscache="yes"
5020 plugin_interface="yes"
5027 plugin_processes="yes"
5028 plugin_protocols="yes"
5031 plugin_tcpconns="yes"
5032 plugin_thermal="yes"
5035 plugin_vserver="yes"
5036 plugin_wireless="yes"
5038 if test "x$have_linux_ip_vs_h" = "xyes" || test "x$have_net_ip_vs_h" = "xyes" || test "x$have_ip_vs_h" = "xyes"
5044 if test "x$ac_system" = "xOpenBSD"
5046 plugin_tcpconns="yes"
5050 if test "x$with_libiokit" = "xyes"
5052 plugin_battery="yes"
5058 if test "x$ac_system" = "xAIX"
5060 plugin_tcpconns="yes"
5065 if test "x$ac_system" = "xFreeBSD"
5067 plugin_zfs_arc="yes"
5071 if test "x$with_perfstat" = "xyes"
5074 plugin_contextswitch="yes"
5078 plugin_interface="yes"
5083 if test "x$with_procinfo" = "xyes"
5085 plugin_processes="yes"
5089 if test "x$with_kstat" = "xyes"
5092 plugin_processes="yes"
5094 plugin_zfs_arc="yes"
5097 if test "x$with_devinfo$with_kstat" = "xyesyes"
5101 plugin_interface="yes"
5107 if test "x$with_libstatgrab" = "xyes"
5111 plugin_interface="yes"
5118 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
5121 if test "x$have_strptime" = "xyes"
5127 if test "x$with_libopenipmipthread" = "xyes"
5132 if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"
5134 plugin_curl_json="yes"
5137 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
5139 plugin_curl_xml="yes"
5142 if test "x$have_processor_info" = "xyes"
5146 if test "x$have_sysctl" = "xyes"
5151 if test "x$ac_system" = "xDarwin"
5156 if test "x$have_sysctlbyname" = "xyes"
5158 plugin_contextswitch="yes"
5161 plugin_tcpconns="yes"
5164 # Df plugin: Check if we know how to determine mount points first.
5165 #if test "x$have_listmntent" = "xyes"; then
5168 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
5172 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
5176 #if test "x$have_getmntent" = "xseq"
5180 if test "x$c_cv_have_one_getmntent" = "xyes"
5185 if test "x$c_cv_have_getmntent_r" = "xyes"
5190 # Df plugin: Check if we have either `statfs' or `statvfs' second.
5191 if test "x$plugin_df" = "xyes"
5194 if test "x$have_statfs" = "xyes"
5198 if test "x$have_statvfs" = "xyes"
5204 if test "x$have_linux_sockios_h$have_linux_ethtool_h" = "xyesyes"
5206 plugin_ethstat="yes"
5209 if test "x$have_getifaddrs" = "xyes"
5211 plugin_interface="yes"
5214 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
5216 plugin_libvirt="yes"
5219 if test "x$have_getloadavg" = "xyes"
5224 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
5229 # Mac OS X memory interface
5230 if test "x$have_host_statistics" = "xyes"
5235 if test "x$have_termios_h" = "xyes"
5237 plugin_multimeter="yes"
5241 if test "x$have_thread_info" = "xyes"
5243 plugin_processes="yes"
5246 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
5248 plugin_processes="yes"
5251 if test "x$with_kvm_getswapinfo" = "xyes"
5256 if test "x$have_swapctl" = "xyes" && test "x$c_cv_have_swapctl_two_args" = "xyes"
5261 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
5263 plugin_tcpconns="yes"
5266 if test "x$have_getutent" = "xyes"
5270 if test "x$have_getutxent" = "xyes"
5275 m4_divert_once([HELP_ENABLE], [
5278 AC_ARG_ENABLE([all-plugins],
5279 AS_HELP_STRING([--enable-all-plugins],[enable all plugins (auto by def)]),
5281 if test "x$enableval" = "xyes"
5283 enable_all_plugins="yes"
5284 else if test "x$enableval" = "xauto"
5286 enable_all_plugins="auto"
5288 enable_all_plugins="no"
5291 [enable_all_plugins="auto"])
5293 m4_divert_once([HELP_ENABLE], [])
5295 AC_PLUGIN([aggregation], [yes], [Aggregation plugin])
5296 AC_PLUGIN([amqp], [$with_librabbitmq], [AMQP output plugin])
5297 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
5298 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
5299 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
5300 AC_PLUGIN([aquaero], [$with_libaquaero5], [Aquaero's hardware sensors])
5301 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
5302 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
5303 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
5304 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
5305 AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
5306 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
5307 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
5308 AC_PLUGIN([csv], [yes], [CSV output plugin])
5309 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
5310 AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics])
5311 AC_PLUGIN([curl_xml], [$plugin_curl_xml], [CURL generic xml statistics])
5312 AC_PLUGIN([cgroups], [$plugin_cgroups], [CGroups CPU usage accounting])
5313 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
5314 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
5315 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
5316 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
5317 AC_PLUGIN([email], [yes], [EMail statistics])
5318 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
5319 AC_PLUGIN([ethstat], [$plugin_ethstat], [Stats from NIC driver])
5320 AC_PLUGIN([exec], [yes], [Execution of external programs])
5321 AC_PLUGIN([filecount], [yes], [Count files in directories])
5322 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
5323 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
5324 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
5325 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
5326 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
5327 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
5328 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
5329 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
5330 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
5331 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
5332 AC_PLUGIN([load], [$plugin_load], [System load])
5333 AC_PLUGIN([logfile], [yes], [File logging plugin])
5334 AC_PLUGIN([lpar], [$with_perfstat], [AIX logical partitions statistics])
5335 AC_PLUGIN([lvm], [$with_liblvm2app], [LVM statistics])
5336 AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
5337 AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
5338 AC_PLUGIN([match_hashed], [yes], [The hashed match])
5339 AC_PLUGIN([match_regex], [yes], [The regex match])
5340 AC_PLUGIN([match_timediff], [yes], [The timediff match])
5341 AC_PLUGIN([match_value], [yes], [The value match])
5342 AC_PLUGIN([mbmon], [yes], [Query mbmond])
5343 AC_PLUGIN([md], [$have_linux_raid_md_u_h], [md (Linux software RAID) devices])
5344 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
5345 AC_PLUGIN([memcached], [yes], [memcached statistics])
5346 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
5347 AC_PLUGIN([mic], [$with_mic], [Intel Many Integrated Core stats])
5348 AC_PLUGIN([modbus], [$with_libmodbus], [Modbus plugin])
5349 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
5350 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
5351 AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
5352 AC_PLUGIN([netlink], [$with_libmnl], [Enhanced Linux network statistics])
5353 AC_PLUGIN([network], [yes], [Network communication plugin])
5354 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
5355 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
5356 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
5357 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
5358 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
5359 AC_PLUGIN([numa], [$plugin_numa], [NUMA virtual memory statistics])
5360 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
5361 AC_PLUGIN([olsrd], [yes], [olsrd statistics])
5362 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
5363 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
5364 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
5365 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
5366 AC_PLUGIN([pf], [$have_net_pfvar_h], [BSD packet filter (PF) statistics])
5367 # FIXME: Check for libevent, too.
5368 AC_PLUGIN([pinba], [$have_protoc_c], [Pinba statistics])
5369 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
5370 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
5371 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
5372 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
5373 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
5374 AC_PLUGIN([python], [$with_python], [Embed a Python interpreter])
5375 AC_PLUGIN([redis], [$with_libcredis], [Redis plugin])
5376 AC_PLUGIN([routeros], [$with_librouteros], [RouterOS plugin])
5377 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
5378 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
5379 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
5380 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
5381 AC_PLUGIN([sigrok], [$with_libsigrok], [sigrok acquisition sources])
5382 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
5383 AC_PLUGIN([statsd], [yes], [StatsD plugin])
5384 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
5385 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
5386 AC_PLUGIN([table], [yes], [Parsing of tabular data])
5387 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
5388 AC_PLUGIN([tail_csv], [yes], [Parsing of CSV files])
5389 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
5390 AC_PLUGIN([target_notification], [yes], [The notification target])
5391 AC_PLUGIN([target_replace], [yes], [The replace target])
5392 AC_PLUGIN([target_scale],[yes], [The scale target])
5393 AC_PLUGIN([target_set], [yes], [The set target])
5394 AC_PLUGIN([target_v5upgrade], [yes], [The v5upgrade target])
5395 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
5396 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
5397 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
5398 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
5399 AC_PLUGIN([threshold], [yes], [Threshold checking plugin])
5400 AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics])
5401 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
5402 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
5403 AC_PLUGIN([users], [$plugin_users], [User statistics])
5404 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
5405 AC_PLUGIN([varnish], [$with_libvarnish], [Varnish cache statistics])
5406 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
5407 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
5408 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
5409 AC_PLUGIN([write_graphite], [yes], [Graphite / Carbon output plugin])
5410 AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
5411 AC_PLUGIN([write_mongodb], [$with_libmongoc], [MongoDB output plugin])
5412 AC_PLUGIN([write_redis], [$with_libcredis], [Redis output plugin])
5413 AC_PLUGIN([write_riemann], [$have_protoc_c], [Riemann output plugin])
5414 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
5415 AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
5417 dnl Default configuration file
5418 # Load either syslog or logfile
5419 LOAD_PLUGIN_SYSLOG=""
5420 LOAD_PLUGIN_LOGFILE=""
5422 AC_MSG_CHECKING([which default log plugin to load])
5423 default_log_plugin="none"
5424 if test "x$enable_syslog" = "xyes"
5426 default_log_plugin="syslog"
5428 LOAD_PLUGIN_SYSLOG="##"
5431 if test "x$enable_logfile" = "xyes"
5433 if test "x$default_log_plugin" = "xnone"
5435 default_log_plugin="logfile"
5437 LOAD_PLUGIN_LOGFILE="#"
5440 LOAD_PLUGIN_LOGFILE="##"
5442 AC_MSG_RESULT([$default_log_plugin])
5444 AC_SUBST(LOAD_PLUGIN_SYSLOG)
5445 AC_SUBST(LOAD_PLUGIN_LOGFILE)
5447 DEFAULT_LOG_LEVEL="info"
5448 if test "x$enable_debug" = "xyes"
5450 DEFAULT_LOG_LEVEL="debug"
5452 AC_SUBST(DEFAULT_LOG_LEVEL)
5454 # Load only one of rrdtool, network, csv in the default config.
5455 LOAD_PLUGIN_RRDTOOL=""
5456 LOAD_PLUGIN_NETWORK=""
5459 AC_MSG_CHECKING([which default write plugin to load])
5460 default_write_plugin="none"
5461 if test "x$enable_rrdtool" = "xyes"
5463 default_write_plugin="rrdtool"
5465 LOAD_PLUGIN_RRDTOOL="##"
5468 if test "x$enable_network" = "xyes"
5470 if test "x$default_write_plugin" = "xnone"
5472 default_write_plugin="network"
5474 LOAD_PLUGIN_NETWORK="#"
5477 LOAD_PLUGIN_NETWORK="##"
5480 if test "x$enable_csv" = "xyes"
5482 if test "x$default_write_plugin" = "xnone"
5484 default_write_plugin="csv"
5489 LOAD_PLUGIN_CSV="##"
5491 AC_MSG_RESULT([$default_write_plugin])
5493 AC_SUBST(LOAD_PLUGIN_RRDTOOL)
5494 AC_SUBST(LOAD_PLUGIN_NETWORK)
5495 AC_SUBST(LOAD_PLUGIN_CSV)
5498 if test "x$ac_system" = "xLinux" \
5499 && test "x$have_linux_ip_vs_h$have_net_ip_vs_h$have_ip_vs_h" = "xnonono"
5501 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
5504 if test "x$ip_vs_h_needs_kernel_cflags" = "xyes"
5506 enable_ipvs="$enable_ipvs (needs $KERNEL_CFLAGS)"
5510 PERL_BINDINGS_OPTIONS="PREFIX=${prefix}"
5511 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
5513 if test "x$withval" != "xno" && test "x$withval" != "xyes"
5515 PERL_BINDINGS_OPTIONS="$withval"
5516 with_perl_bindings="yes"
5518 with_perl_bindings="$withval"
5522 if test -n "$perl_interpreter"
5524 with_perl_bindings="yes"
5526 with_perl_bindings="no (no perl interpreter found)"
5529 if test "x$with_perl_bindings" = "xyes"
5531 PERL_BINDINGS="perl"
5535 AC_SUBST(PERL_BINDINGS)
5536 AC_SUBST(PERL_BINDINGS_OPTIONS)
5538 dnl libcollectdclient
5539 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
5540 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
5541 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
5543 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
5545 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
5547 AC_SUBST(LCC_VERSION_MAJOR)
5548 AC_SUBST(LCC_VERSION_MINOR)
5549 AC_SUBST(LCC_VERSION_PATCH)
5550 AC_SUBST(LCC_VERSION_EXTRA)
5551 AC_SUBST(LCC_VERSION_STRING)
5553 AC_CONFIG_FILES(src/libcollectdclient/collectd/lcc_features.h)
5555 AC_CONFIG_FILES([Makefile src/Makefile src/collectd.conf src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile])
5558 if test "x$with_librrd" = "xyes" \
5559 && test "x$librrd_threadsafe" != "xyes"
5561 with_librrd="yes (warning: librrd is not thread-safe)"
5564 if test "x$with_libperl" = "xyes"
5566 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
5568 enable_perl="no (needs libperl)"
5571 if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"
5573 enable_perl="no (libperl doesn't support ithreads)"
5576 if test "x$with_perl_bindings" = "xyes" \
5577 && test "x$PERL_BINDINGS_OPTIONS" != "x"
5579 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
5586 intel mic . . . . . . $with_mic
5587 libaquaero5 . . . . . $with_libaquaero5
5588 libcredis . . . . . . $with_libcredis
5589 libcurl . . . . . . . $with_libcurl
5590 libdbi . . . . . . . $with_libdbi
5591 libesmtp . . . . . . $with_libesmtp
5592 libganglia . . . . . $with_libganglia
5593 libgcrypt . . . . . . $with_libgcrypt
5594 libhal . . . . . . . $with_libhal
5595 libiokit . . . . . . $with_libiokit
5596 libiptc . . . . . . . $with_libiptc
5597 libjvm . . . . . . . $with_java
5598 libkstat . . . . . . $with_kstat
5599 libkvm . . . . . . . $with_libkvm
5600 liblvm2app . . . . . $with_liblvm2app
5601 libmemcached . . . . $with_libmemcached
5602 libmnl . . . . . . . $with_libmnl
5603 libmodbus . . . . . . $with_libmodbus
5604 libmongoc . . . . . . $with_libmongoc
5605 libmysql . . . . . . $with_libmysql
5606 libnetapp . . . . . . $with_libnetapp
5607 libnetsnmp . . . . . $with_libnetsnmp
5608 libnotify . . . . . . $with_libnotify
5609 liboconfig . . . . . $with_liboconfig
5610 libopenipmi . . . . . $with_libopenipmipthread
5611 liboping . . . . . . $with_liboping
5612 libowcapi . . . . . . $with_libowcapi
5613 libpcap . . . . . . . $with_libpcap
5614 libperfstat . . . . . $with_perfstat
5615 libperl . . . . . . . $with_libperl
5616 libpq . . . . . . . . $with_libpq
5617 libpthread . . . . . $with_libpthread
5618 librabbitmq . . . . . $with_librabbitmq
5619 librouteros . . . . . $with_librouteros
5620 librrd . . . . . . . $with_librrd
5621 libsensors . . . . . $with_libsensors
5622 libsigrok . . . . . $with_libsigrok
5623 libstatgrab . . . . . $with_libstatgrab
5624 libtokyotyrant . . . $with_libtokyotyrant
5625 libupsclient . . . . $with_libupsclient
5626 libvarnish . . . . . $with_libvarnish
5627 libvirt . . . . . . . $with_libvirt
5628 libxml2 . . . . . . . $with_libxml2
5629 libxmms . . . . . . . $with_libxmms
5630 libyajl . . . . . . . $with_libyajl
5631 oracle . . . . . . . $with_oracle
5632 protobuf-c . . . . . $have_protoc_c
5633 python . . . . . . . $with_python
5636 daemon mode . . . . . $enable_daemon
5637 debug . . . . . . . . $enable_debug
5640 perl . . . . . . . . $with_perl_bindings
5643 aggregation . . . . . $enable_aggregation
5644 amqp . . . . . . . $enable_amqp
5645 apache . . . . . . . $enable_apache
5646 apcups . . . . . . . $enable_apcups
5647 aquaero . . . . . . . $enable_aquaero
5648 apple_sensors . . . . $enable_apple_sensors
5649 ascent . . . . . . . $enable_ascent
5650 battery . . . . . . . $enable_battery
5651 bind . . . . . . . . $enable_bind
5652 conntrack . . . . . . $enable_conntrack
5653 contextswitch . . . . $enable_contextswitch
5654 cgroups . . . . . . . $enable_cgroups
5655 cpu . . . . . . . . . $enable_cpu
5656 cpufreq . . . . . . . $enable_cpufreq
5657 csv . . . . . . . . . $enable_csv
5658 curl . . . . . . . . $enable_curl
5659 curl_json . . . . . . $enable_curl_json
5660 curl_xml . . . . . . $enable_curl_xml
5661 dbi . . . . . . . . . $enable_dbi
5662 df . . . . . . . . . $enable_df
5663 disk . . . . . . . . $enable_disk
5664 dns . . . . . . . . . $enable_dns
5665 email . . . . . . . . $enable_email
5666 entropy . . . . . . . $enable_entropy
5667 ethstat . . . . . . . $enable_ethstat
5668 exec . . . . . . . . $enable_exec
5669 filecount . . . . . . $enable_filecount
5670 fscache . . . . . . . $enable_fscache
5671 gmond . . . . . . . . $enable_gmond
5672 hddtemp . . . . . . . $enable_hddtemp
5673 interface . . . . . . $enable_interface
5674 ipmi . . . . . . . . $enable_ipmi
5675 iptables . . . . . . $enable_iptables
5676 ipvs . . . . . . . . $enable_ipvs
5677 irq . . . . . . . . . $enable_irq
5678 java . . . . . . . . $enable_java
5679 libvirt . . . . . . . $enable_libvirt
5680 load . . . . . . . . $enable_load
5681 logfile . . . . . . . $enable_logfile
5682 lpar . . . . . . . . $enable_lpar
5683 lvm . . . . . . . . . $enable_lvm
5684 madwifi . . . . . . . $enable_madwifi
5685 match_empty_counter . $enable_match_empty_counter
5686 match_hashed . . . . $enable_match_hashed
5687 match_regex . . . . . $enable_match_regex
5688 match_timediff . . . $enable_match_timediff
5689 match_value . . . . . $enable_match_value
5690 mbmon . . . . . . . . $enable_mbmon
5691 md . . . . . . . . . $enable_md
5692 memcachec . . . . . . $enable_memcachec
5693 memcached . . . . . . $enable_memcached
5694 memory . . . . . . . $enable_memory
5695 mic . . . . . . . . . $enable_mic
5696 modbus . . . . . . . $enable_modbus
5697 multimeter . . . . . $enable_multimeter
5698 mysql . . . . . . . . $enable_mysql
5699 netapp . . . . . . . $enable_netapp
5700 netlink . . . . . . . $enable_netlink
5701 network . . . . . . . $enable_network
5702 nfs . . . . . . . . . $enable_nfs
5703 nginx . . . . . . . . $enable_nginx
5704 notify_desktop . . . $enable_notify_desktop
5705 notify_email . . . . $enable_notify_email
5706 ntpd . . . . . . . . $enable_ntpd
5707 numa . . . . . . . . $enable_numa
5708 nut . . . . . . . . . $enable_nut
5709 olsrd . . . . . . . . $enable_olsrd
5710 onewire . . . . . . . $enable_onewire
5711 openvpn . . . . . . . $enable_openvpn
5712 oracle . . . . . . . $enable_oracle
5713 perl . . . . . . . . $enable_perl
5714 pf . . . . . . . . . $enable_pf
5715 pinba . . . . . . . . $enable_pinba
5716 ping . . . . . . . . $enable_ping
5717 postgresql . . . . . $enable_postgresql
5718 powerdns . . . . . . $enable_powerdns
5719 processes . . . . . . $enable_processes
5720 protocols . . . . . . $enable_protocols
5721 python . . . . . . . $enable_python
5722 redis . . . . . . . . $enable_redis
5723 routeros . . . . . . $enable_routeros
5724 rrdcached . . . . . . $enable_rrdcached
5725 rrdtool . . . . . . . $enable_rrdtool
5726 sensors . . . . . . . $enable_sensors
5727 serial . . . . . . . $enable_serial
5728 sigrok . . . . . . . $enable_sigrok
5729 snmp . . . . . . . . $enable_snmp
5730 statsd . . . . . . . $enable_statsd
5731 swap . . . . . . . . $enable_swap
5732 syslog . . . . . . . $enable_syslog
5733 table . . . . . . . . $enable_table
5734 tail . . . . . . . . $enable_tail
5735 tail_csv . . . . . . $enable_tail_csv
5736 tape . . . . . . . . $enable_tape
5737 target_notification . $enable_target_notification
5738 target_replace . . . $enable_target_replace
5739 target_scale . . . . $enable_target_scale
5740 target_set . . . . . $enable_target_set
5741 target_v5upgrade . . $enable_target_v5upgrade
5742 tcpconns . . . . . . $enable_tcpconns
5743 teamspeak2 . . . . . $enable_teamspeak2
5744 ted . . . . . . . . . $enable_ted
5745 thermal . . . . . . . $enable_thermal
5746 threshold . . . . . . $enable_threshold
5747 tokyotyrant . . . . . $enable_tokyotyrant
5748 unixsock . . . . . . $enable_unixsock
5749 uptime . . . . . . . $enable_uptime
5750 users . . . . . . . . $enable_users
5751 uuid . . . . . . . . $enable_uuid
5752 varnish . . . . . . . $enable_varnish
5753 vmem . . . . . . . . $enable_vmem
5754 vserver . . . . . . . $enable_vserver
5755 wireless . . . . . . $enable_wireless
5756 write_graphite . . . $enable_write_graphite
5757 write_http . . . . . $enable_write_http
5758 write_mongodb . . . . $enable_write_mongodb
5759 write_redis . . . . . $enable_write_redis
5760 write_riemann . . . . $enable_write_riemann
5761 xmms . . . . . . . . $enable_xmms
5762 zfs_arc . . . . . . . $enable_zfs_arc
5766 if test "x$dependency_error" = "xyes"; then
5767 AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
5770 if test "x$dependency_warning" = "xyes"; then
5771 AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
5774 # vim: set fdm=marker :