1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, m4_esyscmd(./version-gen.sh))
3 AC_CONFIG_SRCDIR(src/collectd.c)
4 AC_CONFIG_HEADERS(src/config.h)
6 m4_ifdef([LT_PACKAGE_VERSION],
9 LT_CONFIG_LTDL_DIR([libltdl])
11 LTDL_INIT([convenience])
16 AC_LIBLTDL_CONVENIENCE
20 AC_CONFIG_SUBDIRS(libltdl)
24 AM_INIT_AUTOMAKE(dist-bzip2)
27 AC_PREFIX_DEFAULT("/opt/collectd")
32 # Checks for programs.
40 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
48 AC_MSG_CHECKING([for kernel type ($host_os)])
51 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
55 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
67 AC_MSG_RESULT([$ac_system])
69 if test "x$ac_system" = "xLinux"
71 AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
72 if test -z "$KERNEL_DIR"
74 KERNEL_DIR="/lib/modules/`uname -r`/source"
77 KERNEL_CFLAGS="-I$KERNEL_DIR/include"
78 AC_SUBST(KERNEL_CFLAGS)
81 if test "x$ac_system" = "xSolaris"
83 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to enforce POSIX thread semantics under Solaris.])
86 # Where to install .pc files.
87 pkgconfigdir="${libdir}/pkgconfig"
88 AC_SUBST(pkgconfigdir)
90 # Check for standards compliance mode
91 AC_ARG_ENABLE(standards,
92 AS_HELP_STRING([--enable-standards], [Enable standards compliance mode]),
93 [enable_standards="$enableval"],
94 [enable_standards="no"])
95 if test "x$enable_standards" = "xyes"
97 AC_DEFINE(_ISOC99_SOURCE, 1, [Define to enforce ISO C99 compliance.])
98 AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Define to enforce POSIX.1-2001 compliance.])
99 AC_DEFINE(_XOPEN_SOURCE, 600, [Define to enforce X/Open 6 (XSI) compliance.])
100 AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.])
102 AM_CONDITIONAL(BUILD_FEATURE_STANDARDS, test "x$enable_standards" = "xyes")
105 # Checks for header files.
112 AC_CHECK_HEADERS(stdio.h stdint.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)
115 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
120 # include <sys/types.h>
123 AC_CHECK_HEADERS(netinet/in.h, [], [],
128 # include <sys/types.h>
130 #if HAVE_NETINET_IN_SYSTM_H
131 # include <netinet/in_systm.h>
134 AC_CHECK_HEADERS(netinet/ip.h, [], [],
139 # include <sys/types.h>
141 #if HAVE_NETINET_IN_SYSTM_H
142 # include <netinet/in_systm.h>
144 #if HAVE_NETINET_IN_H
145 # include <netinet/in.h>
148 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
153 # include <sys/types.h>
155 #if HAVE_NETINET_IN_SYSTM_H
156 # include <netinet/in_systm.h>
158 #if HAVE_NETINET_IN_H
159 # include <netinet/in.h>
161 #if HAVE_NETINET_IP_H
162 # include <netinet/ip.h>
165 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
170 # include <sys/types.h>
172 #if HAVE_NETINET_IN_SYSTM_H
173 # include <netinet/in_systm.h>
175 #if HAVE_NETINET_IN_H
176 # include <netinet/in.h>
178 #if HAVE_NETINET_IP_H
179 # include <netinet/ip.h>
182 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
187 # include <sys/types.h>
189 #if HAVE_NETINET_IN_SYSTM_H
190 # include <netinet/in_systm.h>
192 #if HAVE_NETINET_IN_H
193 # include <netinet/in.h>
196 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
201 # include <sys/types.h>
203 #if HAVE_NETINET_IN_SYSTM_H
204 # include <netinet/in_systm.h>
206 #if HAVE_NETINET_IN_H
207 # include <netinet/in.h>
209 #if HAVE_NETINET_IP6_H
210 # include <netinet/ip6.h>
213 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
218 # include <sys/types.h>
220 #if HAVE_NETINET_IN_SYSTM_H
221 # include <netinet/in_systm.h>
223 #if HAVE_NETINET_IN_H
224 # include <netinet/in.h>
226 #if HAVE_NETINET_IP_H
227 # include <netinet/ip.h>
230 AC_CHECK_HEADERS(netinet/udp.h, [], [],
235 # include <sys/types.h>
237 #if HAVE_NETINET_IN_SYSTM_H
238 # include <netinet/in_systm.h>
240 #if HAVE_NETINET_IN_H
241 # include <netinet/in.h>
243 #if HAVE_NETINET_IP_H
244 # include <netinet/ip.h>
249 AC_CHECK_HEADERS(sys/dkstat.h)
250 if test "x$ac_system" = "xDarwin"
252 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)
253 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
255 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
258 # include <sys/types.h>
261 # include <sys/param.h>
265 AC_MSG_CHECKING([for sysctl kern.cp_times])
266 if test -x /sbin/sysctl
268 /sbin/sysctl kern.cp_times 2>/dev/null
272 AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIMES, 1,
273 [Define if sysctl supports kern.cp_times])
282 AC_CHECK_HEADERS(linux/major.h libgen.h)
284 # For the battery plugin
285 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
287 #if HAVE_IOKIT_IOKITLIB_H
288 # include <IOKit/IOKitLib.h>
290 #if HAVE_IOKIT_IOTYPES_H
291 # include <IOKit/IOTypes.h>
295 # For the swap module
296 have_linux_wireless_h="no"
297 if test "x$ac_system" = "xLinux"
299 AC_CHECK_HEADERS(linux/wireless.h,
300 [have_linux_wireless_h="yes"],
301 [have_linux_wireless_h="no"],
304 #include <sys/ioctl.h>
305 #include <sys/socket.h>
309 # For the swap module
310 have_sys_swap_h="yes"
311 AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
313 #undef _FILE_OFFSET_BITS
314 #undef _LARGEFILE64_SOURCE
316 # include <sys/types.h>
319 # include <sys/param.h>
323 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
326 if test "x$GCC" = "xyes"
328 hint_64="CFLAGS='-m64'"
330 hint_64="CFLAGS='-xarch=v9'"
332 AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
336 # For the processes plugin
338 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
340 # For interface plugin
341 AC_CHECK_HEADERS(ifaddrs.h)
342 AC_CHECK_HEADERS(net/if.h, [], [],
345 # include <sys/types.h>
347 #if HAVE_SYS_SOCKET_H
348 # include <sys/socket.h>
351 AC_CHECK_HEADERS(linux/if.h, [], [],
354 # include <sys/types.h>
356 #if HAVE_SYS_SOCKET_H
357 # include <sys/socket.h>
360 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
363 # include <sys/types.h>
365 #if HAVE_SYS_SOCKET_H
366 # include <sys/socket.h>
369 # include <linux/if.h>
374 have_net_ip_vs_h="no"
376 if test "x$ac_system" = "xLinux"
378 SAVE_CFLAGS="$CFLAGS"
379 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
381 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
382 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
384 CFLAGS="$SAVE_CFLAGS"
388 AC_CHECK_HEADERS(sys/ucred.h, [], [],
391 # include <sys/types.h>
394 # include <sys/param.h>
398 # For mount interface
399 AC_CHECK_HEADERS(sys/mount.h, [], [],
402 # include <sys/types.h>
405 # include <sys/param.h>
409 # For the email plugin
410 AC_CHECK_HEADERS(linux/un.h, [], [],
412 #if HAVE_SYS_SOCKET_H
413 # include <sys/socket.h>
417 AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h xfs/xqm.h fs_info.h fshelp.h paths.h mntent.h mnttab.h sys/fstyp.h sys/fs_types.h sys/mntent.h sys/mnttab.h sys/statfs.h sys/statvfs.h sys/vfs.h sys/vfstab.h kvm.h wordexp.h)
420 AC_CHECK_HEADERS(arpa/nameser.h)
421 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
423 #if HAVE_ARPA_NAMESER_H
424 # include <arpa/nameser.h>
428 AC_CHECK_HEADERS(net/if_arp.h, [], [],
429 [#if HAVE_SYS_SOCKET_H
430 # include <sys/socket.h>
433 AC_CHECK_HEADERS(net/ppp_defs.h)
434 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
435 [#if HAVE_NET_PPP_DEFS_H
436 # include <net/ppp_defs.h>
439 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
444 # include <sys/types.h>
446 #if HAVE_SYS_SOCKET_H
447 # include <sys/socket.h>
452 #if HAVE_NETINET_IN_H
453 # include <netinet/in.h>
457 # For the multimeter plugin
459 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
462 # Checks for typedefs, structures, and compiler characteristics.
471 # Checks for library functions.
473 AC_PROG_GCC_TRADITIONAL
474 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf)
478 AC_CACHE_CHECK([for strtok_r],
479 [c_cv_have_strtok_r_default],
488 char buffer[] = "foo,bar,baz";
495 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
498 printf ("token = %s;\n", token);
501 [c_cv_have_strtok_r_default="yes"],
502 [c_cv_have_strtok_r_default="no"]
506 if test "x$c_cv_have_strtok_r_default" = "xno"
508 SAVE_CFLAGS="$CFLAGS"
509 CFLAGS="$CFLAGS -D_REENTRANT=1"
511 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
512 [c_cv_have_strtok_r_reentrant],
521 char buffer[] = "foo,bar,baz";
528 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
531 printf ("token = %s;\n", token);
534 [c_cv_have_strtok_r_reentrant="yes"],
535 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
540 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
542 socket_needs_socket="no"
543 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
544 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
546 nanosleep_needs_rt="no"
547 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
548 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
550 AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
551 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
552 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
553 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
554 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
555 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
556 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
557 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
558 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
559 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
560 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
561 AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
564 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
567 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
569 if test "x$withval" = "xno"; then
571 else if test "x$withval" = "xyes"; then
578 if test "x$nan_type" = "xnone"; then
579 AC_CACHE_CHECK([whether NAN is defined by default],
580 [c_cv_have_nan_default],
586 static float foo = NAN;
594 [c_cv_have_nan_default="yes"],
595 [c_cv_have_nan_default="no"]
598 if test "x$c_cv_have_nan_default" = "xyes"
603 if test "x$nan_type" = "xnone"; then
604 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
605 [c_cv_have_nan_isoc],
610 #define __USE_ISOC99 1
612 static float foo = NAN;
620 [c_cv_have_nan_isoc="yes"],
621 [c_cv_have_nan_isoc="no"]
624 if test "x$c_cv_have_nan_isoc" = "xyes"
629 if test "x$nan_type" = "xnone"; then
630 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
631 [c_cv_have_nan_zero],
640 #define NAN (0.0 / 0.0)
642 # define isnan(f) ((f) != (f))
644 static float foo = NAN;
652 [c_cv_have_nan_zero="yes"],
653 [c_cv_have_nan_zero="no"]
656 if test "x$c_cv_have_nan_zero" = "xyes"
662 if test "x$nan_type" = "xdefault"; then
663 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
664 [Define if NAN is defined by default and can initialize static variables.])
665 else if test "x$nan_type" = "xisoc99"; then
666 AC_DEFINE(NAN_STATIC_ISOC, 1,
667 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
668 else if test "x$nan_type" = "xzero"; then
669 AC_DEFINE(NAN_ZERO_ZERO, 1,
670 [Define if NAN can be defined as (0.0 / 0.0)])
672 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
675 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
677 if test "x$withval" = "xnothing"; then
678 fp_layout_type="nothing"
679 else if test "x$withval" = "xendianflip"; then
680 fp_layout_type="endianflip"
681 else if test "x$withval" = "xintswap"; then
682 fp_layout_type="intswap"
684 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
687 [fp_layout_type="unknown"])
689 if test "x$fp_layout_type" = "xunknown"; then
690 AC_CACHE_CHECK([if doubles are stored in x86 representation],
691 [c_cv_fp_layout_need_nothing],
702 # include <stdbool.h>
712 memcpy ((void *) &i0, (void *) &d, 8);
715 memcpy ((void *) c, (void *) &i1, 8);
717 if ((c[0] == 0x2f) && (c[1] == 0x25)
718 && (c[2] == 0xc0) && (c[3] == 0xc7)
719 && (c[4] == 0x43) && (c[5] == 0x2b)
720 && (c[6] == 0x1f) && (c[7] == 0x5b))
725 [c_cv_fp_layout_need_nothing="yes"],
726 [c_cv_fp_layout_need_nothing="no"]
729 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
730 fp_layout_type="nothing"
733 if test "x$fp_layout_type" = "xunknown"; then
734 AC_CACHE_CHECK([if endianflip converts to x86 representation],
735 [c_cv_fp_layout_need_endianflip],
746 # include <stdbool.h>
748 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
749 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
750 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
751 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
752 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
753 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
754 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
755 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
764 memcpy ((void *) &i0, (void *) &d, 8);
766 i1 = endianflip (i0);
767 memcpy ((void *) c, (void *) &i1, 8);
769 if ((c[0] == 0x2f) && (c[1] == 0x25)
770 && (c[2] == 0xc0) && (c[3] == 0xc7)
771 && (c[4] == 0x43) && (c[5] == 0x2b)
772 && (c[6] == 0x1f) && (c[7] == 0x5b))
777 [c_cv_fp_layout_need_endianflip="yes"],
778 [c_cv_fp_layout_need_endianflip="no"]
781 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
782 fp_layout_type="endianflip"
785 if test "x$fp_layout_type" = "xunknown"; then
786 AC_CACHE_CHECK([if intswap converts to x86 representation],
787 [c_cv_fp_layout_need_intswap],
798 # include <stdbool.h>
800 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
801 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
810 memcpy ((void *) &i0, (void *) &d, 8);
813 memcpy ((void *) c, (void *) &i1, 8);
815 if ((c[0] == 0x2f) && (c[1] == 0x25)
816 && (c[2] == 0xc0) && (c[3] == 0xc7)
817 && (c[4] == 0x43) && (c[5] == 0x2b)
818 && (c[6] == 0x1f) && (c[7] == 0x5b))
823 [c_cv_fp_layout_need_intswap="yes"],
824 [c_cv_fp_layout_need_intswap="no"]
827 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
828 fp_layout_type="intswap"
832 if test "x$fp_layout_type" = "xnothing"; then
833 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
834 [Define if doubles are stored in x86 representation.])
835 else if test "x$fp_layout_type" = "xendianflip"; then
836 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
837 [Define if endianflip is needed to convert to x86 representation.])
838 else if test "x$fp_layout_type" = "xintswap"; then
839 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
840 [Define if intswap is needed to convert to x86 representation.])
842 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
846 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
848 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
850 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
853 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
854 if test "x$have_getmntent" = "xno"; then
855 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
857 if test "x$have_getmntent" = "xno"; then
858 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
860 if test "x$have_getmntent" = "xno"; then
861 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
864 if test "x$have_getmntent" = "xc"; then
865 AC_CACHE_CHECK([whether getmntent takes one argument],
866 [c_cv_have_one_getmntent],
868 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
869 #include "$srcdir/src/utils_mount.h"]],
873 fh = setmntent ("/etc/mtab", "r");
877 [c_cv_have_one_getmntent="yes"],
878 [c_cv_have_one_getmntent="no"]
881 AC_CACHE_CHECK([whether getmntent takes two arguments],
882 [c_cv_have_two_getmntent],
884 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
885 #include "$srcdir/src/utils_mount.h"]],
890 fh = fopen ("/etc/mnttab", "r");
891 status = getmntent (fh, &mt);
894 [c_cv_have_two_getmntent="yes"],
895 [c_cv_have_two_getmntent="no"]
900 # Check for different versions of `getmntent' here..
902 if test "x$have_getmntent" = "xc"; then
903 if test "x$c_cv_have_one_getmntent" = "xyes"; then
904 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
905 [Define if the function getmntent exists and takes one argument.])
907 if test "x$c_cv_have_two_getmntent" = "xyes"; then
908 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
909 [Define if the function getmntent exists and takes two arguments.])
912 if test "x$have_getmntent" = "xsun"; then
913 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
914 [Define if the function getmntent exists. It's the version from libsun.])
916 if test "x$have_getmntent" = "xseq"; then
917 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
918 [Define if the function getmntent exists. It's the version from libseq.])
920 if test "x$have_getmntent" = "xgen"; then
921 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
922 [Define if the function getmntent exists. It's the version from libgen.])
925 # Check for structures
926 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
927 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
930 #include <sys/types.h>
931 #include <sys/socket.h>
934 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
935 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
938 #include <sys/types.h>
939 #include <sys/socket.h>
940 #include <linux/if.h>
941 #include <linux/netdevice.h>
944 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
946 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
947 [Define if struct kinfo_proc exists in the FreeBSD variant.])
948 have_struct_kinfo_proc_freebsd="yes"
951 have_struct_kinfo_proc_freebsd="no"
955 #include <sys/param.h>
956 #include <sys/sysctl.h>
957 #include <sys/user.h>
960 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
962 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
963 [Define if struct kinfo_proc exists in the OpenBSD variant.])
964 have_struct_kinfo_proc_openbsd="yes"
967 have_struct_kinfo_proc_openbsd="no"
970 #include <sys/param.h>
971 #include <sys/sysctl.h>
975 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
981 # include <sys/types.h>
983 #if HAVE_NETINET_IN_SYSTM_H
984 # include <netinet/in_systm.h>
986 #if HAVE_NETINET_IN_H
987 # include <netinet/in.h>
989 #if HAVE_NETINET_IP_H
990 # include <netinet/ip.h>
992 #if HAVE_NETINET_UDP_H
993 # include <netinet/udp.h>
996 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
1001 #if HAVE_SYS_TYPES_H
1002 # include <sys/types.h>
1004 #if HAVE_NETINET_IN_SYSTM_H
1005 # include <netinet/in_systm.h>
1007 #if HAVE_NETINET_IN_H
1008 # include <netinet/in.h>
1010 #if HAVE_NETINET_IP_H
1011 # include <netinet/ip.h>
1013 #if HAVE_NETINET_UDP_H
1014 # include <netinet/udp.h>
1018 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
1028 # Checks for libraries begin here
1030 with_libresolv="yes"
1031 AC_CHECK_LIB(resolv, res_search,
1033 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
1035 [with_libresolv="no"])
1036 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
1038 dnl Check for HAL (hardware abstraction library)
1040 AC_CHECK_LIB(hal,libhal_device_property_exists,
1041 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
1043 if test "x$with_libhal" = "xyes"; then
1044 if test "x$PKG_CONFIG" != "x"; then
1045 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
1046 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
1047 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
1048 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
1052 m4_divert_once([HELP_WITH], [
1053 collectd additional packages:])
1055 if test "x$ac_system" = "xSolaris"
1060 with_kstat="no (Solaris only)"
1061 with_devinfo="no (Solaris only)"
1064 if test "x$with_kstat" = "xyes"
1066 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1068 if test "x$with_kstat" = "xyes"
1070 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1071 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1073 if test "x$with_kstat" = "xyes"
1075 AC_DEFINE(HAVE_LIBKSTAT, 1,
1076 [Define to 1 if you have the 'kstat' library (-lkstat)])
1078 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1079 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1082 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1089 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1092 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1093 if test "x$with_kvm_getprocs" = "xyes"
1095 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1096 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1099 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1101 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1102 if test "x$with_kvm_getswapinfo" = "xyes"
1104 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1105 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1108 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1110 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1111 if test "x$with_kvm_nlist" = "xyes"
1113 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1114 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1117 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1119 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1120 if test "x$with_kvm_openfiles" = "xyes"
1122 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1123 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1126 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1128 # --with-libcurl {{{
1129 with_curl_config="curl-config"
1132 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1134 if test "x$withval" = "xno"
1137 else if test "x$withval" = "xyes"
1141 if test -f "$withval" && test -x "$withval"
1143 with_curl_config="$withval"
1145 else if test -x "$withval/bin/curl-config"
1147 with_curl_config="$withval/bin/curl-config"
1156 if test "x$with_libcurl" = "xyes"
1158 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1159 curl_config_status=$?
1161 if test $curl_config_status -ne 0
1163 with_libcurl="no ($with_curl_config failed)"
1165 SAVE_CPPFLAGS="$CPPFLAGS"
1166 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1168 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1170 CPPFLAGS="$SAVE_CPPFLAGS"
1173 if test "x$with_libcurl" = "xyes"
1175 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1176 curl_config_status=$?
1178 if test $curl_config_status -ne 0
1180 with_libcurl="no ($with_curl_config failed)"
1182 AC_CHECK_LIB(curl, curl_easy_init,
1183 [with_libcurl="yes"],
1184 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1188 if test "x$with_libcurl" = "xyes"
1190 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1191 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1192 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1193 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1195 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1199 with_libdbi_cppflags=""
1200 with_libdbi_ldflags=""
1201 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1203 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1205 with_libdbi_cppflags="-I$withval/include"
1206 with_libdbi_ldflags="-L$withval/lib"
1209 with_libdbi="$withval"
1215 if test "x$with_libdbi" = "xyes"
1217 SAVE_CPPFLAGS="$CPPFLAGS"
1218 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1220 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1222 CPPFLAGS="$SAVE_CPPFLAGS"
1224 if test "x$with_libdbi" = "xyes"
1226 SAVE_CPPFLAGS="$CPPFLAGS"
1227 SAVE_LDFLAGS="$LDFLAGS"
1228 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1229 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1231 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1233 CPPFLAGS="$SAVE_CPPFLAGS"
1234 LDFLAGS="$SAVE_LDFLAGS"
1236 if test "x$with_libdbi" = "xyes"
1238 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1239 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1240 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1241 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1242 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1243 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1245 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1248 # --with-libesmtp {{{
1249 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1251 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1253 LDFLAGS="$LDFLAGS -L$withval/lib"
1254 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1257 with_libesmtp="$withval"
1263 if test "x$with_libesmtp" = "xyes"
1265 AC_CHECK_LIB(esmtp, smtp_create_session,
1267 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1268 ], [with_libesmtp="no (libesmtp not found)"])
1270 if test "x$with_libesmtp" = "xyes"
1272 AC_CHECK_HEADERS(libesmtp.h,
1274 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1275 ], [with_libesmtp="no (libesmtp.h not found)"])
1277 if test "x$with_libesmtp" = "xyes"
1283 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1284 [Wether or not to use the esmtp library])
1285 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1288 # --with-libganglia {{{
1289 AC_ARG_WITH(libganglia, [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
1291 if test -f "$withval" && test -x "$withval"
1293 with_libganglia_config="$withval"
1294 with_libganglia="yes"
1295 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"
1297 with_libganglia_config="$withval/bin/ganglia-config"
1298 with_libganglia="yes"
1299 else if test -d "$withval"
1301 GANGLIA_CPPFLAGS="-I$withval/include"
1302 GANGLIA_LDFLAGS="-L$withval/lib"
1303 with_libganglia="yes"
1305 with_libganglia_config="ganglia-config"
1306 with_libganglia="$withval"
1310 with_libganglia_config="ganglia-config"
1311 with_libganglia="yes"
1314 if test "x$with_libganglia" = "xyes" && test "x$with_libganglia_config" != "x"
1316 if test "x$GANGLIA_CPPFLAGS" = "x"
1318 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
1321 if test "x$GANGLIA_LDFLAGS" = "x"
1323 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
1326 if test "x$GANGLIA_LIBS" = "x"
1328 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
1332 SAVE_CPPFLAGS="$CPPFLAGS"
1333 SAVE_LDFLAGS="$LDFLAGS"
1334 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
1335 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
1337 if test "x$with_libganglia" = "xyes"
1339 AC_CHECK_HEADERS(gm_protocol.h,
1341 AC_DEFINE(HAVE_GM_PROTOCOL_H, 1,
1342 [Define to 1 if you have the <gm_protocol.h> header file.])
1343 ], [with_libganglia="no (gm_protocol.h not found)"])
1346 if test "x$with_libganglia" = "xyes"
1348 AC_CHECK_LIB(ganglia, xdr_Ganglia_value_msg,
1350 AC_DEFINE(HAVE_LIBGANGLIA, 1,
1351 [Define to 1 if you have the ganglia library (-lganglia).])
1352 ], [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"])
1355 CPPFLAGS="$SAVE_CPPFLAGS"
1356 LDFLAGS="$SAVE_LDFLAGS"
1358 AC_SUBST(GANGLIA_CPPFLAGS)
1359 AC_SUBST(GANGLIA_LDFLAGS)
1360 AC_SUBST(GANGLIA_LIBS)
1361 AM_CONDITIONAL(BUILD_WITH_LIBGANGLIA, test "x$with_libganglia" = "xyes")
1364 # --with-libgcrypt {{{
1365 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
1366 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
1367 GCRYPT_LIBS="$GCRYPT_LIBS"
1368 AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
1370 if test -f "$withval" && test -x "$withval"
1372 with_libgcrypt_config="$withval"
1373 with_libgcrypt="yes"
1374 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"
1376 with_libgcrypt_config="$withval/bin/gcrypt-config"
1377 with_libgcrypt="yes"
1378 else if test -d "$withval"
1380 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
1381 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
1382 with_libgcrypt="yes"
1384 with_libgcrypt_config="gcrypt-config"
1385 with_libgcrypt="$withval"
1389 with_libgcrypt_config="libgcrypt-config"
1390 with_libgcrypt="yes"
1393 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"
1395 if test "x$GCRYPT_CPPFLAGS" = "x"
1397 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
1400 if test "x$GCRYPT_LDFLAGS" = "x"
1402 gcrypt_exec_prefix=`"$with_libgcrypt_config" --exec-prefix 2>/dev/null`
1403 GCRYPT_LDFLAGS="-L$gcrypt_exec_prefix/lib"
1406 if test "x$GCRYPT_LIBS" = "x"
1408 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
1412 SAVE_CPPFLAGS="$CPPFLAGS"
1413 SAVE_LDFLAGS="$LDFLAGS"
1414 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
1415 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
1417 if test "x$with_libgcrypt" = "xyes"
1419 if test "x$GCRYPT_CPPFLAGS" != "x"
1421 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
1423 AC_CHECK_HEADERS(gcrypt.h,
1424 [with_libgcrypt="yes"],
1425 [with_libgcrypt="no (gcrypt.h not found)"])
1428 if test "x$with_libgcrypt" = "xyes"
1430 if test "x$GCRYPT_LDFLAGS" != "x"
1432 AC_MSG_NOTICE([gcrypt LDFLAGS: $GCRYPT_LDFLAGS])
1434 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
1435 [with_libgcrypt="yes"],
1436 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
1438 if test "$with_libgcrypt" != "no"; then
1439 AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")
1443 CPPFLAGS="$SAVE_CPPFLAGS"
1444 LDFLAGS="$SAVE_LDFLAGS"
1446 if test "x$with_libgcrypt" = "xyes"
1448 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to 1 if you have the gcrypt library (-lgcrypt).])
1451 AC_SUBST(GCRYPT_CPPFLAGS)
1452 AC_SUBST(GCRYPT_LDFLAGS)
1453 AC_SUBST(GCRYPT_LIBS)
1454 AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes")
1457 # --with-libiptc {{{
1458 with_own_libiptc="no"
1459 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1461 if test "x$withval" = "xshipped"
1463 with_own_libiptc="yes"
1465 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1467 LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
1468 LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
1471 with_libiptc="$withval"
1475 if test "x$ac_system" = "xLinux"
1479 with_libiptc="no (Linux only)"
1482 SAVE_CPPFLAGS="$CPPFLAGS"
1483 SAVE_LDFLAGS="$LDFLAGS"
1484 CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
1485 LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS"
1486 # check whether the header file for libiptc is available.
1487 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1489 AC_CHECK_HEADERS(libiptc/libiptc.h,
1491 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1495 with_own_libiptc="yes"
1498 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1500 AC_CHECK_HEADERS(libiptc/libip6tc.h,
1502 AC_DEFINE(HAVE_LIBIPTC_LIBIP6TC_H, 1, [Define to 1 if you have the <libiptc/libip6tc.h> header file.])
1506 with_own_libiptc="yes"
1509 # If the header file is available, check for the required type declaractions.
1510 # They may be missing in old versions of libiptc. In that case, they will be
1511 # declared in the iptables plugin.
1512 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1514 AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
1517 # include "$srcdir/src/owniptc/libiptc.h"
1518 # include "$srcdir/src/owniptc/libip6tc.h"
1520 # include <libiptc/libiptc.h>
1521 # include <libiptc/libip6tc.h>
1525 # Check for the iptc_init symbol in the library.
1526 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1528 AC_CHECK_LIB(iptc, iptc_init,
1530 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1534 with_own_libiptc="yes"
1537 # The system wide version failed for some reason. Check if we have the required
1538 # headers to build the shipped version.
1539 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
1541 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
1543 with_libiptc="no (Linux iptables headers not found)"
1544 with_own_libiptc="no"
1547 #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
1550 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1551 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1552 if test "x$with_libiptc" = "xyes"
1554 BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
1555 BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
1556 AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
1557 AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
1559 if test "x$with_own_libiptc" = "xyes"
1561 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1563 CPPFLAGS="$SAVE_CPPFLAGS"
1564 LDFLAGS="$SAVE_LDFLAGS"
1568 with_java_home="$JAVA_HOME"
1569 with_java_vmtype="client"
1573 AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
1575 if test "x$withval" = "xno"
1578 else if test "x$withval" = "xyes"
1582 with_java_home="$withval"
1587 if test "x$with_java" = "xyes"
1589 if test -d "$with_java_home"
1591 AC_MSG_CHECKING([for jni.h])
1592 TMPDIR=`find "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1593 if test "x$TMPDIR" != "x"
1595 AC_MSG_RESULT([found in $TMPDIR])
1596 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1598 AC_MSG_RESULT([not found])
1601 AC_MSG_CHECKING([for jni_md.h])
1602 TMPDIR=`find "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1603 if test "x$TMPDIR" != "x"
1605 AC_MSG_RESULT([found in $TMPDIR])
1606 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1608 AC_MSG_RESULT([not found])
1611 AC_MSG_CHECKING([for libjvm.so])
1612 TMPDIR=`find "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
1613 if test "x$TMPDIR" != "x"
1615 AC_MSG_RESULT([found in $TMPDIR])
1616 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR"
1618 AC_MSG_RESULT([not found])
1621 if test "x$JAVAC" = "x"
1623 AC_MSG_CHECKING([for javac])
1624 TMPDIR=`find "$with_java_home" -name javac -type f | head -n 1`
1625 if test "x$TMPDIR" != "x"
1628 AC_MSG_RESULT([$JAVAC])
1630 AC_MSG_RESULT([not found])
1633 else if test "x$with_java_home" != "x"
1635 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
1639 if test "x$JAVA_CPPFLAGS" != "x"
1641 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
1643 if test "x$JAVA_CFLAGS" != "x"
1645 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
1647 if test "x$JAVA_LDFLAGS" != "x"
1649 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
1651 if test "x$JAVAC" = "x"
1653 with_javac_path="$PATH"
1654 if test "x$with_java_home" != "x"
1656 with_javac_path="$with_java_home:with_javac_path"
1657 if test -d "$with_java_home/bin"
1659 with_javac_path="$with_java_home/bin:with_javac_path"
1663 AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path")
1665 if test "x$JAVAC" = "x"
1667 with_java="no (javac not found)"
1670 SAVE_CPPFLAGS="$CPPFLAGS"
1671 SAVE_CFLAGS="$CFLAGS"
1672 SAVE_LDFLAGS="$LDFLAGS"
1673 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
1674 CFLAGS="$CFLAGS $JAVA_CFLAGS"
1675 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
1677 if test "x$with_java" = "xyes"
1679 AC_CHECK_HEADERS(jni.h, [], [with_java="no (jni.h not found)"])
1681 if test "x$with_java" = "xyes"
1683 AC_CHECK_LIB(jvm, JNI_CreateJavaVM,
1685 [with_java="no (libjvm not found)"],
1688 if test "x$with_java" = "xyes"
1690 JAVA_LIBS="$JAVA_LIBS -ljvm"
1691 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
1694 CPPFLAGS="$SAVE_CPPFLAGS"
1695 CFLAGS="$SAVE_CFLAGS"
1696 LDFLAGS="$SAVE_LDFLAGS"
1698 AC_SUBST(JAVA_CPPFLAGS)
1699 AC_SUBST(JAVA_CFLAGS)
1700 AC_SUBST(JAVA_LDFLAGS)
1702 AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
1705 # --with-libmemcached {{{
1706 with_libmemcached_cppflags=""
1707 with_libmemcached_ldflags=""
1708 AC_ARG_WITH(libmemcached, [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
1710 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1712 with_libmemcached_cppflags="-I$withval/include"
1713 with_libmemcached_ldflags="-L$withval/lib"
1714 with_libmemcached="yes"
1716 with_libmemcached="$withval"
1720 with_libmemcached="yes"
1722 if test "x$with_libmemcached" = "xyes"
1724 SAVE_CPPFLAGS="$CPPFLAGS"
1725 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1727 AC_CHECK_HEADERS(libmemcached/memcached.h, [with_libmemcached="yes"], [with_libmemcached="no (libmemcached/memcached.h not found)"])
1729 CPPFLAGS="$SAVE_CPPFLAGS"
1731 if test "x$with_libmemcached" = "xyes"
1733 SAVE_CPPFLAGS="$CPPFLAGS"
1734 SAVE_LDFLAGS="$LDFLAGS"
1735 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1736 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
1738 AC_CHECK_LIB(memcached, memcached_create, [with_libmemcached="yes"], [with_libmemcached="no (Symbol 'memcached_create' not found)"])
1740 CPPFLAGS="$SAVE_CPPFLAGS"
1741 LDFLAGS="$SAVE_LDFLAGS"
1743 if test "x$with_libmemcached" = "xyes"
1745 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
1746 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
1747 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
1748 AC_SUBST(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1749 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1750 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LIBS)
1751 AC_DEFINE(HAVE_LIBMEMCACHED, 1, [Define if libmemcached is present and usable.])
1753 AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
1756 # --with-libmysql {{{
1757 with_mysql_config="mysql_config"
1758 with_mysql_cflags=""
1760 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1762 if test "x$withval" = "xno"
1765 else if test "x$withval" = "xyes"
1769 if test -f "$withval" && test -x "$withval";
1771 with_mysql_config="$withval"
1772 else if test -x "$withval/bin/mysql_config"
1774 with_mysql_config="$withval/bin/mysql_config"
1782 if test "x$with_libmysql" = "xyes"
1784 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1785 mysql_config_status=$?
1787 if test $mysql_config_status -ne 0
1789 with_libmysql="no ($with_mysql_config failed)"
1791 SAVE_CPPFLAGS="$CPPFLAGS"
1792 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1795 have_mysql_mysql_h="no"
1796 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
1798 if test "x$have_mysql_h" = "xno"
1800 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
1803 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
1805 with_libmysql="no (mysql.h not found)"
1808 CPPFLAGS="$SAVE_CPPFLAGS"
1811 if test "x$with_libmysql" = "xyes"
1813 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1814 mysql_config_status=$?
1816 if test $mysql_config_status -ne 0
1818 with_libmysql="no ($with_mysql_config failed)"
1820 AC_CHECK_LIB(mysqlclient, mysql_init,
1821 [with_libmysql="yes"],
1822 [with_libmysql="no (symbol 'mysql_init' not found)"],
1825 AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
1826 [with_libmysql="yes"],
1827 [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
1831 if test "x$with_libmysql" = "xyes"
1833 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1834 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1835 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1836 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1838 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1841 # --with-libnetlink {{{
1842 with_libnetlink_cflags=""
1843 with_libnetlink_libs="-lnetlink"
1844 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1846 echo "libnetlink: withval = $withval"
1847 if test "x$withval" = "xyes"
1849 with_libnetlink="yes"
1850 else if test "x$withval" = "xno"
1852 with_libnetlink="no"
1854 if test -d "$withval/include"
1856 with_libnetlink_cflags="-I$withval/include"
1857 with_libnetlink_libs="-L$withval/lib -lnetlink"
1858 with_libnetlink="yes"
1860 AC_MSG_ERROR("no such directory: $withval/include")
1865 if test "x$ac_system" = "xLinux"
1867 with_libnetlink="yes"
1869 with_libnetlink="no (Linux only library)"
1872 if test "x$with_libnetlink" = "xyes"
1874 SAVE_CFLAGS="$CFLAGS"
1875 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1877 with_libnetlink="no (libnetlink.h not found)"
1879 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1881 with_libnetlink="yes"
1885 #include <sys/types.h>
1886 #include <asm/types.h>
1887 #include <sys/socket.h>
1888 #include <linux/netlink.h>
1889 #include <linux/rtnetlink.h>])
1890 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1892 #include <sys/types.h>
1893 #include <asm/types.h>
1894 #include <sys/socket.h>])
1898 #include <sys/types.h>
1899 #include <asm/types.h>
1900 #include <sys/socket.h>
1901 #include <linux/netlink.h>
1902 #include <linux/rtnetlink.h>
1906 int retval = TCA_STATS2;
1909 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1914 #include <sys/types.h>
1915 #include <asm/types.h>
1916 #include <sys/socket.h>
1917 #include <linux/netlink.h>
1918 #include <linux/rtnetlink.h>
1922 int retval = TCA_STATS;
1925 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1928 CFLAGS="$SAVE_CFLAGS"
1930 if test "x$with_libnetlink" = "xyes"
1932 AC_CHECK_LIB(netlink, rtnl_open,
1933 [with_libnetlink="yes"],
1934 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1935 [$with_libnetlink_libs])
1937 if test "x$with_libnetlink" = "xyes"
1939 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1940 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1941 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1942 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1944 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1947 # --with-libnetapp {{{
1948 AC_ARG_VAR([LIBNETAPP_CPPFLAGS], [C preprocessor flags required to build with libnetapp])
1949 AC_ARG_VAR([LIBNETAPP_LDFLAGS], [Linker flags required to build with libnetapp])
1950 AC_ARG_VAR([LIBNETAPP_LIBS], [Other libraries required to link against libnetapp])
1951 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS"
1952 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS"
1953 LIBNETAPP_LIBS="$LIBNETAPP_LIBS"
1954 AC_ARG_WITH(libnetapp, [AS_HELP_STRING([--with-libnetapp@<:@=PREFIX@:>@], [Path to libnetapp.])],
1956 if test -d "$withval"
1958 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS -I$withval/include"
1959 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS -L$withval/lib"
1960 with_libnetapp="yes"
1962 with_libnetapp="$withval"
1966 with_libnetapp="yes"
1969 SAVE_CPPFLAGS="$CPPFLAGS"
1970 SAVE_LDFLAGS="$LDFLAGS"
1971 CPPFLAGS="$CPPFLAGS $LIBNETAPP_CPPFLAGS"
1972 LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
1974 if test "x$with_libnetapp" = "xyes"
1976 if test "x$LIBNETAPP_CPPFLAGS" != "x"
1978 AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
1980 AC_CHECK_HEADERS(netapp_api.h,
1981 [with_libnetapp="yes"],
1982 [with_libnetapp="no (netapp_api.h not found)"])
1985 if test "x$with_libnetapp" = "xyes"
1987 if test "x$LIBNETAPP_LDFLAGS" != "x"
1989 AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
1992 if test "x$LIBNETAPP_LIBS" = "x"
1994 LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm -lcrypto -lz"
1996 AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
1998 AC_CHECK_LIB(netapp, na_server_invoke_elem,
1999 [with_libnetapp="yes"],
2000 [with_libnetapp="no (symbol na_server_invoke_elem not found)"],
2002 LIBNETAPP_LIBS="-lnetapp $LIBNETAPP_LIBS"
2005 CPPFLAGS="$SAVE_CPPFLAGS"
2006 LDFLAGS="$SAVE_LDFLAGS"
2008 if test "x$with_libnetapp" = "xyes"
2010 AC_DEFINE(HAVE_LIBNETAPP, 1, [Define to 1 if you have the netapp library (-lnetapp).])
2013 AC_SUBST(LIBNETAPP_CPPFLAGS)
2014 AC_SUBST(LIBNETAPP_LDFLAGS)
2015 AC_SUBST(LIBNETAPP_LIBS)
2016 AM_CONDITIONAL(BUILD_WITH_LIBNETAPP, test "x$with_libnetapp" = "xyes")
2019 # --with-libnetsnmp {{{
2020 with_snmp_config="net-snmp-config"
2023 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
2025 if test "x$withval" = "xno"
2027 with_libnetsnmp="no"
2028 else if test "x$withval" = "xyes"
2030 with_libnetsnmp="yes"
2032 if test -x "$withval"
2034 with_snmp_config="$withval"
2035 with_libnetsnmp="yes"
2037 with_snmp_config="$withval/bin/net-snmp-config"
2038 with_libnetsnmp="yes"
2042 [with_libnetsnmp="yes"])
2043 if test "x$with_libnetsnmp" = "xyes"
2045 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
2046 snmp_config_status=$?
2048 if test $snmp_config_status -ne 0
2050 with_libnetsnmp="no ($with_snmp_config failed)"
2052 SAVE_CPPFLAGS="$CPPFLAGS"
2053 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
2055 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
2057 CPPFLAGS="$SAVE_CPPFLAGS"
2060 if test "x$with_libnetsnmp" = "xyes"
2062 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
2063 snmp_config_status=$?
2065 if test $snmp_config_status -ne 0
2067 with_libnetsnmp="no ($with_snmp_config failed)"
2069 AC_CHECK_LIB(netsnmp, init_snmp,
2070 [with_libnetsnmp="yes"],
2071 [with_libnetsnmp="no (libnetsnmp not found)"],
2075 if test "x$with_libnetsnmp" = "xyes"
2077 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
2078 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
2079 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
2080 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
2082 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
2085 # --with-liboconfig {{{
2086 with_own_liboconfig="no"
2087 liboconfig_LDFLAGS="$LDFLAGS"
2088 liboconfig_CPPFLAGS="$CPPFLAGS"
2089 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
2091 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2093 if test -d "$withval/lib"
2095 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
2097 if test -d "$withval/include"
2099 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
2102 if test "x$withval" = "xno"
2104 AC_MSG_ERROR("liboconfig is required")
2108 with_liboconfig="yes"
2111 save_LDFLAGS="$LDFLAGS"
2112 save_CPPFLAGS="$CPPFLAGS"
2113 LDFLAGS="$liboconfig_LDFLAGS"
2114 CPPFLAGS="$liboconfig_CPPFLAGS"
2115 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
2117 with_liboconfig="yes"
2118 with_own_liboconfig="no"
2121 with_liboconfig="yes"
2122 with_own_liboconfig="yes"
2123 LDFLAGS="$save_LDFLAGS"
2124 CPPFLAGS="$save_CPPFLAGS"
2127 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
2128 if test "x$with_own_liboconfig" = "xyes"
2130 with_liboconfig="yes (shipped version)"
2134 # --with-liboping {{{
2135 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
2137 if test "x$withval" = "xyes"
2140 else if test "x$withval" = "xno"
2145 LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS -I$withval/include"
2146 LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS -L$withval/lib"
2149 [with_liboping="yes"])
2151 SAVE_CPPFLAGS="$CPPFLAGS"
2152 SAVE_LDFLAGS="$LDFLAGS"
2154 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
2155 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
2157 if test "x$with_liboping" = "xyes"
2159 if test "x$LIBOPING_CPPFLAGS" != "x"
2161 AC_MSG_NOTICE([liboping CPPFLAGS: $LIBOPING_CPPFLAGS])
2163 AC_CHECK_HEADERS(oping.h,
2164 [with_liboping="yes"],
2165 [with_liboping="no ('oping.h' not found)"])
2167 if test "x$with_liboping" = "xyes"
2169 if test "x$LIBOPING_LDFLAGS" != "x"
2171 AC_MSG_NOTICE([liboping LDFLAGS: $LIBOPING_LDFLAGS])
2173 AC_CHECK_LIB(oping, ping_construct,
2174 [with_liboping="yes"],
2175 [with_liboping="no (symbol 'ping_construct' not found)"])
2178 CPPFLAGS="$SAVE_CPPFLAGS"
2179 LDFLAGS="$SAVE_LDFLAGS"
2181 if test "x$with_liboping" = "xyes"
2183 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
2184 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
2185 AC_SUBST(BUILD_WITH_LIBOPING_CPPFLAGS)
2186 AC_SUBST(BUILD_WITH_LIBOPING_LDFLAGS)
2188 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
2192 with_oracle_cppflags=""
2194 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
2196 if test "x$withval" = "xyes"
2198 if test "x$ORACLE_HOME" = "x"
2200 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
2203 else if test "x$withval" = "xno"
2208 ORACLE_HOME="$withval"
2212 if test "x$ORACLE_HOME" = "x"
2214 with_oracle="no (ORACLE_HOME is not set)"
2219 if test "x$ORACLE_HOME" != "x"
2221 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
2223 if test -e "$ORACLE_HOME/lib/ldflags"
2225 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
2227 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
2228 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
2230 if test "x$with_oracle" = "xyes"
2232 SAVE_CPPFLAGS="$CPPFLAGS"
2233 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2235 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
2237 CPPFLAGS="$SAVE_CPPFLAGS"
2239 if test "x$with_oracle" = "xyes"
2241 SAVE_CPPFLAGS="$CPPFLAGS"
2242 SAVE_LDFLAGS="$LDFLAGS"
2243 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2244 LDFLAGS="$LDFLAGS $with_oracle_libs"
2246 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
2248 CPPFLAGS="$SAVE_CPPFLAGS"
2249 LDFLAGS="$SAVE_LDFLAGS"
2251 if test "x$with_oracle" = "xyes"
2253 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
2254 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
2255 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
2256 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
2260 # --with-libowcapi {{{
2261 with_libowcapi_cppflags=""
2262 with_libowcapi_libs="-lowcapi"
2263 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
2265 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2267 with_libowcapi_cppflags="-I$withval/include"
2268 with_libowcapi_libs="-L$withval/lib -lowcapi"
2269 with_libowcapi="yes"
2271 with_libowcapi="$withval"
2275 with_libowcapi="yes"
2277 if test "x$with_libowcapi" = "xyes"
2279 SAVE_CPPFLAGS="$CPPFLAGS"
2280 CPPFLAGS="$with_libowcapi_cppflags"
2282 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
2284 CPPFLAGS="$SAVE_CPPFLAGS"
2286 if test "x$with_libowcapi" = "xyes"
2288 SAVE_LDFLAGS="$LDFLAGS"
2289 SAVE_CPPFLAGS="$CPPFLAGS"
2290 LDFLAGS="$with_libowcapi_libs"
2291 CPPFLAGS="$with_libowcapi_cppflags"
2293 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
2295 LDFLAGS="$SAVE_LDFLAGS"
2296 CPPFLAGS="$SAVE_CPPFLAGS"
2298 if test "x$with_libowcapi" = "xyes"
2300 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
2301 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
2302 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
2303 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
2307 # --with-libpcap {{{
2308 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
2310 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2312 LDFLAGS="$LDFLAGS -L$withval/lib"
2313 CPPFLAGS="$CPPFLAGS -I$withval/include"
2316 with_libpcap="$withval"
2322 if test "x$with_libpcap" = "xyes"
2324 AC_CHECK_LIB(pcap, pcap_open_live,
2326 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
2327 ], [with_libpcap="no (libpcap not found)"])
2329 if test "x$with_libpcap" = "xyes"
2331 AC_CHECK_HEADERS(pcap.h,
2333 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
2334 ], [with_libpcap="no (pcap.h not found)"])
2336 if test "x$with_libpcap" = "xyes"
2342 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
2343 [Wether or not to use the pcap library])
2344 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
2347 # --with-libperl {{{
2348 perl_interpreter="perl"
2349 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
2351 if test -x "$withval"
2353 perl_interpreter="$withval"
2355 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
2357 LDFLAGS="$LDFLAGS -L$withval/lib"
2358 CPPFLAGS="$CPPFLAGS -I$withval/include"
2359 perl_interpreter="$withval/bin/perl"
2362 with_libperl="$withval"
2369 AC_MSG_CHECKING([for perl])
2370 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
2371 if test -x "$perl_interpreter"
2373 AC_MSG_RESULT([yes ($perl_interpreter)])
2379 AC_SUBST(PERL, "$perl_interpreter")
2381 if test "x$with_libperl" = "xyes" \
2382 && test -n "$perl_interpreter"
2384 SAVE_CFLAGS="$CFLAGS"
2385 SAVE_LDFLAGS="$LDFLAGS"
2386 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
2387 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
2388 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
2389 CFLAGS="$CFLAGS $PERL_CFLAGS"
2390 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2392 AC_CACHE_CHECK([for libperl],
2393 [c_cv_have_libperl],
2397 #define PERL_NO_GET_CONTEXT
2404 load_module (PERL_LOADMOD_NOIMPORT,
2405 newSVpv ("Collectd::Plugin::FooBar", 24),
2408 [c_cv_have_libperl="yes"],
2409 [c_cv_have_libperl="no"]
2413 if test "x$c_cv_have_libperl" = "xyes"
2415 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
2416 AC_SUBST(PERL_CFLAGS)
2417 AC_SUBST(PERL_LDFLAGS)
2422 CFLAGS="$SAVE_CFLAGS"
2423 LDFLAGS="$SAVE_LDFLAGS"
2424 else if test -z "$perl_interpreter"; then
2425 with_libperl="no (no perl interpreter found)"
2426 c_cv_have_libperl="no"
2428 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
2430 if test "x$with_libperl" = "xyes"
2432 SAVE_CFLAGS="$CFLAGS"
2433 SAVE_LDFLAGS="$LDFLAGS"
2434 CFLAGS="$CFLAGS $PERL_CFLAGS"
2435 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2437 AC_CACHE_CHECK([if perl supports ithreads],
2438 [c_cv_have_perl_ithreads],
2446 #if !defined(USE_ITHREADS)
2447 # error "Perl does not support ithreads!"
2448 #endif /* !defined(USE_ITHREADS) */
2451 [c_cv_have_perl_ithreads="yes"],
2452 [c_cv_have_perl_ithreads="no"]
2456 if test "x$c_cv_have_perl_ithreads" = "xyes"
2458 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
2461 CFLAGS="$SAVE_CFLAGS"
2462 LDFLAGS="$SAVE_LDFLAGS"
2465 if test "x$with_libperl" = "xyes"
2467 SAVE_CFLAGS="$CFLAGS"
2468 SAVE_LDFLAGS="$LDFLAGS"
2469 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
2470 # (see issues #41 and #42)
2471 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
2472 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2474 AC_CACHE_CHECK([for broken Perl_load_module()],
2475 [c_cv_have_broken_perl_load_module],
2479 #define PERL_NO_GET_CONTEXT
2486 load_module (PERL_LOADMOD_NOIMPORT,
2487 newSVpv ("Collectd::Plugin::FooBar", 24),
2490 [c_cv_have_broken_perl_load_module="no"],
2491 [c_cv_have_broken_perl_load_module="yes"]
2495 CFLAGS="$SAVE_CFLAGS"
2496 LDFLAGS="$SAVE_LDFLAGS"
2498 AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
2499 test "x$c_cv_have_broken_perl_load_module" = "xyes")
2501 if test "x$with_libperl" = "xyes"
2503 SAVE_CFLAGS="$CFLAGS"
2504 SAVE_LDFLAGS="$LDFLAGS"
2505 CFLAGS="$CFLAGS $PERL_CFLAGS"
2506 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2509 [struct mgvtbl.svt_local],
2510 [have_struct_mgvtbl_svt_local="yes"],
2511 [have_struct_mgvtbl_svt_local="no"],
2518 if test "x$have_struct_mgvtbl_svt_local" = "xyes"
2520 AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
2521 [Define if Perl's struct mgvtbl has member svt_local.])
2524 CFLAGS="$SAVE_CFLAGS"
2525 LDFLAGS="$SAVE_LDFLAGS"
2530 with_pg_config="pg_config"
2531 with_libpq_includedir=""
2532 with_libpq_libdir=""
2533 with_libpq_cppflags=""
2534 with_libpq_ldflags=""
2535 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2538 if test "x$withval" = "xno"
2541 else if test "x$withval" = "xyes"
2545 if test -f "$withval" && test -x "$withval";
2547 with_pg_config="$withval"
2548 else if test -x "$withval/bin/pg_config"
2550 with_pg_config="$withval/bin/pg_config"
2558 if test "x$with_libpq" = "xyes"
2560 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2563 if test $pg_config_status -eq 0
2565 if test -n "$with_libpq_includedir"; then
2566 for dir in $with_libpq_includedir; do
2567 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2571 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2574 SAVE_CPPFLAGS="$CPPFLAGS"
2575 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2577 AC_CHECK_HEADERS(libpq-fe.h, [],
2578 [with_libpq="no (libpq-fe.h not found)"], [])
2580 CPPFLAGS="$SAVE_CPPFLAGS"
2582 if test "x$with_libpq" = "xyes"
2584 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2587 if test $pg_config_status -eq 0
2589 if test -n "$with_libpq_libdir"; then
2590 for dir in $with_libpq_libdir; do
2591 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2595 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2598 SAVE_LDFLAGS="$LDFLAGS"
2599 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2601 AC_CHECK_LIB(pq, PQconnectdb,
2603 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2605 AC_CHECK_LIB(pq, PQserverVersion,
2607 [with_libpq="no (symbol 'PQserverVersion' not found)"])
2609 LDFLAGS="$SAVE_LDFLAGS"
2611 if test "x$with_libpq" = "xyes"
2613 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2614 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2615 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2616 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2618 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2621 # --with-libpthread {{{
2622 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
2623 [ if test "x$withval" != "xno" \
2624 && test "x$withval" != "xyes"
2626 LDFLAGS="$LDFLAGS -L$withval/lib"
2627 CPPFLAGS="$CPPFLAGS -I$withval/include"
2628 with_libpthread="yes"
2630 if test "x$withval" = "xno"
2632 with_libpthread="no (disabled)"
2635 ], [with_libpthread="yes"])
2636 if test "x$with_libpthread" = "xyes"
2638 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
2641 if test "x$with_libpthread" = "xyes"
2643 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
2645 if test "x$with_libpthread" = "xyes"
2651 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
2652 [Wether or not to use pthread (POSIX threads) library])
2653 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
2656 # --with-librouteros {{{
2657 AC_ARG_WITH(librouteros, [AS_HELP_STRING([--with-librouteros@<:@=PREFIX@:>@], [Path to librouteros.])],
2659 if test "x$withval" = "xyes"
2661 with_librouteros="yes"
2662 else if test "x$withval" = "xno"
2664 with_librouteros="no"
2666 with_librouteros="yes"
2667 LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS -I$withval/include"
2668 LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS -L$withval/lib"
2671 [with_librouteros="yes"])
2673 SAVE_CPPFLAGS="$CPPFLAGS"
2674 SAVE_LDFLAGS="$LDFLAGS"
2676 CPPFLAGS="$CPPFLAGS $LIBROUTEROS_CPPFLAGS"
2677 LDFLAGS="$LDFLAGS $LIBROUTEROS_LDFLAGS"
2679 if test "x$with_librouteros" = "xyes"
2681 if test "x$LIBROUTEROS_CPPFLAGS" != "x"
2683 AC_MSG_NOTICE([librouteros CPPFLAGS: $LIBROUTEROS_CPPFLAGS])
2685 AC_CHECK_HEADERS(routeros_api.h,
2686 [with_librouteros="yes"],
2687 [with_librouteros="no ('routeros_api.h' not found)"])
2689 if test "x$with_librouteros" = "xyes"
2691 if test "x$LIBROUTEROS_LDFLAGS" != "x"
2693 AC_MSG_NOTICE([librouteros LDFLAGS: $LIBROUTEROS_LDFLAGS])
2695 AC_CHECK_LIB(routeros, ros_interface,
2696 [with_librouteros="yes"],
2697 [with_librouteros="no (symbol 'ros_interface' not found)"])
2700 CPPFLAGS="$SAVE_CPPFLAGS"
2701 LDFLAGS="$SAVE_LDFLAGS"
2703 if test "x$with_librouteros" = "xyes"
2705 BUILD_WITH_LIBROUTEROS_CPPFLAGS="$LIBROUTEROS_CPPFLAGS"
2706 BUILD_WITH_LIBROUTEROS_LDFLAGS="$LIBROUTEROS_LDFLAGS"
2707 AC_SUBST(BUILD_WITH_LIBROUTEROS_CPPFLAGS)
2708 AC_SUBST(BUILD_WITH_LIBROUTEROS_LDFLAGS)
2710 AM_CONDITIONAL(BUILD_WITH_LIBROUTEROS, test "x$with_librouteros" = "xyes")
2714 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
2717 librrd_threadsafe="yes"
2718 librrd_rrdc_update="no"
2719 AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
2720 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
2722 librrd_cflags="-I$withval/include"
2723 librrd_ldflags="-L$withval/lib"
2726 with_librrd="$withval"
2728 ], [with_librrd="yes"])
2729 if test "x$with_librrd" = "xyes"
2731 SAVE_CPPFLAGS="$CPPFLAGS"
2732 SAVE_LDFLAGS="$LDFLAGS"
2734 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2735 LDFLAGS="$LDFLAGS $librrd_ldflags"
2737 AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
2739 CPPFLAGS="$SAVE_CPPFLAGS"
2740 LDFLAGS="$SAVE_LDFLAGS"
2742 if test "x$with_librrd" = "xyes"
2744 SAVE_CPPFLAGS="$CPPFLAGS"
2745 SAVE_LDFLAGS="$LDFLAGS"
2747 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2748 LDFLAGS="$LDFLAGS $librrd_ldflags"
2750 AC_CHECK_LIB(rrd_th, rrd_update_r,
2752 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
2754 [librrd_threadsafe="no"
2755 AC_CHECK_LIB(rrd, rrd_update,
2757 librrd_ldflags="$librrd_ldflags -lrrd -lm"
2759 [with_librrd="no (symbol 'rrd_update' not found)"],
2764 if test "x$librrd_threadsafe" = "xyes"
2766 AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2768 AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2771 CPPFLAGS="$SAVE_CPPFLAGS"
2772 LDFLAGS="$SAVE_LDFLAGS"
2774 if test "x$with_librrd" = "xyes"
2776 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
2777 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
2778 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
2779 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
2781 if test "x$librrd_threadsafe" = "xyes"
2783 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
2787 # --with-libsensors {{{
2788 with_sensors_cflags=""
2789 with_sensors_ldflags=""
2790 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
2792 if test "x$withval" = "xno"
2794 with_libsensors="no"
2796 with_libsensors="yes"
2797 if test "x$withval" != "xyes"
2799 with_sensors_cflags="-I$withval/include"
2800 with_sensors_ldflags="-L$withval/lib"
2801 with_libsensors="yes"
2806 if test "x$ac_system" = "xLinux"
2808 with_libsensors="yes"
2810 with_libsensors="no (Linux only library)"
2813 if test "x$with_libsensors" = "xyes"
2815 SAVE_CPPFLAGS="$CPPFLAGS"
2816 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2818 # AC_CHECK_HEADERS(sensors/sensors.h,
2820 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
2822 # [with_libsensors="no (sensors/sensors.h not found)"])
2823 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
2825 CPPFLAGS="$SAVE_CPPFLAGS"
2827 if test "x$with_libsensors" = "xyes"
2829 SAVE_CPPFLAGS="$CPPFLAGS"
2830 SAVE_LDFLAGS="$LDFLAGS"
2831 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2832 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
2834 AC_CHECK_LIB(sensors, sensors_init,
2836 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
2838 [with_libsensors="no (libsensors not found)"])
2840 CPPFLAGS="$SAVE_CPPFLAGS"
2841 LDFLAGS="$SAVE_LDFLAGS"
2843 if test "x$with_libsensors" = "xyes"
2845 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
2846 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
2847 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
2848 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
2850 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
2853 # --with-libstatgrab {{{
2854 with_libstatgrab_cflags=""
2855 with_libstatgrab_ldflags=""
2856 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
2858 if test "x$withval" != "xno" \
2859 && test "x$withval" != "xyes"
2861 with_libstatgrab_cflags="-I$withval/include"
2862 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
2863 with_libstatgrab="yes"
2864 with_libstatgrab_pkg_config="no"
2866 with_libstatgrab="$withval"
2867 with_libstatgrab_pkg_config="yes"
2871 with_libstatgrab="yes"
2872 with_libstatgrab_pkg_config="yes"
2875 if test "x$with_libstatgrab" = "xyes" \
2876 && test "x$with_libstatgrab_pkg_config" = "xyes"
2878 if test "x$PKG_CONFIG" != "x"
2880 AC_MSG_CHECKING([pkg-config for libstatgrab])
2882 $PKG_CONFIG --exists libstatgrab 2>/dev/null
2885 with_libstatgrab_pkg_config="no"
2886 with_libstatgrab="no ($PKG_CONFIG doesn't know libstatgrab)"
2887 temp_result="not found"
2889 AC_MSG_RESULT([$temp_result])
2891 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
2892 with_libstatgrab_pkg_config="no"
2893 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
2897 if test "x$with_libstatgrab" = "xyes" \
2898 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2899 && test "x$with_libstatgrab_cflags" = "x"
2901 AC_MSG_CHECKING([for libstatgrab CFLAGS])
2902 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
2905 with_libstatgrab_cflags="$temp_result"
2907 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
2908 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
2910 AC_MSG_RESULT([$temp_result])
2913 if test "x$with_libstatgrab" = "xyes" \
2914 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2915 && test "x$with_libstatgrab_ldflags" = "x"
2917 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
2918 temp_result="`$PKG_CONFIG --libs libstatgrab`"
2921 with_libstatgrab_ldflags="$temp_result"
2923 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
2924 temp_result="$PKG_CONFIG --libs libstatgrab failed"
2926 AC_MSG_RESULT([$temp_result])
2929 if test "x$with_libstatgrab" = "xyes"
2931 SAVE_CPPFLAGS="$CPPFLAGS"
2932 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
2934 AC_CHECK_HEADERS(statgrab.h,
2935 [with_libstatgrab="yes"],
2936 [with_libstatgrab="no (statgrab.h not found)"])
2938 CPPFLAGS="$SAVE_CPPFLAGS"
2941 if test "x$with_libstatgrab" = "xyes"
2943 SAVE_CFLAGS="$CFLAGS"
2944 SAVE_LDFLAGS="$LDFLAGS"
2946 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
2947 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
2949 AC_CHECK_LIB(statgrab, sg_init,
2950 [with_libstatgrab="yes"],
2951 [with_libstatgrab="no (symbol sg_init not found)"])
2953 CFLAGS="$SAVE_CFLAGS"
2954 LDFLAGS="$SAVE_LDFLAGS"
2957 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
2958 if test "x$with_libstatgrab" = "xyes"
2960 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
2961 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
2962 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
2963 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
2964 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
2968 # --with-libtokyotyrant {{{
2969 with_libtokyotyrant_cppflags=""
2970 with_libtokyotyrant_ldflags=""
2971 with_libtokyotyrant_libs=""
2972 AC_ARG_WITH(libtokyotyrant, [AS_HELP_STRING([--with-libtokyotyrant@<:@=PREFIX@:>@], [Path to libtokyotyrant.])],
2974 if test "x$withval" = "xno"
2976 with_libtokyotyrant="no"
2977 else if test "x$withval" = "xyes"
2979 with_libtokyotyrant="yes"
2981 with_libtokyotyrant_cppflags="-I$withval/include"
2982 with_libtokyotyrant_ldflags="-L$withval/include"
2983 with_libtokyotyrant_libs="-ltokyotyrant"
2984 with_libtokyotyrant="yes"
2988 with_libtokyotyrant="yes"
2991 if test "x$with_libtokyotyrant" = "xyes"
2993 if $PKG_CONFIG --exists tokyotyrant
2995 with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
2996 with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `pkg-config --libs-only-L tokyotyrant`"
2997 with_libtokyotyrant_libs="$with_libtokyotyrant_libs `pkg-config --libs-only-l tokyotyrant`"
3001 SAVE_CPPFLAGS="$CPPFLAGS"
3002 SAVE_LDFLAGS="$LDFLAGS"
3003 CPPFLAGS="$CPPFLAGS $with_libtokyotyrant_cppflags"
3004 LDFLAGS="$LDFLAGS $with_libtokyotyrant_ldflags"
3006 if test "x$with_libtokyotyrant" = "xyes"
3008 AC_CHECK_HEADERS(tcrdb.h,
3010 AC_DEFINE(HAVE_TCRDB_H, 1,
3011 [Define to 1 if you have the <tcrdb.h> header file.])
3012 ], [with_libtokyotyrant="no (tcrdb.h not found)"])
3015 if test "x$with_libtokyotyrant" = "xyes"
3017 AC_CHECK_LIB(tokyotyrant, tcrdbrnum,
3019 AC_DEFINE(HAVE_LIBTOKYOTYRANT, 1,
3020 [Define to 1 if you have the tokyotyrant library (-ltokyotyrant).])
3022 [with_libtokyotyrant="no (symbol tcrdbrnum not found)"],
3023 [$with_libtokyotyrant_libs])
3026 CPPFLAGS="$SAVE_CPPFLAGS"
3027 LDFLAGS="$SAVE_LDFLAGS"
3029 if test "x$with_libtokyotyrant" = "xyes"
3031 BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
3032 BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
3033 BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
3034 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
3035 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
3036 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
3038 AM_CONDITIONAL(BUILD_WITH_LIBTOKYOTYRANT, test "x$with_libtokyotyrant" = "xyes")
3041 # --with-libupsclient {{{
3042 with_libupsclient_config=""
3043 with_libupsclient_cflags=""
3044 with_libupsclient_libs=""
3045 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
3047 if test "x$withval" = "xno"
3049 with_libupsclient="no"
3050 else if test "x$withval" = "xyes"
3052 with_libupsclient="use_pkgconfig"
3054 if test -x "$withval"
3056 with_libupsclient_config="$withval"
3057 with_libupsclient="use_libupsclient_config"
3058 else if test -x "$withval/bin/libupsclient-config"
3060 with_libupsclient_config="$withval/bin/net-snmp-config"
3061 with_libupsclient="use_libupsclient_config"
3063 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
3064 with_libupsclient_cflags="-I$withval/include"
3065 with_libupsclient_libs="-L$withval/lib -lupsclient"
3066 with_libupsclient="yes"
3070 [with_libupsclient="use_pkgconfig"])
3072 # configure using libupsclient-config
3073 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3075 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
3076 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
3079 with_libupsclient="no ($with_libupsclient_config failed)"
3081 with_libupsclient_libs="`$with_libupsclient_config --libs`"
3084 with_libupsclient="no ($with_libupsclient_config failed)"
3087 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3089 with_libupsclient="yes"
3092 # configure using pkg-config
3093 if test "x$with_libupsclient" = "xuse_pkgconfig"
3095 if test "x$PKG_CONFIG" = "x"
3097 with_libupsclient="no (Don't have pkg-config)"
3100 if test "x$with_libupsclient" = "xuse_pkgconfig"
3102 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
3103 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
3106 with_libupsclient="no (pkg-config doesn't know library)"
3109 if test "x$with_libupsclient" = "xuse_pkgconfig"
3111 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
3114 with_libupsclient="no ($PKG_CONFIG failed)"
3116 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
3119 with_libupsclient="no ($PKG_CONFIG failed)"
3122 if test "x$with_libupsclient" = "xuse_pkgconfig"
3124 with_libupsclient="yes"
3127 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
3128 # the actual checks.
3129 if test "x$with_libupsclient" = "xyes"
3131 SAVE_CPPFLAGS="$CPPFLAGS"
3132 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3134 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
3136 CPPFLAGS="$SAVE_CPPFLAGS"
3138 if test "x$with_libupsclient" = "xyes"
3140 SAVE_CPPFLAGS="$CPPFLAGS"
3141 SAVE_LDFLAGS="$LDFLAGS"
3143 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3144 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
3146 AC_CHECK_LIB(upsclient, upscli_connect,
3147 [with_libupsclient="yes"],
3148 [with_libupsclient="no (symbol upscli_connect not found)"])
3150 CPPFLAGS="$SAVE_CPPFLAGS"
3151 LDFLAGS="$SAVE_LDFLAGS"
3153 if test "x$with_libupsclient" = "xyes"
3155 SAVE_CPPFLAGS="$CPPFLAGS"
3156 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3158 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
3159 [#include <stdlib.h>
3161 #include <upsclient.h>])
3163 CPPFLAGS="$SAVE_CPPFLAGS"
3165 if test "x$with_libupsclient" = "xyes"
3167 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
3168 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
3169 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
3170 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
3174 # --with-libxmms {{{
3175 with_xmms_config="xmms-config"
3178 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
3180 if test "x$withval" != "xno" \
3181 && test "x$withval" != "xyes"
3183 if test -f "$withval" && test -x "$withval";
3185 with_xmms_config="$withval"
3186 else if test -x "$withval/bin/xmms-config"
3188 with_xmms_config="$withval/bin/xmms-config"
3191 else if test "x$withval" = "xno"
3201 if test "x$with_libxmms" = "xyes"
3203 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
3204 xmms_config_status=$?
3206 if test $xmms_config_status -ne 0
3211 if test "x$with_libxmms" = "xyes"
3213 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
3214 xmms_config_status=$?
3216 if test $xmms_config_status -ne 0
3221 if test "x$with_libxmms" = "xyes"
3223 AC_CHECK_LIB(xmms, xmms_remote_get_info,
3225 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
3226 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
3227 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
3228 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
3235 with_libxmms_numeric=0
3236 if test "x$with_libxmms" = "xyes"
3238 with_libxmms_numeric=1
3240 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
3241 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
3244 # --with-libyajl {{{
3245 with_libyajl_cppflags=""
3246 with_libyajl_ldflags=""
3247 AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
3249 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3251 with_libyajl_cppflags="-I$withval/include"
3252 with_libyajl_ldflags="-L$withval/lib"
3255 with_libyajl="$withval"
3261 if test "x$with_libyajl" = "xyes"
3263 SAVE_CPPFLAGS="$CPPFLAGS"
3264 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3266 AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"])
3268 CPPFLAGS="$SAVE_CPPFLAGS"
3270 if test "x$with_libyajl" = "xyes"
3272 SAVE_CPPFLAGS="$CPPFLAGS"
3273 SAVE_LDFLAGS="$LDFLAGS"
3274 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3275 LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
3277 AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"])
3279 CPPFLAGS="$SAVE_CPPFLAGS"
3280 LDFLAGS="$SAVE_LDFLAGS"
3282 if test "x$with_libyajl" = "xyes"
3284 BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
3285 BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
3286 BUILD_WITH_LIBYAJL_LIBS="-lyajl"
3287 AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS)
3288 AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS)
3289 AC_SUBST(BUILD_WITH_LIBYAJL_LIBS)
3290 AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.])
3292 AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
3295 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
3296 with_libxml2="no (pkg-config isn't available)"
3297 with_libxml2_cflags=""
3298 with_libxml2_ldflags=""
3299 with_libvirt="no (pkg-config isn't available)"
3300 with_libvirt_cflags=""
3301 with_libvirt_ldflags=""
3302 if test "x$PKG_CONFIG" != "x"
3304 pkg-config --exists 'libxml-2.0' 2>/dev/null
3309 with_libxml2="no (pkg-config doesn't know library)"
3312 pkg-config --exists libvirt 2>/dev/null
3317 with_libvirt="no (pkg-config doesn't know library)"
3320 if test "x$with_libxml2" = "xyes"
3322 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
3327 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
3333 if test "x$with_libxml2" = "xyes"
3335 SAVE_CPPFLAGS="$CPPFLAGS"
3336 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
3338 AC_CHECK_HEADERS(libxml/parser.h, [],
3339 [with_libxml2="no (libxml/parser.h not found)"])
3341 CPPFLAGS="$SAVE_CPPFLAGS"
3343 if test "x$with_libxml2" = "xyes"
3345 SAVE_CFLAGS="$CFLAGS"
3346 SAVE_LDFLAGS="$LDFLAGS"
3348 CFLAGS="$CFLAGS $with_libxml2_cflags"
3349 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
3351 AC_CHECK_LIB(xml2, xmlXPathEval,
3352 [with_libxml2="yes"],
3353 [with_libxml2="no (symbol xmlXPathEval not found)"])
3355 CFLAGS="$SAVE_CFLAGS"
3356 LDFLAGS="$SAVE_LDFLAGS"
3358 dnl Add the right compiler flags and libraries.
3359 if test "x$with_libxml2" = "xyes"; then
3360 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
3361 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
3362 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
3363 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
3365 if test "x$with_libvirt" = "xyes"
3367 with_libvirt_cflags="`pkg-config --cflags libvirt`"
3372 with_libvirt_ldflags="`pkg-config --libs libvirt`"
3378 if test "x$with_libvirt" = "xyes"
3380 SAVE_CPPFLAGS="$CPPFLAGS"
3381 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
3383 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
3384 [with_libvirt="no (libvirt/libvirt.h not found)"])
3386 CPPFLAGS="$SAVE_CPPFLAGS"
3388 if test "x$with_libvirt" = "xyes"
3390 SAVE_CFLAGS="$CFLAGS"
3391 SAVE_LDFLAGS="$LDFLAGS"
3393 CFLAGS="$CFLAGS $with_libvirt_cflags"
3394 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
3396 AC_CHECK_LIB(virt, virDomainBlockStats,
3397 [with_libvirt="yes"],
3398 [with_libvirt="no (symbol virDomainBlockStats not found)"])
3400 CFLAGS="$SAVE_CFLAGS"
3401 LDFLAGS="$SAVE_LDFLAGS"
3403 dnl Add the right compiler flags and libraries.
3404 if test "x$with_libvirt" = "xyes"; then
3405 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
3406 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
3407 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
3408 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
3412 # $PKG_CONFIG --exists OpenIPMIpthread {{{
3413 with_libopenipmipthread="yes"
3414 with_libopenipmipthread_cflags=""
3415 with_libopenipmipthread_libs=""
3417 AC_MSG_CHECKING([for pkg-config])
3419 if test "x$PKG_CONFIG" = "x"
3421 with_libopenipmipthread="no"
3424 temp_result="$PKG_CONFIG"
3426 AC_MSG_RESULT([$temp_result])
3428 if test "x$with_libopenipmipthread" = "xyes"
3430 AC_MSG_CHECKING([for libOpenIPMIpthread])
3431 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
3434 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
3436 AC_MSG_RESULT([$with_libopenipmipthread])
3439 if test "x$with_libopenipmipthread" = "xyes"
3441 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
3442 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
3445 with_libopenipmipthread_cflags="$temp_result"
3447 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
3448 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
3450 AC_MSG_RESULT([$temp_result])
3453 if test "x$with_libopenipmipthread" = "xyes"
3455 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
3456 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
3459 with_libopenipmipthread_ldflags="$temp_result"
3461 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
3462 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
3464 AC_MSG_RESULT([$temp_result])
3467 if test "x$with_libopenipmipthread" = "xyes"
3469 SAVE_CPPFLAGS="$CPPFLAGS"
3470 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
3472 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
3473 [with_libopenipmipthread="yes"],
3474 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
3475 [#include <OpenIPMI/ipmiif.h>
3476 #include <OpenIPMI/ipmi_err.h>
3477 #include <OpenIPMI/ipmi_posix.h>
3478 #include <OpenIPMI/ipmi_conn.h>
3481 CPPFLAGS="$SAVE_CPPFLAGS"
3484 if test "x$with_libopenipmipthread" = "xyes"
3486 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
3487 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
3488 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
3489 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
3493 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
3494 [with_libnotify="yes"],
3495 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
3497 # Check for enabled/disabled features
3500 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
3501 # ------------------------------------------------------------
3503 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
3508 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
3513 m4_define([EnDis],[disabled])dnl
3514 m4_define([YesNo],[no])dnl
3520 m4_define([EnDis],[enabled])dnl
3521 m4_define([YesNo],[yes])dnl
3524 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
3528 m4_if([$3], [feature], [],
3532 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
3538 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
3540 enable_$1='[YesNo]'dnl
3542 if test "x$enable_$1" = "xno"
3546 if test "x$enable_$1" = "xyes"
3550 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
3555 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
3556 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
3558 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
3560 # AC_PLUGIN(name, default, info)
3561 # ------------------------------------------------------------
3568 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
3570 if test "x$enableval" = "xyes"
3573 else if test "x$enableval" = "xforce"
3582 if test "x$enable_all_plugins" = "xauto"
3584 if test "x$2" = "xyes"
3591 enable_plugin="$enable_all_plugins"
3594 if test "x$enable_plugin" = "xyes"
3596 if test "x$2" = "xyes" || test "x$force" = "xyes"
3598 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
3599 if test "x$2" != "xyes"
3601 dependency_warning="yes"
3603 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
3604 dependency_error="yes"
3605 enable_plugin="no (dependency error)"
3608 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
3609 enable_$1="$enable_plugin"
3611 )# AC_PLUGIN(name, default, info)
3613 m4_divert_once([HELP_ENABLE], [
3614 collectd features:])
3615 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
3616 AC_COLLECTD([debug], [enable], [feature], [debugging])
3617 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
3618 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
3620 dependency_warning="no"
3621 dependency_error="no"
3626 plugin_conntrack="no"
3627 plugin_contextswitch="no"
3630 plugin_curl_json="no"
3634 plugin_interface="no"
3641 plugin_multimeter="no"
3645 plugin_processes="no"
3646 plugin_protocols="no"
3650 plugin_tcpconns="no"
3657 plugin_wireless="no"
3661 if test "x$ac_system" = "xLinux"
3663 plugin_battery="yes"
3664 plugin_conntrack="yes"
3665 plugin_contextswitch="yes"
3667 plugin_cpufreq="yes"
3669 plugin_entropy="yes"
3670 plugin_interface="yes"
3675 plugin_fscache="yes"
3676 plugin_processes="yes"
3677 plugin_protocols="yes"
3680 plugin_tcpconns="yes"
3681 plugin_thermal="yes"
3684 plugin_vserver="yes"
3685 plugin_wireless="yes"
3687 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
3693 if test "x$ac_system" = "xOpenBSD"
3695 plugin_tcpconns="yes"
3699 if test "x$with_libiokit" = "xyes"
3701 plugin_battery="yes"
3706 if test "x$with_kstat" = "xyes"
3709 plugin_zfs_arc="yes"
3712 if test "x$with_devinfo$with_kstat" = "xyesyes"
3716 plugin_interface="yes"
3721 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
3727 if test "x$with_libstatgrab" = "xyes"
3731 plugin_interface="yes"
3738 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
3744 if test "x$with_libopenipmipthread" = "xyes"
3749 if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"
3751 plugin_curl_json="yes"
3754 if test "x$have_processor_info" = "xyes"
3758 if test "x$have_sysctl" = "xyes"
3765 if test "x$have_sysctlbyname" = "xyes"
3769 plugin_tcpconns="yes"
3772 # Df plugin: Check if we know how to determine mount points first.
3773 #if test "x$have_listmntent" = "xyes"; then
3776 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
3780 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
3784 #if test "x$have_getmntent" = "xseq"
3788 if test "x$c_cv_have_one_getmntent" = "xyes"
3793 # Df plugin: Check if we have either `statfs' or `statvfs' second.
3794 if test "x$plugin_df" = "xyes"
3797 if test "x$have_statfs" = "xyes"
3801 if test "x$have_statvfs" = "xyes"
3807 if test "x$have_getifaddrs" = "xyes"
3809 plugin_interface="yes"
3812 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
3814 plugin_libvirt="yes"
3817 if test "x$have_getloadavg" = "xyes"
3822 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
3827 # Mac OS X memory interface
3828 if test "x$have_host_statistics" = "xyes"
3833 if test "x$have_termios_h" = "xyes"
3835 plugin_multimeter="yes"
3839 if test "x$have_thread_info" = "xyes"
3841 plugin_processes="yes"
3844 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
3846 plugin_processes="yes"
3849 if test "x$with_kvm_getswapinfo" = "xyes"
3854 if test "x$have_swapctl" = "xyes"
3859 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
3861 plugin_tcpconns="yes"
3864 if test "x$have_getutent" = "xyes"
3868 if test "x$have_getutxent" = "xyes"
3873 m4_divert_once([HELP_ENABLE], [
3876 AC_ARG_ENABLE([all-plugins],
3877 AC_HELP_STRING([--enable-all-plugins],
3878 [enable all plugins (auto by def)]),
3880 if test "x$enableval" = "xyes"
3882 enable_all_plugins="yes"
3883 else if test "x$enableval" = "xauto"
3885 enable_all_plugins="auto"
3887 enable_all_plugins="no"
3890 [enable_all_plugins="auto"])
3892 m4_divert_once([HELP_ENABLE], [])
3894 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
3895 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
3896 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
3897 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
3898 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
3899 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
3900 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
3901 AC_PLUGIN([contextswitch], [$plugin_contextswitch], [context switch statistics])
3902 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
3903 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
3904 AC_PLUGIN([csv], [yes], [CSV output plugin])
3905 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
3906 AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics])
3907 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
3908 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
3909 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
3910 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
3911 AC_PLUGIN([email], [yes], [EMail statistics])
3912 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
3913 AC_PLUGIN([exec], [yes], [Execution of external programs])
3914 AC_PLUGIN([filecount], [yes], [Count files in directories])
3915 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
3916 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
3917 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
3918 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
3919 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
3920 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
3921 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
3922 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
3923 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
3924 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
3925 AC_PLUGIN([load], [$plugin_load], [System load])
3926 AC_PLUGIN([logfile], [yes], [File logging plugin])
3927 AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
3928 AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
3929 AC_PLUGIN([match_hashed], [yes], [The hashed match])
3930 AC_PLUGIN([match_regex], [yes], [The regex match])
3931 AC_PLUGIN([match_timediff], [yes], [The timediff match])
3932 AC_PLUGIN([match_value], [yes], [The value match])
3933 AC_PLUGIN([mbmon], [yes], [Query mbmond])
3934 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
3935 AC_PLUGIN([memcached], [yes], [memcached statistics])
3936 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
3937 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
3938 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
3939 AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
3940 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
3941 AC_PLUGIN([network], [yes], [Network communication plugin])
3942 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
3943 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
3944 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
3945 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
3946 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
3947 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
3948 AC_PLUGIN([olsrd], [yes], [olsrd statistics])
3949 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
3950 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
3951 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
3952 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
3953 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
3954 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
3955 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
3956 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
3957 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
3958 AC_PLUGIN([routeros], [$with_librouteros], [RouterOS plugin])
3959 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
3960 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
3961 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
3962 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
3963 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
3964 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
3965 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
3966 AC_PLUGIN([table], [yes], [Parsing of tabular data])
3967 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
3968 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
3969 AC_PLUGIN([target_notification], [yes], [The notification target])
3970 AC_PLUGIN([target_replace], [yes], [The replace target])
3971 AC_PLUGIN([target_scale],[yes], [The scale target])
3972 AC_PLUGIN([target_set], [yes], [The set target])
3973 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
3974 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
3975 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
3976 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
3977 AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics])
3978 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
3979 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
3980 AC_PLUGIN([users], [$plugin_users], [User statistics])
3981 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
3982 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
3983 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
3984 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
3985 AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
3986 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
3987 AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
3989 dnl Default configuration file
3990 # Load either syslog or logfile
3991 LOAD_PLUGIN_SYSLOG=""
3992 LOAD_PLUGIN_LOGFILE=""
3994 AC_MSG_CHECKING([which default log plugin to load])
3995 default_log_plugin="none"
3996 if test "x$enable_syslog" = "xyes"
3998 default_log_plugin="syslog"
4000 LOAD_PLUGIN_SYSLOG="##"
4003 if test "x$enable_logfile" = "xyes"
4005 if test "x$default_log_plugin" = "xnone"
4007 default_log_plugin="logfile"
4009 LOAD_PLUGIN_LOGFILE="#"
4012 LOAD_PLUGIN_LOGFILE="##"
4014 AC_MSG_RESULT([$default_log_plugin])
4016 AC_SUBST(LOAD_PLUGIN_SYSLOG)
4017 AC_SUBST(LOAD_PLUGIN_LOGFILE)
4019 DEFAULT_LOG_LEVEL="info"
4020 if test "x$enable_debug" = "xyes"
4022 DEFAULT_LOG_LEVEL="debug"
4024 AC_SUBST(DEFAULT_LOG_LEVEL)
4026 # Load only one of rrdtool, network, csv in the default config.
4027 LOAD_PLUGIN_RRDTOOL=""
4028 LOAD_PLUGIN_NETWORK=""
4031 AC_MSG_CHECKING([which default write plugin to load])
4032 default_write_plugin="none"
4033 if test "x$enable_rrdtool" = "xyes"
4035 default_write_plugin="rrdtool"
4037 LOAD_PLUGIN_RRDTOOL="##"
4040 if test "x$enable_network" = "xyes"
4042 if test "x$default_write_plugin" = "xnone"
4044 default_write_plugin="network"
4046 LOAD_PLUGIN_NETWORK="#"
4049 LOAD_PLUGIN_NETWORK="##"
4052 if test "x$enable_csv" = "xyes"
4054 if test "x$default_write_plugin" = "xnone"
4056 default_write_plugin="csv"
4061 LOAD_PLUGIN_CSV="##"
4063 AC_MSG_RESULT([$default_write_plugin])
4065 AC_SUBST(LOAD_PLUGIN_RRDTOOL)
4066 AC_SUBST(LOAD_PLUGIN_NETWORK)
4067 AC_SUBST(LOAD_PLUGIN_CSV)
4070 if test "x$ac_system" = "xLinux" \
4071 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
4073 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
4077 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
4079 if test "x$withval" != "xno" && test "x$withval" != "xyes"
4081 PERL_BINDINGS_OPTIONS="$withval"
4082 with_perl_bindings="yes"
4084 PERL_BINDINGS_OPTIONS=""
4085 with_perl_bindings="$withval"
4089 PERL_BINDINGS_OPTIONS=""
4090 if test -n "$perl_interpreter"
4092 with_perl_bindings="yes"
4094 with_perl_bindings="no (no perl interpreter found)"
4097 if test "x$with_perl_bindings" = "xyes"
4099 PERL_BINDINGS="perl"
4103 AC_SUBST(PERL_BINDINGS)
4104 AC_SUBST(PERL_BINDINGS_OPTIONS)
4106 dnl libcollectdclient
4107 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
4108 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
4109 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
4111 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
4113 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
4115 AC_SUBST(LCC_VERSION_MAJOR)
4116 AC_SUBST(LCC_VERSION_MINOR)
4117 AC_SUBST(LCC_VERSION_PATCH)
4118 AC_SUBST(LCC_VERSION_EXTRA)
4119 AC_SUBST(LCC_VERSION_STRING)
4121 AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
4123 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/owniptc/Makefile src/libcollectdclient/Makefile src/libcollectdclient/libcollectdclient.pc src/liboconfig/Makefile bindings/Makefile bindings/java/Makefile)
4125 if test "x$with_librrd" = "xyes" \
4126 && test "x$librrd_threadsafe" != "xyes"
4128 with_librrd="yes (warning: librrd is not thread-safe)"
4131 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes"
4133 with_libiptc="yes (shipped version)"
4136 if test "x$with_libperl" = "xyes"
4138 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
4140 enable_perl="no (needs libperl)"
4143 if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"
4145 enable_perl="no (libperl doesn't support ithreads)"
4148 if test "x$with_perl_bindings" = "xyes" \
4149 && test "x$PERL_BINDINGS_OPTIONS" != "x"
4151 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
4158 libcurl . . . . . . . $with_libcurl
4159 libdbi . . . . . . . $with_libdbi
4160 libesmtp . . . . . . $with_libesmtp
4161 libganglia . . . . . $with_libganglia
4162 libgcrypt . . . . . . $with_libgcrypt
4163 libiokit . . . . . . $with_libiokit
4164 libiptc . . . . . . . $with_libiptc
4165 libjvm . . . . . . . $with_java
4166 libkstat . . . . . . $with_kstat
4167 libkvm . . . . . . . $with_libkvm
4168 libmemcached . . . . $with_libmemcached
4169 libmysql . . . . . . $with_libmysql
4170 libnetapp . . . . . . $with_libnetapp
4171 libnetlink . . . . . $with_libnetlink
4172 libnetsnmp . . . . . $with_libnetsnmp
4173 libnotify . . . . . . $with_libnotify
4174 liboconfig . . . . . $with_liboconfig
4175 libopenipmi . . . . . $with_libopenipmipthread
4176 liboping . . . . . . $with_liboping
4177 libpcap . . . . . . . $with_libpcap
4178 libperl . . . . . . . $with_libperl
4179 libpq . . . . . . . . $with_libpq
4180 libpthread . . . . . $with_libpthread
4181 librouteros . . . . . $with_librouteros
4182 librrd . . . . . . . $with_librrd
4183 libsensors . . . . . $with_libsensors
4184 libstatgrab . . . . . $with_libstatgrab
4185 libtokyotyrant . . . $with_libtokyotyrant
4186 libupsclient . . . . $with_libupsclient
4187 libvirt . . . . . . . $with_libvirt
4188 libxml2 . . . . . . . $with_libxml2
4189 libxmms . . . . . . . $with_libxmms
4190 libyajl . . . . . . . $with_libyajl
4191 oracle . . . . . . . $with_oracle
4194 daemon mode . . . . . $enable_daemon
4195 debug . . . . . . . . $enable_debug
4198 perl . . . . . . . . $with_perl_bindings
4201 apache . . . . . . . $enable_apache
4202 apcups . . . . . . . $enable_apcups
4203 apple_sensors . . . . $enable_apple_sensors
4204 ascent . . . . . . . $enable_ascent
4205 battery . . . . . . . $enable_battery
4206 bind . . . . . . . . $enable_bind
4207 conntrack . . . . . . $enable_conntrack
4208 contextswitch . . . . $enable_contextswitch
4209 cpu . . . . . . . . . $enable_cpu
4210 cpufreq . . . . . . . $enable_cpufreq
4211 csv . . . . . . . . . $enable_csv
4212 curl . . . . . . . . $enable_curl
4213 curl_json . . . . . . $enable_curl_json
4214 dbi . . . . . . . . . $enable_dbi
4215 df . . . . . . . . . $enable_df
4216 disk . . . . . . . . $enable_disk
4217 dns . . . . . . . . . $enable_dns
4218 email . . . . . . . . $enable_email
4219 entropy . . . . . . . $enable_entropy
4220 exec . . . . . . . . $enable_exec
4221 filecount . . . . . . $enable_filecount
4222 fscache . . . . . . . $enable_fscache
4223 gmond . . . . . . . . $enable_gmond
4224 hddtemp . . . . . . . $enable_hddtemp
4225 interface . . . . . . $enable_interface
4226 ipmi . . . . . . . . $enable_ipmi
4227 iptables . . . . . . $enable_iptables
4228 ipvs . . . . . . . . $enable_ipvs
4229 irq . . . . . . . . . $enable_irq
4230 java . . . . . . . . $enable_java
4231 libvirt . . . . . . . $enable_libvirt
4232 load . . . . . . . . $enable_load
4233 logfile . . . . . . . $enable_logfile
4234 madwifi . . . . . . . $enable_madwifi
4235 match_empty_counter . $enable_match_empty_counter
4236 match_hashed . . . . $enable_match_hashed
4237 match_regex . . . . . $enable_match_regex
4238 match_timediff . . . $enable_match_timediff
4239 match_value . . . . . $enable_match_value
4240 mbmon . . . . . . . . $enable_mbmon
4241 memcachec . . . . . . $enable_memcachec
4242 memcached . . . . . . $enable_memcached
4243 memory . . . . . . . $enable_memory
4244 multimeter . . . . . $enable_multimeter
4245 mysql . . . . . . . . $enable_mysql
4246 netapp . . . . . . . $enable_netapp
4247 netlink . . . . . . . $enable_netlink
4248 network . . . . . . . $enable_network
4249 nfs . . . . . . . . . $enable_nfs
4250 nginx . . . . . . . . $enable_nginx
4251 notify_desktop . . . $enable_notify_desktop
4252 notify_email . . . . $enable_notify_email
4253 ntpd . . . . . . . . $enable_ntpd
4254 nut . . . . . . . . . $enable_nut
4255 olsrd . . . . . . . . $enable_olsrd
4256 onewire . . . . . . . $enable_onewire
4257 openvpn . . . . . . . $enable_openvpn
4258 oracle . . . . . . . $enable_oracle
4259 perl . . . . . . . . $enable_perl
4260 ping . . . . . . . . $enable_ping
4261 postgresql . . . . . $enable_postgresql
4262 powerdns . . . . . . $enable_powerdns
4263 processes . . . . . . $enable_processes
4264 protocols . . . . . . $enable_protocols
4265 routeros . . . . . . $enable_routeros
4266 rrdcached . . . . . . $enable_rrdcached
4267 rrdtool . . . . . . . $enable_rrdtool
4268 sensors . . . . . . . $enable_sensors
4269 serial . . . . . . . $enable_serial
4270 snmp . . . . . . . . $enable_snmp
4271 swap . . . . . . . . $enable_swap
4272 syslog . . . . . . . $enable_syslog
4273 table . . . . . . . . $enable_table
4274 tail . . . . . . . . $enable_tail
4275 tape . . . . . . . . $enable_tape
4276 target_notification . $enable_target_notification
4277 target_replace . . . $enable_target_replace
4278 target_scale . . . . $enable_target_scale
4279 target_set . . . . . $enable_target_set
4280 tcpconns . . . . . . $enable_tcpconns
4281 teamspeak2 . . . . . $enable_teamspeak2
4282 ted . . . . . . . . . $enable_ted
4283 thermal . . . . . . . $enable_thermal
4284 tokyotyrant . . . . . $enable_tokyotyrant
4285 unixsock . . . . . . $enable_unixsock
4286 uptime . . . . . . . $enable_uptime
4287 users . . . . . . . . $enable_users
4288 uuid . . . . . . . . $enable_uuid
4289 vmem . . . . . . . . $enable_vmem
4290 vserver . . . . . . . $enable_vserver
4291 wireless . . . . . . $enable_wireless
4292 write_http . . . . . $enable_write_http
4293 xmms . . . . . . . . $enable_xmms
4294 zfs_arc . . . . . . . $enable_zfs_arc
4298 if test "x$dependency_error" = "xyes"; then
4299 AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
4302 if test "x$dependency_warning" = "xyes"; then
4303 AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
4306 # vim: set fdm=marker :