1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, m4_esyscmd(./version-gen.sh))
3 AC_CONFIG_SRCDIR(src/collectd.c)
4 AC_CONFIG_HEADERS(src/config.h)
6 m4_ifdef([LT_PACKAGE_VERSION],
9 LT_CONFIG_LTDL_DIR([libltdl])
11 LTDL_INIT([convenience])
12 AC_DEFINE(LIBTOOL_VERSION, 2, [Define to used libtool version.])
17 AC_LIBLTDL_CONVENIENCE
21 AC_CONFIG_SUBDIRS(libltdl)
22 AC_DEFINE(LIBTOOL_VERSION, 1, [Define to used libtool version.])
26 AM_INIT_AUTOMAKE(dist-bzip2)
29 AC_PREFIX_DEFAULT("/opt/collectd")
34 # Checks for programs.
42 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
50 AC_MSG_CHECKING([for kernel type ($host_os)])
53 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
57 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
69 AC_MSG_RESULT([$ac_system])
71 if test "x$ac_system" = "xLinux"
73 AC_ARG_VAR([KERNEL_DIR], [path to Linux kernel sources])
74 if test -z "$KERNEL_DIR"
76 KERNEL_DIR="/lib/modules/`uname -r`/source"
79 KERNEL_CFLAGS="-I$KERNEL_DIR/include"
80 AC_SUBST(KERNEL_CFLAGS)
83 if test "x$ac_system" = "xSolaris"
85 AC_DEFINE(_POSIX_PTHREAD_SEMANTICS, 1, [Define to enforce POSIX thread semantics under Solaris.])
88 # Where to install .pc files.
89 pkgconfigdir="${libdir}/pkgconfig"
90 AC_SUBST(pkgconfigdir)
92 # Check for standards compliance mode
93 AC_ARG_ENABLE(standards,
94 AS_HELP_STRING([--enable-standards], [Enable standards compliance mode]),
95 [enable_standards="$enableval"],
96 [enable_standards="no"])
97 if test "x$enable_standards" = "xyes"
99 AC_DEFINE(_ISOC99_SOURCE, 1, [Define to enforce ISO C99 compliance.])
100 AC_DEFINE(_POSIX_C_SOURCE, 200112L, [Define to enforce POSIX.1-2001 compliance.])
101 AC_DEFINE(_XOPEN_SOURCE, 600, [Define to enforce X/Open 6 (XSI) compliance.])
102 AC_DEFINE(_REENTRANT, 1, [Define to enable reentrancy interfaces.])
104 AM_CONDITIONAL(BUILD_FEATURE_STANDARDS, test "x$enable_standards" = "xyes")
107 # Checks for header files.
114 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)
117 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
122 # include <sys/types.h>
125 AC_CHECK_HEADERS(netinet/in.h, [], [],
130 # include <sys/types.h>
132 #if HAVE_NETINET_IN_SYSTM_H
133 # include <netinet/in_systm.h>
136 AC_CHECK_HEADERS(netinet/ip.h, [], [],
141 # include <sys/types.h>
143 #if HAVE_NETINET_IN_SYSTM_H
144 # include <netinet/in_systm.h>
146 #if HAVE_NETINET_IN_H
147 # include <netinet/in.h>
150 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
155 # include <sys/types.h>
157 #if HAVE_NETINET_IN_SYSTM_H
158 # include <netinet/in_systm.h>
160 #if HAVE_NETINET_IN_H
161 # include <netinet/in.h>
163 #if HAVE_NETINET_IP_H
164 # include <netinet/ip.h>
167 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
172 # include <sys/types.h>
174 #if HAVE_NETINET_IN_SYSTM_H
175 # include <netinet/in_systm.h>
177 #if HAVE_NETINET_IN_H
178 # include <netinet/in.h>
180 #if HAVE_NETINET_IP_H
181 # include <netinet/ip.h>
184 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
189 # include <sys/types.h>
191 #if HAVE_NETINET_IN_SYSTM_H
192 # include <netinet/in_systm.h>
194 #if HAVE_NETINET_IN_H
195 # include <netinet/in.h>
198 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
203 # include <sys/types.h>
205 #if HAVE_NETINET_IN_SYSTM_H
206 # include <netinet/in_systm.h>
208 #if HAVE_NETINET_IN_H
209 # include <netinet/in.h>
211 #if HAVE_NETINET_IP6_H
212 # include <netinet/ip6.h>
215 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
220 # include <sys/types.h>
222 #if HAVE_NETINET_IN_SYSTM_H
223 # include <netinet/in_systm.h>
225 #if HAVE_NETINET_IN_H
226 # include <netinet/in.h>
228 #if HAVE_NETINET_IP_H
229 # include <netinet/ip.h>
232 AC_CHECK_HEADERS(netinet/udp.h, [], [],
237 # include <sys/types.h>
239 #if HAVE_NETINET_IN_SYSTM_H
240 # include <netinet/in_systm.h>
242 #if HAVE_NETINET_IN_H
243 # include <netinet/in.h>
245 #if HAVE_NETINET_IP_H
246 # include <netinet/ip.h>
251 AC_CHECK_HEADERS(sys/dkstat.h)
252 if test "x$ac_system" = "xDarwin"
254 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)
255 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
257 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
260 # include <sys/types.h>
263 # include <sys/param.h>
267 AC_MSG_CHECKING([for sysctl kern.cp_times])
268 if test -x /sbin/sysctl
270 /sbin/sysctl kern.cp_times 2>/dev/null
274 AC_DEFINE(HAVE_SYSCTL_KERN_CP_TIMES, 1,
275 [Define if sysctl supports kern.cp_times])
284 AC_CHECK_HEADERS(linux/major.h libgen.h)
286 # For the battery plugin
287 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
289 #if HAVE_IOKIT_IOKITLIB_H
290 # include <IOKit/IOKitLib.h>
292 #if HAVE_IOKIT_IOTYPES_H
293 # include <IOKit/IOTypes.h>
297 # For the swap module
298 have_linux_wireless_h="no"
299 if test "x$ac_system" = "xLinux"
301 AC_CHECK_HEADERS(linux/wireless.h,
302 [have_linux_wireless_h="yes"],
303 [have_linux_wireless_h="no"],
306 #include <sys/ioctl.h>
307 #include <sys/socket.h>
311 # For the swap module
312 have_sys_swap_h="yes"
313 AC_CHECK_HEADERS(sys/swap.h vm/anon.h, [], [have_sys_swap_h="no"],
315 #undef _FILE_OFFSET_BITS
316 #undef _LARGEFILE64_SOURCE
318 # include <sys/types.h>
321 # include <sys/param.h>
325 if test "x$have_sys_swap_h$ac_system" = "xnoSolaris"
328 if test "x$GCC" = "xyes"
330 hint_64="CFLAGS='-m64'"
332 hint_64="CFLAGS='-xarch=v9'"
334 AC_MSG_NOTICE([Solaris detected and sys/swap.h not usable. Try building a 64-bit binary ($hint_64 ./configure).])
338 # For the processes plugin
340 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
342 # For interface plugin
343 AC_CHECK_HEADERS(ifaddrs.h)
344 AC_CHECK_HEADERS(net/if.h, [], [],
347 # include <sys/types.h>
349 #if HAVE_SYS_SOCKET_H
350 # include <sys/socket.h>
353 AC_CHECK_HEADERS(linux/if.h, [], [],
356 # include <sys/types.h>
358 #if HAVE_SYS_SOCKET_H
359 # include <sys/socket.h>
362 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
365 # include <sys/types.h>
367 #if HAVE_SYS_SOCKET_H
368 # include <sys/socket.h>
371 # include <linux/if.h>
376 have_net_ip_vs_h="no"
378 if test "x$ac_system" = "xLinux"
380 SAVE_CFLAGS="$CFLAGS"
381 CFLAGS="$CFLAGS $KERNEL_CFLAGS"
383 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
384 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
386 CFLAGS="$SAVE_CFLAGS"
390 AC_CHECK_HEADERS(sys/ucred.h, [], [],
393 # include <sys/types.h>
396 # include <sys/param.h>
400 # For mount interface
401 AC_CHECK_HEADERS(sys/mount.h, [], [],
404 # include <sys/types.h>
407 # include <sys/param.h>
411 # For the email plugin
412 AC_CHECK_HEADERS(linux/un.h, [], [],
414 #if HAVE_SYS_SOCKET_H
415 # include <sys/socket.h>
419 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)
422 AC_CHECK_HEADERS(arpa/nameser.h)
423 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
425 #if HAVE_ARPA_NAMESER_H
426 # include <arpa/nameser.h>
430 AC_CHECK_HEADERS(net/if_arp.h, [], [],
431 [#if HAVE_SYS_SOCKET_H
432 # include <sys/socket.h>
435 AC_CHECK_HEADERS(net/ppp_defs.h)
436 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
437 [#if HAVE_NET_PPP_DEFS_H
438 # include <net/ppp_defs.h>
441 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
446 # include <sys/types.h>
448 #if HAVE_SYS_SOCKET_H
449 # include <sys/socket.h>
454 #if HAVE_NETINET_IN_H
455 # include <netinet/in.h>
459 # For the multimeter plugin
461 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
464 # Checks for typedefs, structures, and compiler characteristics.
473 # Checks for library functions.
475 AC_PROG_GCC_TRADITIONAL
476 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog sysconf)
480 AC_CACHE_CHECK([for strtok_r],
481 [c_cv_have_strtok_r_default],
490 char buffer[] = "foo,bar,baz";
497 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
500 printf ("token = %s;\n", token);
503 [c_cv_have_strtok_r_default="yes"],
504 [c_cv_have_strtok_r_default="no"]
508 if test "x$c_cv_have_strtok_r_default" = "xno"
510 SAVE_CFLAGS="$CFLAGS"
511 CFLAGS="$CFLAGS -D_REENTRANT=1"
513 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
514 [c_cv_have_strtok_r_reentrant],
523 char buffer[] = "foo,bar,baz";
530 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
533 printf ("token = %s;\n", token);
536 [c_cv_have_strtok_r_reentrant="yes"],
537 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
542 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
544 socket_needs_socket="no"
545 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
546 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
548 nanosleep_needs_rt="no"
549 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
550 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
552 AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
553 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
554 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
555 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
556 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
557 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
558 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
559 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
560 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
561 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
562 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
563 AC_CHECK_FUNCS(swapctl, [have_swapctl="yes"], [have_swapctl="no"])
566 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
569 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
571 if test "x$withval" = "xno"; then
573 else if test "x$withval" = "xyes"; then
580 if test "x$nan_type" = "xnone"; then
581 AC_CACHE_CHECK([whether NAN is defined by default],
582 [c_cv_have_nan_default],
588 static float foo = NAN;
596 [c_cv_have_nan_default="yes"],
597 [c_cv_have_nan_default="no"]
600 if test "x$c_cv_have_nan_default" = "xyes"
605 if test "x$nan_type" = "xnone"; then
606 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
607 [c_cv_have_nan_isoc],
612 #define __USE_ISOC99 1
614 static float foo = NAN;
622 [c_cv_have_nan_isoc="yes"],
623 [c_cv_have_nan_isoc="no"]
626 if test "x$c_cv_have_nan_isoc" = "xyes"
631 if test "x$nan_type" = "xnone"; then
632 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
633 [c_cv_have_nan_zero],
642 #define NAN (0.0 / 0.0)
644 # define isnan(f) ((f) != (f))
646 static float foo = NAN;
654 [c_cv_have_nan_zero="yes"],
655 [c_cv_have_nan_zero="no"]
658 if test "x$c_cv_have_nan_zero" = "xyes"
664 if test "x$nan_type" = "xdefault"; then
665 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
666 [Define if NAN is defined by default and can initialize static variables.])
667 else if test "x$nan_type" = "xisoc99"; then
668 AC_DEFINE(NAN_STATIC_ISOC, 1,
669 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
670 else if test "x$nan_type" = "xzero"; then
671 AC_DEFINE(NAN_ZERO_ZERO, 1,
672 [Define if NAN can be defined as (0.0 / 0.0)])
674 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
677 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
679 if test "x$withval" = "xnothing"; then
680 fp_layout_type="nothing"
681 else if test "x$withval" = "xendianflip"; then
682 fp_layout_type="endianflip"
683 else if test "x$withval" = "xintswap"; then
684 fp_layout_type="intswap"
686 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
689 [fp_layout_type="unknown"])
691 if test "x$fp_layout_type" = "xunknown"; then
692 AC_CACHE_CHECK([if doubles are stored in x86 representation],
693 [c_cv_fp_layout_need_nothing],
704 # include <stdbool.h>
714 memcpy ((void *) &i0, (void *) &d, 8);
717 memcpy ((void *) c, (void *) &i1, 8);
719 if ((c[0] == 0x2f) && (c[1] == 0x25)
720 && (c[2] == 0xc0) && (c[3] == 0xc7)
721 && (c[4] == 0x43) && (c[5] == 0x2b)
722 && (c[6] == 0x1f) && (c[7] == 0x5b))
727 [c_cv_fp_layout_need_nothing="yes"],
728 [c_cv_fp_layout_need_nothing="no"]
731 if test "x$c_cv_fp_layout_need_nothing" = "xyes"; then
732 fp_layout_type="nothing"
735 if test "x$fp_layout_type" = "xunknown"; then
736 AC_CACHE_CHECK([if endianflip converts to x86 representation],
737 [c_cv_fp_layout_need_endianflip],
748 # include <stdbool.h>
750 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
751 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
752 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
753 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
754 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
755 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
756 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
757 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
766 memcpy ((void *) &i0, (void *) &d, 8);
768 i1 = endianflip (i0);
769 memcpy ((void *) c, (void *) &i1, 8);
771 if ((c[0] == 0x2f) && (c[1] == 0x25)
772 && (c[2] == 0xc0) && (c[3] == 0xc7)
773 && (c[4] == 0x43) && (c[5] == 0x2b)
774 && (c[6] == 0x1f) && (c[7] == 0x5b))
779 [c_cv_fp_layout_need_endianflip="yes"],
780 [c_cv_fp_layout_need_endianflip="no"]
783 if test "x$c_cv_fp_layout_need_endianflip" = "xyes"; then
784 fp_layout_type="endianflip"
787 if test "x$fp_layout_type" = "xunknown"; then
788 AC_CACHE_CHECK([if intswap converts to x86 representation],
789 [c_cv_fp_layout_need_intswap],
800 # include <stdbool.h>
802 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
803 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
812 memcpy ((void *) &i0, (void *) &d, 8);
815 memcpy ((void *) c, (void *) &i1, 8);
817 if ((c[0] == 0x2f) && (c[1] == 0x25)
818 && (c[2] == 0xc0) && (c[3] == 0xc7)
819 && (c[4] == 0x43) && (c[5] == 0x2b)
820 && (c[6] == 0x1f) && (c[7] == 0x5b))
825 [c_cv_fp_layout_need_intswap="yes"],
826 [c_cv_fp_layout_need_intswap="no"]
829 if test "x$c_cv_fp_layout_need_intswap" = "xyes"; then
830 fp_layout_type="intswap"
834 if test "x$fp_layout_type" = "xnothing"; then
835 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
836 [Define if doubles are stored in x86 representation.])
837 else if test "x$fp_layout_type" = "xendianflip"; then
838 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
839 [Define if endianflip is needed to convert to x86 representation.])
840 else if test "x$fp_layout_type" = "xintswap"; then
841 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
842 [Define if intswap is needed to convert to x86 representation.])
844 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
848 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
850 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
852 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
855 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
856 if test "x$have_getmntent" = "xno"; then
857 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
859 if test "x$have_getmntent" = "xno"; then
860 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
862 if test "x$have_getmntent" = "xno"; then
863 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
866 if test "x$have_getmntent" = "xc"; then
867 AC_CACHE_CHECK([whether getmntent takes one argument],
868 [c_cv_have_one_getmntent],
870 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
871 #include "$srcdir/src/utils_mount.h"]],
875 fh = setmntent ("/etc/mtab", "r");
879 [c_cv_have_one_getmntent="yes"],
880 [c_cv_have_one_getmntent="no"]
883 AC_CACHE_CHECK([whether getmntent takes two arguments],
884 [c_cv_have_two_getmntent],
886 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
887 #include "$srcdir/src/utils_mount.h"]],
892 fh = fopen ("/etc/mnttab", "r");
893 status = getmntent (fh, &mt);
896 [c_cv_have_two_getmntent="yes"],
897 [c_cv_have_two_getmntent="no"]
902 # Check for different versions of `getmntent' here..
904 if test "x$have_getmntent" = "xc"; then
905 if test "x$c_cv_have_one_getmntent" = "xyes"; then
906 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
907 [Define if the function getmntent exists and takes one argument.])
909 if test "x$c_cv_have_two_getmntent" = "xyes"; then
910 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
911 [Define if the function getmntent exists and takes two arguments.])
914 if test "x$have_getmntent" = "xsun"; then
915 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
916 [Define if the function getmntent exists. It's the version from libsun.])
918 if test "x$have_getmntent" = "xseq"; then
919 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
920 [Define if the function getmntent exists. It's the version from libseq.])
922 if test "x$have_getmntent" = "xgen"; then
923 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
924 [Define if the function getmntent exists. It's the version from libgen.])
927 # Check for structures
928 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
929 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
932 #include <sys/types.h>
933 #include <sys/socket.h>
936 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
937 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
940 #include <sys/types.h>
941 #include <sys/socket.h>
942 #include <linux/if.h>
943 #include <linux/netdevice.h>
946 AC_CHECK_MEMBERS([struct kinfo_proc.ki_pid, struct kinfo_proc.ki_rssize, struct kinfo_proc.ki_rusage],
948 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_FREEBSD, 1,
949 [Define if struct kinfo_proc exists in the FreeBSD variant.])
950 have_struct_kinfo_proc_freebsd="yes"
953 have_struct_kinfo_proc_freebsd="no"
957 #include <sys/param.h>
958 #include <sys/sysctl.h>
959 #include <sys/user.h>
962 AC_CHECK_MEMBERS([struct kinfo_proc.kp_proc, struct kinfo_proc.kp_eproc],
964 AC_DEFINE(HAVE_STRUCT_KINFO_PROC_OPENBSD, 1,
965 [Define if struct kinfo_proc exists in the OpenBSD variant.])
966 have_struct_kinfo_proc_openbsd="yes"
969 have_struct_kinfo_proc_openbsd="no"
972 #include <sys/param.h>
973 #include <sys/sysctl.h>
977 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
983 # include <sys/types.h>
985 #if HAVE_NETINET_IN_SYSTM_H
986 # include <netinet/in_systm.h>
988 #if HAVE_NETINET_IN_H
989 # include <netinet/in.h>
991 #if HAVE_NETINET_IP_H
992 # include <netinet/ip.h>
994 #if HAVE_NETINET_UDP_H
995 # include <netinet/udp.h>
998 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
1001 # include <stdint.h>
1003 #if HAVE_SYS_TYPES_H
1004 # include <sys/types.h>
1006 #if HAVE_NETINET_IN_SYSTM_H
1007 # include <netinet/in_systm.h>
1009 #if HAVE_NETINET_IN_H
1010 # include <netinet/in.h>
1012 #if HAVE_NETINET_IP_H
1013 # include <netinet/ip.h>
1015 #if HAVE_NETINET_UDP_H
1016 # include <netinet/udp.h>
1020 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
1030 # Checks for libraries begin here
1032 with_libresolv="yes"
1033 AC_CHECK_LIB(resolv, res_search,
1035 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
1037 [with_libresolv="no"])
1038 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
1040 dnl Check for HAL (hardware abstraction library)
1042 AC_CHECK_LIB(hal,libhal_device_property_exists,
1043 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
1045 if test "x$with_libhal" = "xyes"; then
1046 if test "x$PKG_CONFIG" != "x"; then
1047 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
1048 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
1049 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
1050 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
1054 m4_divert_once([HELP_WITH], [
1055 collectd additional packages:])
1057 if test "x$ac_system" = "xSolaris"
1062 with_kstat="no (Solaris only)"
1063 with_devinfo="no (Solaris only)"
1066 if test "x$with_kstat" = "xyes"
1068 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1070 if test "x$with_kstat" = "xyes"
1072 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1073 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1075 if test "x$with_kstat" = "xyes"
1077 AC_DEFINE(HAVE_LIBKSTAT, 1,
1078 [Define to 1 if you have the 'kstat' library (-lkstat)])
1080 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1081 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1084 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1091 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1094 AC_CHECK_LIB(kvm, kvm_getprocs, [with_kvm_getprocs="yes"], [with_kvm_getprocs="no"])
1095 if test "x$with_kvm_getprocs" = "xyes"
1097 AC_DEFINE(HAVE_LIBKVM_GETPROCS, 1,
1098 [Define to 1 if you have the 'kvm' library with the 'kvm_getprocs' symbol (-lkvm)])
1101 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETPROCS, test "x$with_kvm_getprocs" = "xyes")
1103 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_kvm_getswapinfo="yes"], [with_kvm_getswapinfo="no"])
1104 if test "x$with_kvm_getswapinfo" = "xyes"
1106 AC_DEFINE(HAVE_LIBKVM_GETSWAPINFO, 1,
1107 [Define to 1 if you have the 'kvm' library with the 'kvm_getswapinfo' symbol (-lkvm)])
1110 AM_CONDITIONAL(BUILD_WITH_LIBKVM_GETSWAPINFO, test "x$with_kvm_getswapinfo" = "xyes")
1112 AC_CHECK_LIB(kvm, kvm_nlist, [with_kvm_nlist="yes"], [with_kvm_nlist="no"])
1113 if test "x$with_kvm_nlist" = "xyes"
1115 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1116 [Define to 1 if you have the 'kvm' library with the 'kvm_nlist' symbol (-lkvm)])
1119 AM_CONDITIONAL(BUILD_WITH_LIBKVM_NLIST, test "x$with_kvm_nlist" = "xyes")
1121 AC_CHECK_LIB(kvm, kvm_openfiles, [with_kvm_openfiles="yes"], [with_kvm_openfiles="no"])
1122 if test "x$with_kvm_openfiles" = "xyes"
1124 AC_DEFINE(HAVE_LIBKVM_NLIST, 1,
1125 [Define to 1 if you have the 'kvm' library with the 'kvm_openfiles' symbol (-lkvm)])
1128 AM_CONDITIONAL(BUILD_WITH_LIBKVM_OPENFILES, test "x$with_kvm_openfiles" = "xyes")
1130 # --with-libcurl {{{
1131 with_curl_config="curl-config"
1134 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1136 if test "x$withval" = "xno"
1139 else if test "x$withval" = "xyes"
1143 if test -f "$withval" && test -x "$withval"
1145 with_curl_config="$withval"
1147 else if test -x "$withval/bin/curl-config"
1149 with_curl_config="$withval/bin/curl-config"
1158 if test "x$with_libcurl" = "xyes"
1160 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1161 curl_config_status=$?
1163 if test $curl_config_status -ne 0
1165 with_libcurl="no ($with_curl_config failed)"
1167 SAVE_CPPFLAGS="$CPPFLAGS"
1168 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1170 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1172 CPPFLAGS="$SAVE_CPPFLAGS"
1175 if test "x$with_libcurl" = "xyes"
1177 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1178 curl_config_status=$?
1180 if test $curl_config_status -ne 0
1182 with_libcurl="no ($with_curl_config failed)"
1184 AC_CHECK_LIB(curl, curl_easy_init,
1185 [with_libcurl="yes"],
1186 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1190 if test "x$with_libcurl" = "xyes"
1192 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1193 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1194 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1195 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1197 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1201 with_libdbi_cppflags=""
1202 with_libdbi_ldflags=""
1203 AC_ARG_WITH(libdbi, [AS_HELP_STRING([--with-libdbi@<:@=PREFIX@:>@], [Path to libdbi.])],
1205 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1207 with_libdbi_cppflags="-I$withval/include"
1208 with_libdbi_ldflags="-L$withval/lib"
1211 with_libdbi="$withval"
1217 if test "x$with_libdbi" = "xyes"
1219 SAVE_CPPFLAGS="$CPPFLAGS"
1220 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1222 AC_CHECK_HEADERS(dbi/dbi.h, [with_libdbi="yes"], [with_libdbi="no (dbi/dbi.h not found)"])
1224 CPPFLAGS="$SAVE_CPPFLAGS"
1226 if test "x$with_libdbi" = "xyes"
1228 SAVE_CPPFLAGS="$CPPFLAGS"
1229 SAVE_LDFLAGS="$LDFLAGS"
1230 CPPFLAGS="$CPPFLAGS $with_libdbi_cppflags"
1231 LDFLAGS="$LDFLAGS $with_libdbi_ldflags"
1233 AC_CHECK_LIB(dbi, dbi_initialize, [with_libdbi="yes"], [with_libdbi="no (Symbol 'dbi_initialize' not found)"])
1235 CPPFLAGS="$SAVE_CPPFLAGS"
1236 LDFLAGS="$SAVE_LDFLAGS"
1238 if test "x$with_libdbi" = "xyes"
1240 BUILD_WITH_LIBDBI_CPPFLAGS="$with_libdbi_cppflags"
1241 BUILD_WITH_LIBDBI_LDFLAGS="$with_libdbi_ldflags"
1242 BUILD_WITH_LIBDBI_LIBS="-ldbi"
1243 AC_SUBST(BUILD_WITH_LIBDBI_CPPFLAGS)
1244 AC_SUBST(BUILD_WITH_LIBDBI_LDFLAGS)
1245 AC_SUBST(BUILD_WITH_LIBDBI_LIBS)
1247 AM_CONDITIONAL(BUILD_WITH_LIBDBI, test "x$with_libdbi" = "xyes")
1250 # --with-libesmtp {{{
1251 AC_ARG_WITH(libesmtp, [AS_HELP_STRING([--with-libesmtp@<:@=PREFIX@:>@], [Path to libesmtp.])],
1253 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1255 LDFLAGS="$LDFLAGS -L$withval/lib"
1256 CPPFLAGS="$CPPFLAGS -I$withval/include -D_THREAD_SAFE"
1259 with_libesmtp="$withval"
1265 if test "x$with_libesmtp" = "xyes"
1267 AC_CHECK_LIB(esmtp, smtp_create_session,
1269 AC_DEFINE(HAVE_LIBESMTP, 1, [Define to 1 if you have the esmtp library (-lesmtp).])
1270 ], [with_libesmtp="no (libesmtp not found)"])
1272 if test "x$with_libesmtp" = "xyes"
1274 AC_CHECK_HEADERS(libesmtp.h,
1276 AC_DEFINE(HAVE_LIBESMTP_H, 1, [Define to 1 if you have the <libesmtp.h> header file.])
1277 ], [with_libesmtp="no (libesmtp.h not found)"])
1279 if test "x$with_libesmtp" = "xyes"
1285 AC_DEFINE_UNQUOTED(COLLECT_LIBESMTP, [$collect_libesmtp],
1286 [Wether or not to use the esmtp library])
1287 AM_CONDITIONAL(BUILD_WITH_LIBESMTP, test "x$with_libesmtp" = "xyes")
1290 # --with-libganglia {{{
1291 AC_ARG_WITH(libganglia, [AS_HELP_STRING([--with-libganglia@<:@=PREFIX@:>@], [Path to libganglia.])],
1293 if test -f "$withval" && test -x "$withval"
1295 with_libganglia_config="$withval"
1296 with_libganglia="yes"
1297 else if test -f "$withval/bin/ganglia-config" && test -x "$withval/bin/ganglia-config"
1299 with_libganglia_config="$withval/bin/ganglia-config"
1300 with_libganglia="yes"
1301 else if test -d "$withval"
1303 GANGLIA_CPPFLAGS="-I$withval/include"
1304 GANGLIA_LDFLAGS="-L$withval/lib"
1305 with_libganglia="yes"
1307 with_libganglia_config="ganglia-config"
1308 with_libganglia="$withval"
1312 with_libganglia_config="ganglia-config"
1313 with_libganglia="yes"
1316 if test "x$with_libganglia" = "xyes" && test "x$with_libganglia_config" != "x"
1318 if test "x$GANGLIA_CPPFLAGS" = "x"
1320 GANGLIA_CPPFLAGS=`"$with_libganglia_config" --cflags 2>/dev/null`
1323 if test "x$GANGLIA_LDFLAGS" = "x"
1325 GANGLIA_LDFLAGS=`"$with_libganglia_config" --ldflags 2>/dev/null`
1328 if test "x$GANGLIA_LIBS" = "x"
1330 GANGLIA_LIBS=`"$with_libganglia_config" --libs 2>/dev/null`
1334 SAVE_CPPFLAGS="$CPPFLAGS"
1335 SAVE_LDFLAGS="$LDFLAGS"
1336 CPPFLAGS="$CPPFLAGS $GANGLIA_CPPFLAGS"
1337 LDFLAGS="$LDFLAGS $GANGLIA_LDFLAGS"
1339 if test "x$with_libganglia" = "xyes"
1341 AC_CHECK_HEADERS(gm_protocol.h,
1343 AC_DEFINE(HAVE_GM_PROTOCOL_H, 1,
1344 [Define to 1 if you have the <gm_protocol.h> header file.])
1345 ], [with_libganglia="no (gm_protocol.h not found)"])
1348 if test "x$with_libganglia" = "xyes"
1350 AC_CHECK_LIB(ganglia, xdr_Ganglia_value_msg,
1352 AC_DEFINE(HAVE_LIBGANGLIA, 1,
1353 [Define to 1 if you have the ganglia library (-lganglia).])
1354 ], [with_libganglia="no (symbol xdr_Ganglia_value_msg not found)"])
1357 CPPFLAGS="$SAVE_CPPFLAGS"
1358 LDFLAGS="$SAVE_LDFLAGS"
1360 AC_SUBST(GANGLIA_CPPFLAGS)
1361 AC_SUBST(GANGLIA_LDFLAGS)
1362 AC_SUBST(GANGLIA_LIBS)
1363 AM_CONDITIONAL(BUILD_WITH_LIBGANGLIA, test "x$with_libganglia" = "xyes")
1366 # --with-libgcrypt {{{
1367 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS"
1368 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS"
1369 GCRYPT_LIBS="$GCRYPT_LIBS"
1370 AC_ARG_WITH(libgcrypt, [AS_HELP_STRING([--with-libgcrypt@<:@=PREFIX@:>@], [Path to libgcrypt.])],
1372 if test -f "$withval" && test -x "$withval"
1374 with_libgcrypt_config="$withval"
1375 with_libgcrypt="yes"
1376 else if test -f "$withval/bin/gcrypt-config" && test -x "$withval/bin/gcrypt-config"
1378 with_libgcrypt_config="$withval/bin/gcrypt-config"
1379 with_libgcrypt="yes"
1380 else if test -d "$withval"
1382 GCRYPT_CPPFLAGS="$GCRYPT_CPPFLAGS -I$withval/include"
1383 GCRYPT_LDFLAGS="$GCRYPT_LDFLAGS -L$withval/lib"
1384 with_libgcrypt="yes"
1386 with_libgcrypt_config="gcrypt-config"
1387 with_libgcrypt="$withval"
1391 with_libgcrypt_config="libgcrypt-config"
1392 with_libgcrypt="yes"
1395 if test "x$with_libgcrypt" = "xyes" && test "x$with_libgcrypt_config" != "x"
1397 if test "x$GCRYPT_CPPFLAGS" = "x"
1399 GCRYPT_CPPFLAGS=`"$with_libgcrypt_config" --cflags 2>/dev/null`
1402 if test "x$GCRYPT_LDFLAGS" = "x"
1404 gcrypt_exec_prefix=`"$with_libgcrypt_config" --exec-prefix 2>/dev/null`
1405 GCRYPT_LDFLAGS="-L$gcrypt_exec_prefix/lib"
1408 if test "x$GCRYPT_LIBS" = "x"
1410 GCRYPT_LIBS=`"$with_libgcrypt_config" --libs 2>/dev/null`
1414 SAVE_CPPFLAGS="$CPPFLAGS"
1415 SAVE_LDFLAGS="$LDFLAGS"
1416 CPPFLAGS="$CPPFLAGS $GCRYPT_CPPFLAGS"
1417 LDFLAGS="$LDFLAGS $GCRYPT_LDFLAGS"
1419 if test "x$with_libgcrypt" = "xyes"
1421 if test "x$GCRYPT_CPPFLAGS" != "x"
1423 AC_MSG_NOTICE([gcrypt CPPFLAGS: $GCRYPT_CPPFLAGS])
1425 AC_CHECK_HEADERS(gcrypt.h,
1426 [with_libgcrypt="yes"],
1427 [with_libgcrypt="no (gcrypt.h not found)"])
1430 if test "x$with_libgcrypt" = "xyes"
1432 if test "x$GCRYPT_LDFLAGS" != "x"
1434 AC_MSG_NOTICE([gcrypt LDFLAGS: $GCRYPT_LDFLAGS])
1436 AC_CHECK_LIB(gcrypt, gcry_md_hash_buffer,
1437 [with_libgcrypt="yes"],
1438 [with_libgcrypt="no (symbol gcry_md_hash_buffer not found)"])
1440 if test "$with_libgcrypt" != "no"; then
1441 AM_PATH_LIBGCRYPT(1:1.2.0,,with_libgcrypt="no (version 1.2.0+ required)")
1445 CPPFLAGS="$SAVE_CPPFLAGS"
1446 LDFLAGS="$SAVE_LDFLAGS"
1448 if test "x$with_libgcrypt" = "xyes"
1450 AC_DEFINE(HAVE_LIBGCRYPT, 1, [Define to 1 if you have the gcrypt library (-lgcrypt).])
1453 AC_SUBST(GCRYPT_CPPFLAGS)
1454 AC_SUBST(GCRYPT_LDFLAGS)
1455 AC_SUBST(GCRYPT_LIBS)
1456 AM_CONDITIONAL(BUILD_WITH_LIBGCRYPT, test "x$with_libgcrypt" = "xyes")
1459 # --with-libiptc {{{
1460 with_own_libiptc="no"
1461 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1463 if test "x$withval" = "xshipped"
1465 with_own_libiptc="yes"
1467 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
1469 LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS -I$withval/include"
1470 LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS -L$withval/lib"
1473 with_libiptc="$withval"
1477 if test "x$ac_system" = "xLinux"
1481 with_libiptc="no (Linux only)"
1484 SAVE_CPPFLAGS="$CPPFLAGS"
1485 SAVE_LDFLAGS="$LDFLAGS"
1486 CPPFLAGS="$CPPFLAGS $LIBIPTC_CPPFLAGS"
1487 LDFLAGS="$LDFLAGS $LIBIPTC_LDFLAGS"
1488 # check whether the header file for libiptc is available.
1489 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1491 AC_CHECK_HEADERS(libiptc/libiptc.h,
1493 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1497 with_own_libiptc="yes"
1500 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1502 AC_CHECK_HEADERS(libiptc/libip6tc.h,
1504 AC_DEFINE(HAVE_LIBIPTC_LIBIP6TC_H, 1, [Define to 1 if you have the <libiptc/libip6tc.h> header file.])
1508 with_own_libiptc="yes"
1511 # If the header file is available, check for the required type declaractions.
1512 # They may be missing in old versions of libiptc. In that case, they will be
1513 # declared in the iptables plugin.
1514 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1516 AC_CHECK_TYPES([iptc_handle_t, ip6tc_handle_t], [], [],
1519 # include "$srcdir/src/owniptc/libiptc.h"
1520 # include "$srcdir/src/owniptc/libip6tc.h"
1522 # include <libiptc/libiptc.h>
1523 # include <libiptc/libip6tc.h>
1527 # Check for the iptc_init symbol in the library.
1528 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xno"
1530 AC_CHECK_LIB(iptc, iptc_init,
1532 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1536 with_own_libiptc="yes"
1539 # The system wide version failed for some reason. Check if we have the required
1540 # headers to build the shipped version.
1541 if test "x$with_libiptc" = "xyes" && test "x$with_own_libiptc" = "xyes"
1543 AC_CHECK_HEADERS(linux/netfilter_ipv4/ip_tables.h linux/netfilter_ipv6/ip6_tables.h linux/netfilter/x_tables.h, [],
1545 with_libiptc="no (Linux iptables headers not found)"
1546 with_own_libiptc="no"
1549 #include "$srcdir/src/owniptc/ipt_kernel_headers.h"
1552 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1553 AM_CONDITIONAL(BUILD_WITH_OWN_LIBIPTC, test "x$with_own_libiptc" = "xyes")
1554 if test "x$with_libiptc" = "xyes"
1556 BUILD_WITH_LIBIPTC_CPPFLAGS="$LIBIPTC_CPPFLAGS"
1557 BUILD_WITH_LIBIPTC_LDFLAGS="$LIBIPTC_LDFLAGS"
1558 AC_SUBST(BUILD_WITH_LIBIPTC_CPPFLAGS)
1559 AC_SUBST(BUILD_WITH_LIBIPTC_LDFLAGS)
1561 if test "x$with_own_libiptc" = "xyes"
1563 AC_DEFINE(OWN_LIBIPTC, 1, [Define to 1 if we use the shipped iptc library.])
1565 CPPFLAGS="$SAVE_CPPFLAGS"
1566 LDFLAGS="$SAVE_LDFLAGS"
1570 with_java_home="$JAVA_HOME"
1571 with_java_vmtype="client"
1575 AC_ARG_WITH(java, [AS_HELP_STRING([--with-java@<:@=PREFIX@:>@], [Path to Java home.])],
1577 if test "x$withval" = "xno"
1580 else if test "x$withval" = "xyes"
1584 with_java_home="$withval"
1589 if test "x$with_java" = "xyes"
1591 if test -d "$with_java_home"
1593 AC_MSG_CHECKING([for jni.h])
1594 TMPDIR=`find -L "$with_java_home" -name jni.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1595 if test "x$TMPDIR" != "x"
1597 AC_MSG_RESULT([found in $TMPDIR])
1598 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1600 AC_MSG_RESULT([not found])
1603 AC_MSG_CHECKING([for jni_md.h])
1604 TMPDIR=`find -L "$with_java_home" -name jni_md.h -type f -exec 'dirname' '{}' ';' | head -n 1`
1605 if test "x$TMPDIR" != "x"
1607 AC_MSG_RESULT([found in $TMPDIR])
1608 JAVA_CPPFLAGS="$JAVA_CPPFLAGS -I$TMPDIR"
1610 AC_MSG_RESULT([not found])
1613 AC_MSG_CHECKING([for libjvm.so])
1614 TMPDIR=`find -L "$with_java_home" -name libjvm.so -type f -exec 'dirname' '{}' ';' | head -n 1`
1615 if test "x$TMPDIR" != "x"
1617 AC_MSG_RESULT([found in $TMPDIR])
1618 JAVA_LDFLAGS="$JAVA_LDFLAGS -L$TMPDIR -Wl,-rpath -Wl,$TMPDIR"
1620 AC_MSG_RESULT([not found])
1623 if test "x$JAVAC" = "x"
1625 AC_MSG_CHECKING([for javac])
1626 TMPDIR=`find -L "$with_java_home" -name javac -type f | head -n 1`
1627 if test "x$TMPDIR" != "x"
1630 AC_MSG_RESULT([$JAVAC])
1632 AC_MSG_RESULT([not found])
1635 else if test "x$with_java_home" != "x"
1637 AC_MSG_WARN([JAVA_HOME: No such directory: $with_java_home])
1641 if test "x$JAVA_CPPFLAGS" != "x"
1643 AC_MSG_NOTICE([Building with JAVA_CPPFLAGS set to: $JAVA_CPPFLAGS])
1645 if test "x$JAVA_CFLAGS" != "x"
1647 AC_MSG_NOTICE([Building with JAVA_CFLAGS set to: $JAVA_CFLAGS])
1649 if test "x$JAVA_LDFLAGS" != "x"
1651 AC_MSG_NOTICE([Building with JAVA_LDFLAGS set to: $JAVA_LDFLAGS])
1653 if test "x$JAVAC" = "x"
1655 with_javac_path="$PATH"
1656 if test "x$with_java_home" != "x"
1658 with_javac_path="$with_java_home:with_javac_path"
1659 if test -d "$with_java_home/bin"
1661 with_javac_path="$with_java_home/bin:with_javac_path"
1665 AC_PATH_PROG(JAVAC, javac, [], "$with_javac_path")
1667 if test "x$JAVAC" = "x"
1669 with_java="no (javac not found)"
1672 SAVE_CPPFLAGS="$CPPFLAGS"
1673 SAVE_CFLAGS="$CFLAGS"
1674 SAVE_LDFLAGS="$LDFLAGS"
1675 CPPFLAGS="$CPPFLAGS $JAVA_CPPFLAGS"
1676 CFLAGS="$CFLAGS $JAVA_CFLAGS"
1677 LDFLAGS="$LDFLAGS $JAVA_LDFLAGS"
1679 if test "x$with_java" = "xyes"
1681 AC_CHECK_HEADERS(jni.h, [], [with_java="no (jni.h not found)"])
1683 if test "x$with_java" = "xyes"
1685 AC_CHECK_LIB(jvm, JNI_CreateJavaVM,
1687 [with_java="no (libjvm not found)"],
1690 if test "x$with_java" = "xyes"
1692 JAVA_LIBS="$JAVA_LIBS -ljvm"
1693 AC_MSG_NOTICE([Building with JAVA_LIBS set to: $JAVA_LIBS])
1696 CPPFLAGS="$SAVE_CPPFLAGS"
1697 CFLAGS="$SAVE_CFLAGS"
1698 LDFLAGS="$SAVE_LDFLAGS"
1700 AC_SUBST(JAVA_CPPFLAGS)
1701 AC_SUBST(JAVA_CFLAGS)
1702 AC_SUBST(JAVA_LDFLAGS)
1704 AM_CONDITIONAL(BUILD_WITH_JAVA, test "x$with_java" = "xyes")
1707 # --with-libmemcached {{{
1708 with_libmemcached_cppflags=""
1709 with_libmemcached_ldflags=""
1710 AC_ARG_WITH(libmemcached, [AS_HELP_STRING([--with-libmemcached@<:@=PREFIX@:>@], [Path to libmemcached.])],
1712 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1714 with_libmemcached_cppflags="-I$withval/include"
1715 with_libmemcached_ldflags="-L$withval/lib"
1716 with_libmemcached="yes"
1718 with_libmemcached="$withval"
1722 with_libmemcached="yes"
1724 if test "x$with_libmemcached" = "xyes"
1726 SAVE_CPPFLAGS="$CPPFLAGS"
1727 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1729 AC_CHECK_HEADERS(libmemcached/memcached.h, [with_libmemcached="yes"], [with_libmemcached="no (libmemcached/memcached.h not found)"])
1731 CPPFLAGS="$SAVE_CPPFLAGS"
1733 if test "x$with_libmemcached" = "xyes"
1735 SAVE_CPPFLAGS="$CPPFLAGS"
1736 SAVE_LDFLAGS="$LDFLAGS"
1737 CPPFLAGS="$CPPFLAGS $with_libmemcached_cppflags"
1738 LDFLAGS="$LDFLAGS $with_libmemcached_ldflags"
1740 AC_CHECK_LIB(memcached, memcached_create, [with_libmemcached="yes"], [with_libmemcached="no (Symbol 'memcached_create' not found)"])
1742 CPPFLAGS="$SAVE_CPPFLAGS"
1743 LDFLAGS="$SAVE_LDFLAGS"
1745 if test "x$with_libmemcached" = "xyes"
1747 BUILD_WITH_LIBMEMCACHED_CPPFLAGS="$with_libmemcached_cppflags"
1748 BUILD_WITH_LIBMEMCACHED_LDFLAGS="$with_libmemcached_ldflags"
1749 BUILD_WITH_LIBMEMCACHED_LIBS="-lmemcached"
1750 AC_SUBST(BUILD_WITH_LIBMEMCACHED_CPPFLAGS)
1751 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LDFLAGS)
1752 AC_SUBST(BUILD_WITH_LIBMEMCACHED_LIBS)
1753 AC_DEFINE(HAVE_LIBMEMCACHED, 1, [Define if libmemcached is present and usable.])
1755 AM_CONDITIONAL(BUILD_WITH_LIBMEMCACHED, test "x$with_libmemcached" = "xyes")
1758 # --with-libmysql {{{
1759 with_mysql_config="mysql_config"
1760 with_mysql_cflags=""
1762 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1764 if test "x$withval" = "xno"
1767 else if test "x$withval" = "xyes"
1771 if test -f "$withval" && test -x "$withval";
1773 with_mysql_config="$withval"
1774 else if test -x "$withval/bin/mysql_config"
1776 with_mysql_config="$withval/bin/mysql_config"
1784 if test "x$with_libmysql" = "xyes"
1786 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1787 mysql_config_status=$?
1789 if test $mysql_config_status -ne 0
1791 with_libmysql="no ($with_mysql_config failed)"
1793 SAVE_CPPFLAGS="$CPPFLAGS"
1794 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1797 have_mysql_mysql_h="no"
1798 AC_CHECK_HEADERS(mysql.h, [have_mysql_h="yes"])
1800 if test "x$have_mysql_h" = "xno"
1802 AC_CHECK_HEADERS(mysql/mysql.h, [have_mysql_mysql_h="yes"])
1805 if test "x$have_mysql_h$have_mysql_mysql_h" = "xnono"
1807 with_libmysql="no (mysql.h not found)"
1810 CPPFLAGS="$SAVE_CPPFLAGS"
1813 if test "x$with_libmysql" = "xyes"
1815 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1816 mysql_config_status=$?
1818 if test $mysql_config_status -ne 0
1820 with_libmysql="no ($with_mysql_config failed)"
1822 AC_CHECK_LIB(mysqlclient, mysql_init,
1823 [with_libmysql="yes"],
1824 [with_libmysql="no (symbol 'mysql_init' not found)"],
1827 AC_CHECK_LIB(mysqlclient, mysql_get_server_version,
1828 [with_libmysql="yes"],
1829 [with_libmysql="no (symbol 'mysql_get_server_version' not found)"],
1833 if test "x$with_libmysql" = "xyes"
1835 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1836 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1837 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1838 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1840 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1843 # --with-libnetlink {{{
1844 with_libnetlink_cflags=""
1845 with_libnetlink_libs="-lnetlink"
1846 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1848 echo "libnetlink: withval = $withval"
1849 if test "x$withval" = "xyes"
1851 with_libnetlink="yes"
1852 else if test "x$withval" = "xno"
1854 with_libnetlink="no"
1856 if test -d "$withval/include"
1858 with_libnetlink_cflags="-I$withval/include"
1859 with_libnetlink_libs="-L$withval/lib -lnetlink"
1860 with_libnetlink="yes"
1862 AC_MSG_ERROR("no such directory: $withval/include")
1867 if test "x$ac_system" = "xLinux"
1869 with_libnetlink="yes"
1871 with_libnetlink="no (Linux only library)"
1874 if test "x$with_libnetlink" = "xyes"
1876 SAVE_CFLAGS="$CFLAGS"
1877 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1879 with_libnetlink="no (libnetlink.h not found)"
1881 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1883 with_libnetlink="yes"
1887 #include <sys/types.h>
1888 #include <asm/types.h>
1889 #include <sys/socket.h>
1890 #include <linux/netlink.h>
1891 #include <linux/rtnetlink.h>])
1892 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1894 #include <sys/types.h>
1895 #include <asm/types.h>
1896 #include <sys/socket.h>])
1900 #include <sys/types.h>
1901 #include <asm/types.h>
1902 #include <sys/socket.h>
1903 #include <linux/netlink.h>
1904 #include <linux/rtnetlink.h>
1908 int retval = TCA_STATS2;
1911 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1916 #include <sys/types.h>
1917 #include <asm/types.h>
1918 #include <sys/socket.h>
1919 #include <linux/netlink.h>
1920 #include <linux/rtnetlink.h>
1924 int retval = TCA_STATS;
1927 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1930 CFLAGS="$SAVE_CFLAGS"
1932 if test "x$with_libnetlink" = "xyes"
1934 AC_CHECK_LIB(netlink, rtnl_open,
1935 [with_libnetlink="yes"],
1936 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1937 [$with_libnetlink_libs])
1939 if test "x$with_libnetlink" = "xyes"
1941 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1942 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1943 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1944 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1946 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1949 # --with-libnetapp {{{
1950 AC_ARG_VAR([LIBNETAPP_CPPFLAGS], [C preprocessor flags required to build with libnetapp])
1951 AC_ARG_VAR([LIBNETAPP_LDFLAGS], [Linker flags required to build with libnetapp])
1952 AC_ARG_VAR([LIBNETAPP_LIBS], [Other libraries required to link against libnetapp])
1953 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS"
1954 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS"
1955 LIBNETAPP_LIBS="$LIBNETAPP_LIBS"
1956 AC_ARG_WITH(libnetapp, [AS_HELP_STRING([--with-libnetapp@<:@=PREFIX@:>@], [Path to libnetapp.])],
1958 if test -d "$withval"
1960 LIBNETAPP_CPPFLAGS="$LIBNETAPP_CPPFLAGS -I$withval/include"
1961 LIBNETAPP_LDFLAGS="$LIBNETAPP_LDFLAGS -L$withval/lib"
1962 with_libnetapp="yes"
1964 with_libnetapp="$withval"
1968 with_libnetapp="yes"
1971 SAVE_CPPFLAGS="$CPPFLAGS"
1972 SAVE_LDFLAGS="$LDFLAGS"
1973 CPPFLAGS="$CPPFLAGS $LIBNETAPP_CPPFLAGS"
1974 LDFLAGS="$LDFLAGS $LIBNETAPP_LDFLAGS"
1976 if test "x$with_libnetapp" = "xyes"
1978 if test "x$LIBNETAPP_CPPFLAGS" != "x"
1980 AC_MSG_NOTICE([netapp CPPFLAGS: $LIBNETAPP_CPPFLAGS])
1982 AC_CHECK_HEADERS(netapp_api.h,
1983 [with_libnetapp="yes"],
1984 [with_libnetapp="no (netapp_api.h not found)"])
1987 if test "x$with_libnetapp" = "xyes"
1989 if test "x$LIBNETAPP_LDFLAGS" != "x"
1991 AC_MSG_NOTICE([netapp LDFLAGS: $LIBNETAPP_LDFLAGS])
1994 if test "x$LIBNETAPP_LIBS" = "x"
1996 LIBNETAPP_LIBS="-lpthread -lxml -ladt -lssl -lm"
1998 AC_MSG_NOTICE([netapp LIBS: $LIBNETAPP_LIBS])
2000 AC_CHECK_LIB(netapp, na_server_invoke_elem,
2001 [with_libnetapp="yes"],
2002 [with_libnetapp="no (symbol na_server_invoke_elem not found)"],
2004 LIBNETAPP_LIBS="-lnetapp $LIBNETAPP_LIBS"
2007 CPPFLAGS="$SAVE_CPPFLAGS"
2008 LDFLAGS="$SAVE_LDFLAGS"
2010 if test "x$with_libnetapp" = "xyes"
2012 AC_DEFINE(HAVE_LIBNETAPP, 1, [Define to 1 if you have the netapp library (-lnetapp).])
2015 AC_SUBST(LIBNETAPP_CPPFLAGS)
2016 AC_SUBST(LIBNETAPP_LDFLAGS)
2017 AC_SUBST(LIBNETAPP_LIBS)
2018 AM_CONDITIONAL(BUILD_WITH_LIBNETAPP, test "x$with_libnetapp" = "xyes")
2021 # --with-libnetsnmp {{{
2022 with_snmp_config="net-snmp-config"
2025 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
2027 if test "x$withval" = "xno"
2029 with_libnetsnmp="no"
2030 else if test "x$withval" = "xyes"
2032 with_libnetsnmp="yes"
2034 if test -x "$withval"
2036 with_snmp_config="$withval"
2037 with_libnetsnmp="yes"
2039 with_snmp_config="$withval/bin/net-snmp-config"
2040 with_libnetsnmp="yes"
2044 [with_libnetsnmp="yes"])
2045 if test "x$with_libnetsnmp" = "xyes"
2047 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
2048 snmp_config_status=$?
2050 if test $snmp_config_status -ne 0
2052 with_libnetsnmp="no ($with_snmp_config failed)"
2054 SAVE_CPPFLAGS="$CPPFLAGS"
2055 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
2057 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
2059 CPPFLAGS="$SAVE_CPPFLAGS"
2062 if test "x$with_libnetsnmp" = "xyes"
2064 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
2065 snmp_config_status=$?
2067 if test $snmp_config_status -ne 0
2069 with_libnetsnmp="no ($with_snmp_config failed)"
2071 AC_CHECK_LIB(netsnmp, init_snmp,
2072 [with_libnetsnmp="yes"],
2073 [with_libnetsnmp="no (libnetsnmp not found)"],
2077 if test "x$with_libnetsnmp" = "xyes"
2079 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
2080 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
2081 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
2082 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
2084 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
2087 # --with-liboconfig {{{
2088 with_own_liboconfig="no"
2089 liboconfig_LDFLAGS="$LDFLAGS"
2090 liboconfig_CPPFLAGS="$CPPFLAGS"
2091 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
2093 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2095 if test -d "$withval/lib"
2097 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
2099 if test -d "$withval/include"
2101 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
2104 if test "x$withval" = "xno"
2106 AC_MSG_ERROR("liboconfig is required")
2110 with_liboconfig="yes"
2113 save_LDFLAGS="$LDFLAGS"
2114 save_CPPFLAGS="$CPPFLAGS"
2115 LDFLAGS="$liboconfig_LDFLAGS"
2116 CPPFLAGS="$liboconfig_CPPFLAGS"
2117 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
2119 with_liboconfig="yes"
2120 with_own_liboconfig="no"
2123 with_liboconfig="yes"
2124 with_own_liboconfig="yes"
2125 LDFLAGS="$save_LDFLAGS"
2126 CPPFLAGS="$save_CPPFLAGS"
2129 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
2130 if test "x$with_own_liboconfig" = "xyes"
2132 with_liboconfig="yes (shipped version)"
2136 # --with-liboping {{{
2137 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
2139 if test "x$withval" = "xyes"
2142 else if test "x$withval" = "xno"
2147 LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS -I$withval/include"
2148 LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS -L$withval/lib"
2151 [with_liboping="yes"])
2153 SAVE_CPPFLAGS="$CPPFLAGS"
2154 SAVE_LDFLAGS="$LDFLAGS"
2156 CPPFLAGS="$CPPFLAGS $LIBOPING_CPPFLAGS"
2157 LDFLAGS="$LDFLAGS $LIBOPING_LDFLAGS"
2159 if test "x$with_liboping" = "xyes"
2161 if test "x$LIBOPING_CPPFLAGS" != "x"
2163 AC_MSG_NOTICE([liboping CPPFLAGS: $LIBOPING_CPPFLAGS])
2165 AC_CHECK_HEADERS(oping.h,
2166 [with_liboping="yes"],
2167 [with_liboping="no ('oping.h' not found)"])
2169 if test "x$with_liboping" = "xyes"
2171 if test "x$LIBOPING_LDFLAGS" != "x"
2173 AC_MSG_NOTICE([liboping LDFLAGS: $LIBOPING_LDFLAGS])
2175 AC_CHECK_LIB(oping, ping_construct,
2176 [with_liboping="yes"],
2177 [with_liboping="no (symbol 'ping_construct' not found)"])
2180 CPPFLAGS="$SAVE_CPPFLAGS"
2181 LDFLAGS="$SAVE_LDFLAGS"
2183 if test "x$with_liboping" = "xyes"
2185 BUILD_WITH_LIBOPING_CPPFLAGS="$LIBOPING_CPPFLAGS"
2186 BUILD_WITH_LIBOPING_LDFLAGS="$LIBOPING_LDFLAGS"
2187 AC_SUBST(BUILD_WITH_LIBOPING_CPPFLAGS)
2188 AC_SUBST(BUILD_WITH_LIBOPING_LDFLAGS)
2190 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
2194 with_oracle_cppflags=""
2196 AC_ARG_WITH(oracle, [AS_HELP_STRING([--with-oracle@<:@=ORACLE_HOME@:>@], [Path to Oracle.])],
2198 if test "x$withval" = "xyes"
2200 if test "x$ORACLE_HOME" = "x"
2202 AC_MSG_WARN([Use of the Oracle library has been forced, but the environment variable ORACLE_HOME is not set.])
2205 else if test "x$withval" = "xno"
2210 ORACLE_HOME="$withval"
2214 if test "x$ORACLE_HOME" = "x"
2216 with_oracle="no (ORACLE_HOME is not set)"
2221 if test "x$ORACLE_HOME" != "x"
2223 with_oracle_cppflags="-I$ORACLE_HOME/rdbms/public"
2225 if test -e "$ORACLE_HOME/lib/ldflags"
2227 with_oracle_libs=`cat "$ORACLE_HOME/lib/ldflags"`
2229 #with_oracle_libs="-L$ORACLE_HOME/lib $with_oracle_libs -lclntsh"
2230 with_oracle_libs="-L$ORACLE_HOME/lib -lclntsh"
2232 if test "x$with_oracle" = "xyes"
2234 SAVE_CPPFLAGS="$CPPFLAGS"
2235 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2237 AC_CHECK_HEADERS(oci.h, [with_oracle="yes"], [with_oracle="no (oci.h not found)"])
2239 CPPFLAGS="$SAVE_CPPFLAGS"
2241 if test "x$with_oracle" = "xyes"
2243 SAVE_CPPFLAGS="$CPPFLAGS"
2244 SAVE_LDFLAGS="$LDFLAGS"
2245 CPPFLAGS="$CPPFLAGS $with_oracle_cppflags"
2246 LDFLAGS="$LDFLAGS $with_oracle_libs"
2248 AC_CHECK_FUNC(OCIEnvCreate, [with_oracle="yes"], [with_oracle="no (Symbol 'OCIEnvCreate' not found)"])
2250 CPPFLAGS="$SAVE_CPPFLAGS"
2251 LDFLAGS="$SAVE_LDFLAGS"
2253 if test "x$with_oracle" = "xyes"
2255 BUILD_WITH_ORACLE_CFLAGS="$with_oracle_cppflags"
2256 BUILD_WITH_ORACLE_LIBS="$with_oracle_libs"
2257 AC_SUBST(BUILD_WITH_ORACLE_CFLAGS)
2258 AC_SUBST(BUILD_WITH_ORACLE_LIBS)
2262 # --with-libowcapi {{{
2263 with_libowcapi_cppflags=""
2264 with_libowcapi_libs="-lowcapi"
2265 AC_ARG_WITH(libowcapi, [AS_HELP_STRING([--with-libowcapi@<:@=PREFIX@:>@], [Path to libowcapi.])],
2267 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2269 with_libowcapi_cppflags="-I$withval/include"
2270 with_libowcapi_libs="-L$withval/lib -lowcapi"
2271 with_libowcapi="yes"
2273 with_libowcapi="$withval"
2277 with_libowcapi="yes"
2279 if test "x$with_libowcapi" = "xyes"
2281 SAVE_CPPFLAGS="$CPPFLAGS"
2282 CPPFLAGS="$with_libowcapi_cppflags"
2284 AC_CHECK_HEADERS(owcapi.h, [with_libowcapi="yes"], [with_libowcapi="no (owcapi.h not found)"])
2286 CPPFLAGS="$SAVE_CPPFLAGS"
2288 if test "x$with_libowcapi" = "xyes"
2290 SAVE_LDFLAGS="$LDFLAGS"
2291 SAVE_CPPFLAGS="$CPPFLAGS"
2292 LDFLAGS="$with_libowcapi_libs"
2293 CPPFLAGS="$with_libowcapi_cppflags"
2295 AC_CHECK_LIB(owcapi, OW_get, [with_libowcapi="yes"], [with_libowcapi="no (libowcapi not found)"])
2297 LDFLAGS="$SAVE_LDFLAGS"
2298 CPPFLAGS="$SAVE_CPPFLAGS"
2300 if test "x$with_libowcapi" = "xyes"
2302 BUILD_WITH_LIBOWCAPI_CPPFLAGS="$with_libowcapi_cppflags"
2303 BUILD_WITH_LIBOWCAPI_LIBS="$with_libowcapi_libs"
2304 AC_SUBST(BUILD_WITH_LIBOWCAPI_CPPFLAGS)
2305 AC_SUBST(BUILD_WITH_LIBOWCAPI_LIBS)
2309 # --with-libpcap {{{
2310 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
2312 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2314 LDFLAGS="$LDFLAGS -L$withval/lib"
2315 CPPFLAGS="$CPPFLAGS -I$withval/include"
2318 with_libpcap="$withval"
2324 if test "x$with_libpcap" = "xyes"
2326 AC_CHECK_LIB(pcap, pcap_open_live,
2328 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
2329 ], [with_libpcap="no (libpcap not found)"])
2331 if test "x$with_libpcap" = "xyes"
2333 AC_CHECK_HEADERS(pcap.h,
2335 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
2336 ], [with_libpcap="no (pcap.h not found)"])
2338 if test "x$with_libpcap" = "xyes"
2344 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
2345 [Wether or not to use the pcap library])
2346 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
2349 # --with-libperl {{{
2350 perl_interpreter="perl"
2351 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
2353 if test -x "$withval"
2355 perl_interpreter="$withval"
2357 else if test "x$withval" != "xno" && test "x$withval" != "xyes"
2359 LDFLAGS="$LDFLAGS -L$withval/lib"
2360 CPPFLAGS="$CPPFLAGS -I$withval/include"
2361 perl_interpreter="$withval/bin/perl"
2364 with_libperl="$withval"
2371 AC_MSG_CHECKING([for perl])
2372 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
2373 if test -x "$perl_interpreter"
2375 AC_MSG_RESULT([yes ($perl_interpreter)])
2381 AC_SUBST(PERL, "$perl_interpreter")
2383 if test "x$with_libperl" = "xyes" \
2384 && test -n "$perl_interpreter"
2386 SAVE_CFLAGS="$CFLAGS"
2387 SAVE_LDFLAGS="$LDFLAGS"
2388 dnl ARCHFLAGS="" -> disable multi -arch on OSX (see Config_heavy.pl:fetch_string)
2389 PERL_CFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ccopts`
2390 PERL_LDFLAGS=`ARCHFLAGS="" $perl_interpreter -MExtUtils::Embed -e ldopts`
2391 CFLAGS="$CFLAGS $PERL_CFLAGS"
2392 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2394 AC_CACHE_CHECK([for libperl],
2395 [c_cv_have_libperl],
2399 #define PERL_NO_GET_CONTEXT
2406 load_module (PERL_LOADMOD_NOIMPORT,
2407 newSVpv ("Collectd::Plugin::FooBar", 24),
2410 [c_cv_have_libperl="yes"],
2411 [c_cv_have_libperl="no"]
2415 if test "x$c_cv_have_libperl" = "xyes"
2417 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
2418 AC_SUBST(PERL_CFLAGS)
2419 AC_SUBST(PERL_LDFLAGS)
2424 CFLAGS="$SAVE_CFLAGS"
2425 LDFLAGS="$SAVE_LDFLAGS"
2426 else if test -z "$perl_interpreter"; then
2427 with_libperl="no (no perl interpreter found)"
2428 c_cv_have_libperl="no"
2430 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
2432 if test "x$with_libperl" = "xyes"
2434 SAVE_CFLAGS="$CFLAGS"
2435 SAVE_LDFLAGS="$LDFLAGS"
2436 CFLAGS="$CFLAGS $PERL_CFLAGS"
2437 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2439 AC_CACHE_CHECK([if perl supports ithreads],
2440 [c_cv_have_perl_ithreads],
2448 #if !defined(USE_ITHREADS)
2449 # error "Perl does not support ithreads!"
2450 #endif /* !defined(USE_ITHREADS) */
2453 [c_cv_have_perl_ithreads="yes"],
2454 [c_cv_have_perl_ithreads="no"]
2458 if test "x$c_cv_have_perl_ithreads" = "xyes"
2460 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
2463 CFLAGS="$SAVE_CFLAGS"
2464 LDFLAGS="$SAVE_LDFLAGS"
2467 if test "x$with_libperl" = "xyes"
2469 SAVE_CFLAGS="$CFLAGS"
2470 SAVE_LDFLAGS="$LDFLAGS"
2471 # trigger an error if Perl_load_module*() uses __attribute__nonnull__(3)
2472 # (see issues #41 and #42)
2473 CFLAGS="$CFLAGS $PERL_CFLAGS -Wall -Werror"
2474 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2476 AC_CACHE_CHECK([for broken Perl_load_module()],
2477 [c_cv_have_broken_perl_load_module],
2481 #define PERL_NO_GET_CONTEXT
2488 load_module (PERL_LOADMOD_NOIMPORT,
2489 newSVpv ("Collectd::Plugin::FooBar", 24),
2492 [c_cv_have_broken_perl_load_module="no"],
2493 [c_cv_have_broken_perl_load_module="yes"]
2497 CFLAGS="$SAVE_CFLAGS"
2498 LDFLAGS="$SAVE_LDFLAGS"
2500 AM_CONDITIONAL(HAVE_BROKEN_PERL_LOAD_MODULE,
2501 test "x$c_cv_have_broken_perl_load_module" = "xyes")
2503 if test "x$with_libperl" = "xyes"
2505 SAVE_CFLAGS="$CFLAGS"
2506 SAVE_LDFLAGS="$LDFLAGS"
2507 CFLAGS="$CFLAGS $PERL_CFLAGS"
2508 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
2511 [struct mgvtbl.svt_local],
2512 [have_struct_mgvtbl_svt_local="yes"],
2513 [have_struct_mgvtbl_svt_local="no"],
2520 if test "x$have_struct_mgvtbl_svt_local" = "xyes"
2522 AC_DEFINE(HAVE_PERL_STRUCT_MGVTBL_SVT_LOCAL, 1,
2523 [Define if Perl's struct mgvtbl has member svt_local.])
2526 CFLAGS="$SAVE_CFLAGS"
2527 LDFLAGS="$SAVE_LDFLAGS"
2532 with_pg_config="pg_config"
2533 with_libpq_includedir=""
2534 with_libpq_libdir=""
2535 with_libpq_cppflags=""
2536 with_libpq_ldflags=""
2537 AC_ARG_WITH(libpq, [AS_HELP_STRING([--with-libpq@<:@=PREFIX@:>@],
2540 if test "x$withval" = "xno"
2543 else if test "x$withval" = "xyes"
2547 if test -f "$withval" && test -x "$withval";
2549 with_pg_config="$withval"
2550 else if test -x "$withval/bin/pg_config"
2552 with_pg_config="$withval/bin/pg_config"
2560 if test "x$with_libpq" = "xyes"
2562 with_libpq_includedir=`$with_pg_config --includedir 2> /dev/null`
2565 if test $pg_config_status -eq 0
2567 if test -n "$with_libpq_includedir"; then
2568 for dir in $with_libpq_includedir; do
2569 with_libpq_cppflags="$with_libpq_cppflags -I$dir"
2573 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2576 SAVE_CPPFLAGS="$CPPFLAGS"
2577 CPPFLAGS="$CPPFLAGS $with_libpq_cppflags"
2579 AC_CHECK_HEADERS(libpq-fe.h, [],
2580 [with_libpq="no (libpq-fe.h not found)"], [])
2582 CPPFLAGS="$SAVE_CPPFLAGS"
2584 if test "x$with_libpq" = "xyes"
2586 with_libpq_libdir=`$with_pg_config --libdir 2> /dev/null`
2589 if test $pg_config_status -eq 0
2591 if test -n "$with_libpq_libdir"; then
2592 for dir in $with_libpq_libdir; do
2593 with_libpq_ldflags="$with_libpq_ldflags -L$dir"
2597 AC_MSG_WARN([$with_pg_config returned with status $pg_config_status])
2600 SAVE_LDFLAGS="$LDFLAGS"
2601 LDFLAGS="$LDFLAGS $with_libpq_ldflags"
2603 AC_CHECK_LIB(pq, PQconnectdb,
2605 [with_libpq="no (symbol 'PQconnectdb' not found)"])
2607 AC_CHECK_LIB(pq, PQserverVersion,
2609 [with_libpq="no (symbol 'PQserverVersion' not found)"])
2611 LDFLAGS="$SAVE_LDFLAGS"
2613 if test "x$with_libpq" = "xyes"
2615 BUILD_WITH_LIBPQ_CPPFLAGS="$with_libpq_cppflags"
2616 BUILD_WITH_LIBPQ_LDFLAGS="$with_libpq_ldflags"
2617 AC_SUBST(BUILD_WITH_LIBPQ_CPPFLAGS)
2618 AC_SUBST(BUILD_WITH_LIBPQ_LDFLAGS)
2620 AM_CONDITIONAL(BUILD_WITH_LIBPQ, test "x$with_libpq" = "xyes")
2623 # --with-libpthread {{{
2624 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
2625 [ if test "x$withval" != "xno" \
2626 && test "x$withval" != "xyes"
2628 LDFLAGS="$LDFLAGS -L$withval/lib"
2629 CPPFLAGS="$CPPFLAGS -I$withval/include"
2630 with_libpthread="yes"
2632 if test "x$withval" = "xno"
2634 with_libpthread="no (disabled)"
2637 ], [with_libpthread="yes"])
2638 if test "x$with_libpthread" = "xyes"
2640 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
2643 if test "x$with_libpthread" = "xyes"
2645 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
2647 if test "x$with_libpthread" = "xyes"
2653 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
2654 [Wether or not to use pthread (POSIX threads) library])
2655 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
2660 with_python_path="$PATH"
2661 AC_ARG_WITH(python, [AS_HELP_STRING([--with-python@<:@=PREFIX@:>@], [Path to the python interpreter.])],
2663 if test "x$withval" = "xyes" || test "x$withval" = "xno"
2665 with_python="$withval"
2666 else if test -x "$withval"
2668 with_python_prog="$withval"
2669 with_python_path="`dirname \"$withval\"`$PATH_SEPARATOR$with_python_path"
2671 else if test -d "$withval"
2673 with_python_path="$withval$PATH_SEPARATOR$with_python_path"
2676 AC_MSG_WARN([Argument not recognized: $withval])
2678 ], [with_python="yes"])
2681 PATH="$with_python_path"
2683 if test "x$with_python" = "xyes" && test "x$with_python_prog" = "x"
2685 AC_MSG_CHECKING([for python])
2686 with_python_prog="`which python 2>/dev/null`"
2687 if test "x$with_python_prog" = "x"
2689 AC_MSG_RESULT([not found])
2690 with_python="no (interpreter not found)"
2692 AC_MSG_RESULT([$with_python_prog])
2698 if test "x$with_python" = "xyes"
2700 AC_MSG_CHECKING([for Python CPPFLAGS])
2701 python_include_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_python_inc()" | "$with_python_prog" 2>/dev/null`
2702 python_config_status=$?
2704 if test "$python_config_status" -ne 0 || test "x$python_include_path" = "x"
2706 AC_MSG_RESULT([failed with status $python_config_status])
2709 AC_MSG_RESULT([$python_include_path])
2713 if test "x$with_python" = "xyes"
2715 AC_MSG_CHECKING([for Python LDFLAGS])
2716 python_library_path=`echo "import distutils.sysconfig;print distutils.sysconfig.get_config_vars(\"LIBDIR\").__getitem__(0)" | "$with_python_prog" 2>&1`
2717 python_config_status=$?
2719 if test "$python_config_status" -ne 0 || test "x$python_library_path" = "x"
2721 AC_MSG_RESULT([failed with status $python_config_status])
2724 AC_MSG_RESULT([$python_library_path])
2728 if test "x$with_python" = "xyes"
2730 AC_MSG_CHECKING([for Python LIBS])
2731 python_library_flags=`echo "import distutils.sysconfig;print distutils.sysconfig.get_config_vars(\"BLDLIBRARY\").__getitem__(0)" | "$with_python_prog" 2>&1`
2732 python_config_status=$?
2734 if test "$python_config_status" -ne 0 || test "x$python_library_flags" = "x"
2736 AC_MSG_RESULT([failed with status $python_config_status])
2739 AC_MSG_RESULT([$python_library_flags])
2743 if test "x$with_python" = "xyes"
2745 BUILD_WITH_PYTHON_CPPFLAGS="-I$python_include_path"
2746 BUILD_WITH_PYTHON_LDFLAGS="-L$python_library_path"
2747 BUILD_WITH_PYTHON_LIBS="$python_library_flags"
2748 AC_SUBST(BUILD_WITH_PYTHON_CPPFLAGS)
2749 AC_SUBST(BUILD_WITH_PYTHON_LDFLAGS)
2750 AC_SUBST(BUILD_WITH_PYTHON_LIBS)
2755 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
2758 librrd_threadsafe="yes"
2759 librrd_rrdc_update="no"
2760 AC_ARG_WITH(librrd, [AS_HELP_STRING([--with-librrd@<:@=PREFIX@:>@], [Path to rrdtool.])],
2761 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
2763 librrd_cflags="-I$withval/include"
2764 librrd_ldflags="-L$withval/lib"
2767 with_librrd="$withval"
2769 ], [with_librrd="yes"])
2770 if test "x$with_librrd" = "xyes"
2772 SAVE_CPPFLAGS="$CPPFLAGS"
2773 SAVE_LDFLAGS="$LDFLAGS"
2775 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2776 LDFLAGS="$LDFLAGS $librrd_ldflags"
2778 AC_CHECK_HEADERS(rrd.h,, [with_librrd="no (rrd.h not found)"])
2780 CPPFLAGS="$SAVE_CPPFLAGS"
2781 LDFLAGS="$SAVE_LDFLAGS"
2783 if test "x$with_librrd" = "xyes"
2785 SAVE_CPPFLAGS="$CPPFLAGS"
2786 SAVE_LDFLAGS="$LDFLAGS"
2788 CPPFLAGS="$CPPFLAGS $librrd_cflags"
2789 LDFLAGS="$LDFLAGS $librrd_ldflags"
2791 AC_CHECK_LIB(rrd_th, rrd_update_r,
2793 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
2795 [librrd_threadsafe="no"
2796 AC_CHECK_LIB(rrd, rrd_update,
2798 librrd_ldflags="$librrd_ldflags -lrrd -lm"
2800 [with_librrd="no (symbol 'rrd_update' not found)"],
2805 if test "x$librrd_threadsafe" = "xyes"
2807 AC_CHECK_LIB(rrd_th, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2809 AC_CHECK_LIB(rrd, rrdc_update, [librrd_rrdc_update="yes"], [librrd_rrdc_update="no"])
2812 CPPFLAGS="$SAVE_CPPFLAGS"
2813 LDFLAGS="$SAVE_LDFLAGS"
2815 if test "x$with_librrd" = "xyes"
2817 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
2818 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
2819 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
2820 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
2822 if test "x$librrd_threadsafe" = "xyes"
2824 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
2828 # --with-libsensors {{{
2829 with_sensors_cflags=""
2830 with_sensors_ldflags=""
2831 AC_ARG_WITH(libsensors, [AS_HELP_STRING([--with-libsensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
2833 if test "x$withval" = "xno"
2835 with_libsensors="no"
2837 with_libsensors="yes"
2838 if test "x$withval" != "xyes"
2840 with_sensors_cflags="-I$withval/include"
2841 with_sensors_ldflags="-L$withval/lib"
2842 with_libsensors="yes"
2847 if test "x$ac_system" = "xLinux"
2849 with_libsensors="yes"
2851 with_libsensors="no (Linux only library)"
2854 if test "x$with_libsensors" = "xyes"
2856 SAVE_CPPFLAGS="$CPPFLAGS"
2857 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2859 # AC_CHECK_HEADERS(sensors/sensors.h,
2861 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
2863 # [with_libsensors="no (sensors/sensors.h not found)"])
2864 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_libsensors="no (sensors/sensors.h not found)"])
2866 CPPFLAGS="$SAVE_CPPFLAGS"
2868 if test "x$with_libsensors" = "xyes"
2870 SAVE_CPPFLAGS="$CPPFLAGS"
2871 SAVE_LDFLAGS="$LDFLAGS"
2872 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
2873 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
2875 AC_CHECK_LIB(sensors, sensors_init,
2877 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
2879 [with_libsensors="no (libsensors not found)"])
2881 CPPFLAGS="$SAVE_CPPFLAGS"
2882 LDFLAGS="$SAVE_LDFLAGS"
2884 if test "x$with_libsensors" = "xyes"
2886 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
2887 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
2888 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
2889 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
2891 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_libsensors" = "xyes")
2894 # --with-libstatgrab {{{
2895 with_libstatgrab_cflags=""
2896 with_libstatgrab_ldflags=""
2897 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
2899 if test "x$withval" != "xno" \
2900 && test "x$withval" != "xyes"
2902 with_libstatgrab_cflags="-I$withval/include"
2903 with_libstatgrab_ldflags="-L$withval/lib -lstatgrab"
2904 with_libstatgrab="yes"
2905 with_libstatgrab_pkg_config="no"
2907 with_libstatgrab="$withval"
2908 with_libstatgrab_pkg_config="yes"
2912 with_libstatgrab="yes"
2913 with_libstatgrab_pkg_config="yes"
2916 if test "x$with_libstatgrab" = "xyes" \
2917 && test "x$with_libstatgrab_pkg_config" = "xyes"
2919 if test "x$PKG_CONFIG" != "x"
2921 AC_MSG_CHECKING([pkg-config for libstatgrab])
2923 $PKG_CONFIG --exists libstatgrab 2>/dev/null
2926 with_libstatgrab_pkg_config="no"
2927 with_libstatgrab="no ($PKG_CONFIG doesn't know libstatgrab)"
2928 temp_result="not found"
2930 AC_MSG_RESULT([$temp_result])
2932 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
2933 with_libstatgrab_pkg_config="no"
2934 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
2938 if test "x$with_libstatgrab" = "xyes" \
2939 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2940 && test "x$with_libstatgrab_cflags" = "x"
2942 AC_MSG_CHECKING([for libstatgrab CFLAGS])
2943 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
2946 with_libstatgrab_cflags="$temp_result"
2948 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
2949 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
2951 AC_MSG_RESULT([$temp_result])
2954 if test "x$with_libstatgrab" = "xyes" \
2955 && test "x$with_libstatgrab_pkg_config" = "xyes" \
2956 && test "x$with_libstatgrab_ldflags" = "x"
2958 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
2959 temp_result="`$PKG_CONFIG --libs libstatgrab`"
2962 with_libstatgrab_ldflags="$temp_result"
2964 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
2965 temp_result="$PKG_CONFIG --libs libstatgrab failed"
2967 AC_MSG_RESULT([$temp_result])
2970 if test "x$with_libstatgrab" = "xyes"
2972 SAVE_CPPFLAGS="$CPPFLAGS"
2973 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
2975 AC_CHECK_HEADERS(statgrab.h,
2976 [with_libstatgrab="yes"],
2977 [with_libstatgrab="no (statgrab.h not found)"])
2979 CPPFLAGS="$SAVE_CPPFLAGS"
2982 if test "x$with_libstatgrab" = "xyes"
2984 SAVE_CFLAGS="$CFLAGS"
2985 SAVE_LDFLAGS="$LDFLAGS"
2987 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
2988 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
2990 AC_CHECK_LIB(statgrab, sg_init,
2991 [with_libstatgrab="yes"],
2992 [with_libstatgrab="no (symbol sg_init not found)"])
2994 CFLAGS="$SAVE_CFLAGS"
2995 LDFLAGS="$SAVE_LDFLAGS"
2998 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
2999 if test "x$with_libstatgrab" = "xyes"
3001 AC_DEFINE(HAVE_LIBSTATGRAB, 1, [Define to 1 if you have the 'statgrab' library (-lstatgrab)])
3002 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
3003 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
3004 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
3005 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
3009 # --with-libtokyotyrant {{{
3010 with_libtokyotyrant_cppflags=""
3011 with_libtokyotyrant_ldflags=""
3012 with_libtokyotyrant_libs=""
3013 AC_ARG_WITH(libtokyotyrant, [AS_HELP_STRING([--with-libtokyotyrant@<:@=PREFIX@:>@], [Path to libtokyotyrant.])],
3015 if test "x$withval" = "xno"
3017 with_libtokyotyrant="no"
3018 else if test "x$withval" = "xyes"
3020 with_libtokyotyrant="yes"
3022 with_libtokyotyrant_cppflags="-I$withval/include"
3023 with_libtokyotyrant_ldflags="-L$withval/include"
3024 with_libtokyotyrant_libs="-ltokyotyrant"
3025 with_libtokyotyrant="yes"
3029 with_libtokyotyrant="yes"
3032 if test "x$with_libtokyotyrant" = "xyes"
3034 if $PKG_CONFIG --exists tokyotyrant
3036 with_libtokyotyrant_cppflags="$with_libtokyotyrant_cppflags `$PKG_CONFIG --cflags tokyotyrant`"
3037 with_libtokyotyrant_ldflags="$with_libtokyotyrant_ldflags `pkg-config --libs-only-L tokyotyrant`"
3038 with_libtokyotyrant_libs="$with_libtokyotyrant_libs `pkg-config --libs-only-l tokyotyrant`"
3042 SAVE_CPPFLAGS="$CPPFLAGS"
3043 SAVE_LDFLAGS="$LDFLAGS"
3044 CPPFLAGS="$CPPFLAGS $with_libtokyotyrant_cppflags"
3045 LDFLAGS="$LDFLAGS $with_libtokyotyrant_ldflags"
3047 if test "x$with_libtokyotyrant" = "xyes"
3049 AC_CHECK_HEADERS(tcrdb.h,
3051 AC_DEFINE(HAVE_TCRDB_H, 1,
3052 [Define to 1 if you have the <tcrdb.h> header file.])
3053 ], [with_libtokyotyrant="no (tcrdb.h not found)"])
3056 if test "x$with_libtokyotyrant" = "xyes"
3058 AC_CHECK_LIB(tokyotyrant, tcrdbrnum,
3060 AC_DEFINE(HAVE_LIBTOKYOTYRANT, 1,
3061 [Define to 1 if you have the tokyotyrant library (-ltokyotyrant).])
3063 [with_libtokyotyrant="no (symbol tcrdbrnum not found)"],
3064 [$with_libtokyotyrant_libs])
3067 CPPFLAGS="$SAVE_CPPFLAGS"
3068 LDFLAGS="$SAVE_LDFLAGS"
3070 if test "x$with_libtokyotyrant" = "xyes"
3072 BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS="$with_libtokyotyrant_cppflags"
3073 BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS="$with_libtokyotyrant_ldflags"
3074 BUILD_WITH_LIBTOKYOTYRANT_LIBS="$with_libtokyotyrant_libs"
3075 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_CPPFLAGS)
3076 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LDFLAGS)
3077 AC_SUBST(BUILD_WITH_LIBTOKYOTYRANT_LIBS)
3079 AM_CONDITIONAL(BUILD_WITH_LIBTOKYOTYRANT, test "x$with_libtokyotyrant" = "xyes")
3082 # --with-libupsclient {{{
3083 with_libupsclient_config=""
3084 with_libupsclient_cflags=""
3085 with_libupsclient_libs=""
3086 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
3088 if test "x$withval" = "xno"
3090 with_libupsclient="no"
3091 else if test "x$withval" = "xyes"
3093 with_libupsclient="use_pkgconfig"
3095 if test -x "$withval"
3097 with_libupsclient_config="$withval"
3098 with_libupsclient="use_libupsclient_config"
3099 else if test -x "$withval/bin/libupsclient-config"
3101 with_libupsclient_config="$withval/bin/net-snmp-config"
3102 with_libupsclient="use_libupsclient_config"
3104 AC_MSG_NOTICE([Not checking for libupsclient: Manually configured])
3105 with_libupsclient_cflags="-I$withval/include"
3106 with_libupsclient_libs="-L$withval/lib -lupsclient"
3107 with_libupsclient="yes"
3111 [with_libupsclient="use_pkgconfig"])
3113 # configure using libupsclient-config
3114 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3116 AC_MSG_NOTICE([Checking for libupsclient using $with_libupsclient_config])
3117 with_libupsclient_cflags="`$with_libupsclient_config --cflags`"
3120 with_libupsclient="no ($with_libupsclient_config failed)"
3122 with_libupsclient_libs="`$with_libupsclient_config --libs`"
3125 with_libupsclient="no ($with_libupsclient_config failed)"
3128 if test "x$with_libupsclient" = "xuse_libupsclient_config"
3130 with_libupsclient="yes"
3133 # configure using pkg-config
3134 if test "x$with_libupsclient" = "xuse_pkgconfig"
3136 if test "x$PKG_CONFIG" = "x"
3138 with_libupsclient="no (Don't have pkg-config)"
3141 if test "x$with_libupsclient" = "xuse_pkgconfig"
3143 AC_MSG_NOTICE([Checking for libupsclient using $PKG_CONFIG])
3144 $PKG_CONFIG --exists 'libupsclient' 2>/dev/null
3147 with_libupsclient="no (pkg-config doesn't know library)"
3150 if test "x$with_libupsclient" = "xuse_pkgconfig"
3152 with_libupsclient_cflags="`$PKG_CONFIG --cflags 'libupsclient'`"
3155 with_libupsclient="no ($PKG_CONFIG failed)"
3157 with_libupsclient_libs="`$PKG_CONFIG --libs 'libupsclient'`"
3160 with_libupsclient="no ($PKG_CONFIG failed)"
3163 if test "x$with_libupsclient" = "xuse_pkgconfig"
3165 with_libupsclient="yes"
3168 # with_libupsclient_cflags and with_libupsclient_libs are set up now, let's do
3169 # the actual checks.
3170 if test "x$with_libupsclient" = "xyes"
3172 SAVE_CPPFLAGS="$CPPFLAGS"
3173 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3175 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
3177 CPPFLAGS="$SAVE_CPPFLAGS"
3179 if test "x$with_libupsclient" = "xyes"
3181 SAVE_CPPFLAGS="$CPPFLAGS"
3182 SAVE_LDFLAGS="$LDFLAGS"
3184 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3185 LDFLAGS="$LDFLAGS $with_libupsclient_libs"
3187 AC_CHECK_LIB(upsclient, upscli_connect,
3188 [with_libupsclient="yes"],
3189 [with_libupsclient="no (symbol upscli_connect not found)"])
3191 CPPFLAGS="$SAVE_CPPFLAGS"
3192 LDFLAGS="$SAVE_LDFLAGS"
3194 if test "x$with_libupsclient" = "xyes"
3196 SAVE_CPPFLAGS="$CPPFLAGS"
3197 CPPFLAGS="$CPPFLAGS $with_libupsclient_cflags"
3199 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
3200 [#include <stdlib.h>
3202 #include <upsclient.h>])
3204 CPPFLAGS="$SAVE_CPPFLAGS"
3206 if test "x$with_libupsclient" = "xyes"
3208 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_libupsclient_cflags"
3209 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_libupsclient_libs"
3210 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
3211 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
3215 # --with-libxmms {{{
3216 with_xmms_config="xmms-config"
3219 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
3221 if test "x$withval" != "xno" \
3222 && test "x$withval" != "xyes"
3224 if test -f "$withval" && test -x "$withval";
3226 with_xmms_config="$withval"
3227 else if test -x "$withval/bin/xmms-config"
3229 with_xmms_config="$withval/bin/xmms-config"
3232 else if test "x$withval" = "xno"
3242 if test "x$with_libxmms" = "xyes"
3244 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
3245 xmms_config_status=$?
3247 if test $xmms_config_status -ne 0
3252 if test "x$with_libxmms" = "xyes"
3254 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
3255 xmms_config_status=$?
3257 if test $xmms_config_status -ne 0
3262 if test "x$with_libxmms" = "xyes"
3264 AC_CHECK_LIB(xmms, xmms_remote_get_info,
3266 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
3267 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
3268 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
3269 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
3276 with_libxmms_numeric=0
3277 if test "x$with_libxmms" = "xyes"
3279 with_libxmms_numeric=1
3281 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
3282 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
3285 # --with-libyajl {{{
3286 with_libyajl_cppflags=""
3287 with_libyajl_ldflags=""
3288 AC_ARG_WITH(libyajl, [AS_HELP_STRING([--with-libyajl@<:@=PREFIX@:>@], [Path to libyajl.])],
3290 if test "x$withval" != "xno" && test "x$withval" != "xyes"
3292 with_libyajl_cppflags="-I$withval/include"
3293 with_libyajl_ldflags="-L$withval/lib"
3296 with_libyajl="$withval"
3302 if test "x$with_libyajl" = "xyes"
3304 SAVE_CPPFLAGS="$CPPFLAGS"
3305 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3307 AC_CHECK_HEADERS(yajl/yajl_parse.h, [with_libyajl="yes"], [with_libyajl="no (yajl/yajl_parse.h not found)"])
3309 CPPFLAGS="$SAVE_CPPFLAGS"
3311 if test "x$with_libyajl" = "xyes"
3313 SAVE_CPPFLAGS="$CPPFLAGS"
3314 SAVE_LDFLAGS="$LDFLAGS"
3315 CPPFLAGS="$CPPFLAGS $with_libyajl_cppflags"
3316 LDFLAGS="$LDFLAGS $with_libyajl_ldflags"
3318 AC_CHECK_LIB(yajl, yajl_alloc, [with_libyajl="yes"], [with_libyajl="no (Symbol 'yajl_alloc' not found)"])
3320 CPPFLAGS="$SAVE_CPPFLAGS"
3321 LDFLAGS="$SAVE_LDFLAGS"
3323 if test "x$with_libyajl" = "xyes"
3325 BUILD_WITH_LIBYAJL_CPPFLAGS="$with_libyajl_cppflags"
3326 BUILD_WITH_LIBYAJL_LDFLAGS="$with_libyajl_ldflags"
3327 BUILD_WITH_LIBYAJL_LIBS="-lyajl"
3328 AC_SUBST(BUILD_WITH_LIBYAJL_CPPFLAGS)
3329 AC_SUBST(BUILD_WITH_LIBYAJL_LDFLAGS)
3330 AC_SUBST(BUILD_WITH_LIBYAJL_LIBS)
3331 AC_DEFINE(HAVE_LIBYAJL, 1, [Define if libyajl is present and usable.])
3333 AM_CONDITIONAL(BUILD_WITH_LIBYAJL, test "x$with_libyajl" = "xyes")
3336 # pkg-config --exists 'libxml-2.0'; pkg-config --exists libvirt {{{
3337 with_libxml2="no (pkg-config isn't available)"
3338 with_libxml2_cflags=""
3339 with_libxml2_ldflags=""
3340 with_libvirt="no (pkg-config isn't available)"
3341 with_libvirt_cflags=""
3342 with_libvirt_ldflags=""
3343 if test "x$PKG_CONFIG" != "x"
3345 pkg-config --exists 'libxml-2.0' 2>/dev/null
3350 with_libxml2="no (pkg-config doesn't know library)"
3353 pkg-config --exists libvirt 2>/dev/null
3358 with_libvirt="no (pkg-config doesn't know library)"
3361 if test "x$with_libxml2" = "xyes"
3363 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
3368 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
3374 if test "x$with_libxml2" = "xyes"
3376 SAVE_CPPFLAGS="$CPPFLAGS"
3377 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
3379 AC_CHECK_HEADERS(libxml/parser.h, [],
3380 [with_libxml2="no (libxml/parser.h not found)"])
3382 CPPFLAGS="$SAVE_CPPFLAGS"
3384 if test "x$with_libxml2" = "xyes"
3386 SAVE_CFLAGS="$CFLAGS"
3387 SAVE_LDFLAGS="$LDFLAGS"
3389 CFLAGS="$CFLAGS $with_libxml2_cflags"
3390 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
3392 AC_CHECK_LIB(xml2, xmlXPathEval,
3393 [with_libxml2="yes"],
3394 [with_libxml2="no (symbol xmlXPathEval not found)"])
3396 CFLAGS="$SAVE_CFLAGS"
3397 LDFLAGS="$SAVE_LDFLAGS"
3399 dnl Add the right compiler flags and libraries.
3400 if test "x$with_libxml2" = "xyes"; then
3401 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
3402 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
3403 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
3404 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
3406 if test "x$with_libvirt" = "xyes"
3408 with_libvirt_cflags="`pkg-config --cflags libvirt`"
3413 with_libvirt_ldflags="`pkg-config --libs libvirt`"
3419 if test "x$with_libvirt" = "xyes"
3421 SAVE_CPPFLAGS="$CPPFLAGS"
3422 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
3424 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
3425 [with_libvirt="no (libvirt/libvirt.h not found)"])
3427 CPPFLAGS="$SAVE_CPPFLAGS"
3429 if test "x$with_libvirt" = "xyes"
3431 SAVE_CFLAGS="$CFLAGS"
3432 SAVE_LDFLAGS="$LDFLAGS"
3434 CFLAGS="$CFLAGS $with_libvirt_cflags"
3435 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
3437 AC_CHECK_LIB(virt, virDomainBlockStats,
3438 [with_libvirt="yes"],
3439 [with_libvirt="no (symbol virDomainBlockStats not found)"])
3441 CFLAGS="$SAVE_CFLAGS"
3442 LDFLAGS="$SAVE_LDFLAGS"
3444 dnl Add the right compiler flags and libraries.
3445 if test "x$with_libvirt" = "xyes"; then
3446 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
3447 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
3448 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
3449 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
3453 # $PKG_CONFIG --exists OpenIPMIpthread {{{
3454 with_libopenipmipthread="yes"
3455 with_libopenipmipthread_cflags=""
3456 with_libopenipmipthread_libs=""
3458 AC_MSG_CHECKING([for pkg-config])
3460 if test "x$PKG_CONFIG" = "x"
3462 with_libopenipmipthread="no"
3465 temp_result="$PKG_CONFIG"
3467 AC_MSG_RESULT([$temp_result])
3469 if test "x$with_libopenipmipthread" = "xyes"
3471 AC_MSG_CHECKING([for libOpenIPMIpthread])
3472 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
3475 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
3477 AC_MSG_RESULT([$with_libopenipmipthread])
3480 if test "x$with_libopenipmipthread" = "xyes"
3482 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
3483 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
3486 with_libopenipmipthread_cflags="$temp_result"
3488 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
3489 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
3491 AC_MSG_RESULT([$temp_result])
3494 if test "x$with_libopenipmipthread" = "xyes"
3496 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
3497 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
3500 with_libopenipmipthread_ldflags="$temp_result"
3502 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
3503 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
3505 AC_MSG_RESULT([$temp_result])
3508 if test "x$with_libopenipmipthread" = "xyes"
3510 SAVE_CPPFLAGS="$CPPFLAGS"
3511 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
3513 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
3514 [with_libopenipmipthread="yes"],
3515 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
3516 [#include <OpenIPMI/ipmiif.h>
3517 #include <OpenIPMI/ipmi_err.h>
3518 #include <OpenIPMI/ipmi_posix.h>
3519 #include <OpenIPMI/ipmi_conn.h>
3522 CPPFLAGS="$SAVE_CPPFLAGS"
3525 if test "x$with_libopenipmipthread" = "xyes"
3527 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
3528 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
3529 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
3530 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
3534 PKG_CHECK_MODULES([LIBNOTIFY], [libnotify],
3535 [with_libnotify="yes"],
3536 [with_libnotify="no ($LIBNOTIFY_PKG_ERRORS)"])
3538 # Check for enabled/disabled features
3541 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
3542 # ------------------------------------------------------------
3544 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
3549 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
3554 m4_define([EnDis],[disabled])dnl
3555 m4_define([YesNo],[no])dnl
3561 m4_define([EnDis],[enabled])dnl
3562 m4_define([YesNo],[yes])dnl
3565 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
3569 m4_if([$3], [feature], [],
3573 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
3579 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
3581 enable_$1='[YesNo]'dnl
3583 if test "x$enable_$1" = "xno"
3587 if test "x$enable_$1" = "xyes"
3591 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
3596 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
3597 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
3599 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
3601 # AC_PLUGIN(name, default, info)
3602 # ------------------------------------------------------------
3609 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
3611 if test "x$enableval" = "xyes"
3614 else if test "x$enableval" = "xforce"
3623 if test "x$enable_all_plugins" = "xauto"
3625 if test "x$2" = "xyes"
3632 enable_plugin="$enable_all_plugins"
3635 if test "x$enable_plugin" = "xyes"
3637 if test "x$2" = "xyes" || test "x$force" = "xyes"
3639 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
3640 if test "x$2" != "xyes"
3642 dependency_warning="yes"
3644 else # User passed "yes" but dependency checking yielded "no" => Dependency problem.
3645 dependency_error="yes"
3646 enable_plugin="no (dependency error)"
3649 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
3650 enable_$1="$enable_plugin"
3652 )# AC_PLUGIN(name, default, info)
3654 m4_divert_once([HELP_ENABLE], [
3655 collectd features:])
3656 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
3657 AC_COLLECTD([debug], [enable], [feature], [debugging])
3658 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
3659 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
3661 dependency_warning="no"
3662 dependency_error="no"
3667 plugin_conntrack="no"
3670 plugin_curl_json="no"
3674 plugin_interface="no"
3681 plugin_multimeter="no"
3685 plugin_processes="no"
3686 plugin_protocols="no"
3690 plugin_tcpconns="no"
3697 plugin_wireless="no"
3701 if test "x$ac_system" = "xLinux"
3703 plugin_battery="yes"
3704 plugin_conntrack="yes"
3706 plugin_cpufreq="yes"
3708 plugin_entropy="yes"
3709 plugin_interface="yes"
3714 plugin_fscache="yes"
3715 plugin_processes="yes"
3716 plugin_protocols="yes"
3719 plugin_tcpconns="yes"
3720 plugin_thermal="yes"
3723 plugin_vserver="yes"
3724 plugin_wireless="yes"
3726 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
3732 if test "x$ac_system" = "xOpenBSD"
3734 plugin_tcpconns="yes"
3738 if test "x$with_libiokit" = "xyes"
3740 plugin_battery="yes"
3745 if test "x$with_kstat" = "xyes"
3748 plugin_zfs_arc="yes"
3751 if test "x$with_devinfo$with_kstat" = "xyesyes"
3755 plugin_interface="yes"
3760 if test "x$have_sys_swap_h$with_kstat$ac_system" = "xyesyesSolaris"
3766 if test "x$with_libstatgrab" = "xyes"
3770 plugin_interface="yes"
3777 if test "x$with_libcurl" = "xyes" && test "x$with_libxml2" = "xyes"
3783 if test "x$with_libopenipmipthread" = "xyes"
3788 if test "x$with_libcurl" = "xyes" && test "x$with_libyajl" = "xyes"
3790 plugin_curl_json="yes"
3793 if test "x$have_processor_info" = "xyes"
3797 if test "x$have_sysctl" = "xyes"
3804 if test "x$have_sysctlbyname" = "xyes"
3808 plugin_tcpconns="yes"
3811 # Df plugin: Check if we know how to determine mount points first.
3812 #if test "x$have_listmntent" = "xyes"; then
3815 if test "x$have_getvfsstat" = "xyes" || test "x$have_getfsstat" = "xyes"
3819 if test "x$c_cv_have_two_getmntent" = "xyes" || test "x$have_getmntent" = "xgen" || test "x$have_getmntent" = "xsun"
3823 #if test "x$have_getmntent" = "xseq"
3827 if test "x$c_cv_have_one_getmntent" = "xyes"
3832 # Df plugin: Check if we have either `statfs' or `statvfs' second.
3833 if test "x$plugin_df" = "xyes"
3836 if test "x$have_statfs" = "xyes"
3840 if test "x$have_statvfs" = "xyes"
3846 if test "x$have_getifaddrs" = "xyes"
3848 plugin_interface="yes"
3851 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
3853 plugin_libvirt="yes"
3856 if test "x$have_getloadavg" = "xyes"
3861 if test "x$c_cv_have_libperl$c_cv_have_perl_ithreads" = "xyesyes"
3866 # Mac OS X memory interface
3867 if test "x$have_host_statistics" = "xyes"
3872 if test "x$have_termios_h" = "xyes"
3874 plugin_multimeter="yes"
3878 if test "x$have_thread_info" = "xyes"
3880 plugin_processes="yes"
3883 if test "x$with_kvm_getprocs" = "xyes" && test "x$have_struct_kinfo_proc_freebsd" = "xyes"
3885 plugin_processes="yes"
3888 if test "x$with_kvm_getswapinfo" = "xyes"
3893 if test "x$have_swapctl" = "xyes"
3898 if test "x$with_kvm_openfiles$with_kvm_nlist" = "xyesyes"
3900 plugin_tcpconns="yes"
3903 if test "x$have_getutent" = "xyes"
3907 if test "x$have_getutxent" = "xyes"
3912 m4_divert_once([HELP_ENABLE], [
3915 AC_ARG_ENABLE([all-plugins],
3916 AC_HELP_STRING([--enable-all-plugins],
3917 [enable all plugins (auto by def)]),
3919 if test "x$enableval" = "xyes"
3921 enable_all_plugins="yes"
3922 else if test "x$enableval" = "xauto"
3924 enable_all_plugins="auto"
3926 enable_all_plugins="no"
3929 [enable_all_plugins="auto"])
3931 m4_divert_once([HELP_ENABLE], [])
3933 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
3934 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
3935 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
3936 AC_PLUGIN([ascent], [$plugin_ascent], [AscentEmu player statistics])
3937 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
3938 AC_PLUGIN([bind], [$plugin_bind], [ISC Bind nameserver statistics])
3939 AC_PLUGIN([conntrack], [$plugin_conntrack], [nf_conntrack statistics])
3940 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
3941 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
3942 AC_PLUGIN([csv], [yes], [CSV output plugin])
3943 AC_PLUGIN([curl], [$with_libcurl], [CURL generic web statistics])
3944 AC_PLUGIN([curl_json], [$plugin_curl_json], [CouchDB statistics])
3945 AC_PLUGIN([dbi], [$with_libdbi], [General database statistics])
3946 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
3947 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
3948 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
3949 AC_PLUGIN([email], [yes], [EMail statistics])
3950 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
3951 AC_PLUGIN([exec], [yes], [Execution of external programs])
3952 AC_PLUGIN([filecount], [yes], [Count files in directories])
3953 AC_PLUGIN([fscache], [$plugin_fscache], [fscache statistics])
3954 AC_PLUGIN([gmond], [$with_libganglia], [Ganglia plugin])
3955 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
3956 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
3957 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
3958 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
3959 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
3960 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
3961 AC_PLUGIN([java], [$with_java], [Embed the Java Virtual Machine])
3962 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
3963 AC_PLUGIN([load], [$plugin_load], [System load])
3964 AC_PLUGIN([logfile], [yes], [File logging plugin])
3965 AC_PLUGIN([madwifi], [$have_linux_wireless_h], [Madwifi wireless statistics])
3966 AC_PLUGIN([match_empty_counter], [yes], [The empty counter match])
3967 AC_PLUGIN([match_regex], [yes], [The regex match])
3968 AC_PLUGIN([match_timediff], [yes], [The timediff match])
3969 AC_PLUGIN([match_value], [yes], [The value match])
3970 AC_PLUGIN([mbmon], [yes], [Query mbmond])
3971 AC_PLUGIN([memcachec], [$with_libmemcached], [memcachec statistics])
3972 AC_PLUGIN([memcached], [yes], [memcached statistics])
3973 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
3974 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
3975 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
3976 AC_PLUGIN([netapp], [$with_libnetapp], [NetApp plugin])
3977 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
3978 AC_PLUGIN([network], [yes], [Network communication plugin])
3979 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
3980 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
3981 AC_PLUGIN([notify_desktop], [$with_libnotify], [Desktop notifications])
3982 AC_PLUGIN([notify_email], [$with_libesmtp], [Email notifier])
3983 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
3984 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
3985 AC_PLUGIN([olsrd], [yes], [olsrd statistics])
3986 AC_PLUGIN([onewire], [$with_libowcapi], [OneWire sensor statistics])
3987 AC_PLUGIN([openvpn], [yes], [OpenVPN client statistics])
3988 AC_PLUGIN([oracle], [$with_oracle], [Oracle plugin])
3989 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
3990 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
3991 AC_PLUGIN([postgresql], [$with_libpq], [PostgreSQL database statistics])
3992 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
3993 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
3994 AC_PLUGIN([protocols], [$plugin_protocols], [Protocol (IP, TCP, ...) statistics])
3995 AC_PLUGIN([python], [$with_python], [Embed a Python interpreter])
3996 AC_PLUGIN([rrdcached], [$librrd_rrdc_update], [RRDTool output plugin])
3997 AC_PLUGIN([rrdtool], [$with_librrd], [RRDTool output plugin])
3998 AC_PLUGIN([sensors], [$with_libsensors], [lm_sensors statistics])
3999 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
4000 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
4001 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
4002 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
4003 AC_PLUGIN([table], [yes], [Parsing of tabular data])
4004 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
4005 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
4006 AC_PLUGIN([target_notification], [yes], [The notification target])
4007 AC_PLUGIN([target_replace], [yes], [The replace target])
4008 AC_PLUGIN([target_scale],[yes], [The scale target])
4009 AC_PLUGIN([target_set], [yes], [The set target])
4010 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
4011 AC_PLUGIN([teamspeak2], [yes], [TeamSpeak2 server statistics])
4012 AC_PLUGIN([ted], [$plugin_ted], [Read The Energy Detective values])
4013 AC_PLUGIN([thermal], [$plugin_thermal], [Linux ACPI thermal zone statistics])
4014 AC_PLUGIN([tokyotyrant], [$with_libtokyotyrant], [TokyoTyrant database statistics])
4015 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
4016 AC_PLUGIN([uptime], [$plugin_uptime], [Uptime statistics])
4017 AC_PLUGIN([users], [$plugin_users], [User statistics])
4018 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
4019 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
4020 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
4021 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
4022 AC_PLUGIN([write_http], [$with_libcurl], [HTTP output plugin])
4023 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
4024 AC_PLUGIN([zfs_arc], [$plugin_zfs_arc], [ZFS ARC statistics])
4026 dnl Default configuration file
4027 # Load either syslog or logfile
4028 LOAD_PLUGIN_SYSLOG=""
4029 LOAD_PLUGIN_LOGFILE=""
4031 AC_MSG_CHECKING([which default log plugin to load])
4032 default_log_plugin="none"
4033 if test "x$enable_syslog" = "xyes"
4035 default_log_plugin="syslog"
4037 LOAD_PLUGIN_SYSLOG="##"
4040 if test "x$enable_logfile" = "xyes"
4042 if test "x$default_log_plugin" = "xnone"
4044 default_log_plugin="logfile"
4046 LOAD_PLUGIN_LOGFILE="#"
4049 LOAD_PLUGIN_LOGFILE="##"
4051 AC_MSG_RESULT([$default_log_plugin])
4053 AC_SUBST(LOAD_PLUGIN_SYSLOG)
4054 AC_SUBST(LOAD_PLUGIN_LOGFILE)
4056 DEFAULT_LOG_LEVEL="info"
4057 if test "x$enable_debug" = "xyes"
4059 DEFAULT_LOG_LEVEL="debug"
4061 AC_SUBST(DEFAULT_LOG_LEVEL)
4063 # Load only one of rrdtool, network, csv in the default config.
4064 LOAD_PLUGIN_RRDTOOL=""
4065 LOAD_PLUGIN_NETWORK=""
4068 AC_MSG_CHECKING([which default write plugin to load])
4069 default_write_plugin="none"
4070 if test "x$enable_rrdtool" = "xyes"
4072 default_write_plugin="rrdtool"
4074 LOAD_PLUGIN_RRDTOOL="##"
4077 if test "x$enable_network" = "xyes"
4079 if test "x$default_write_plugin" = "xnone"
4081 default_write_plugin="network"
4083 LOAD_PLUGIN_NETWORK="#"
4086 LOAD_PLUGIN_NETWORK="##"
4089 if test "x$enable_csv" = "xyes"
4091 if test "x$default_write_plugin" = "xnone"
4093 default_write_plugin="csv"
4098 LOAD_PLUGIN_CSV="##"
4100 AC_MSG_RESULT([$default_write_plugin])
4102 AC_SUBST(LOAD_PLUGIN_RRDTOOL)
4103 AC_SUBST(LOAD_PLUGIN_NETWORK)
4104 AC_SUBST(LOAD_PLUGIN_CSV)
4107 if test "x$ac_system" = "xLinux" \
4108 && test "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
4110 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
4114 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
4116 if test "x$withval" != "xno" && test "x$withval" != "xyes"
4118 PERL_BINDINGS_OPTIONS="$withval"
4119 with_perl_bindings="yes"
4121 PERL_BINDINGS_OPTIONS=""
4122 with_perl_bindings="$withval"
4126 PERL_BINDINGS_OPTIONS=""
4127 if test -n "$perl_interpreter"
4129 with_perl_bindings="yes"
4131 with_perl_bindings="no (no perl interpreter found)"
4134 if test "x$with_perl_bindings" = "xyes"
4136 PERL_BINDINGS="perl"
4140 AC_SUBST(PERL_BINDINGS)
4141 AC_SUBST(PERL_BINDINGS_OPTIONS)
4143 dnl libcollectdclient
4144 LCC_VERSION_MAJOR=`echo $PACKAGE_VERSION | cut -d'.' -f1`
4145 LCC_VERSION_MINOR=`echo $PACKAGE_VERSION | cut -d'.' -f2`
4146 LCC_VERSION_PATCH=`echo $PACKAGE_VERSION | cut -d'.' -f3`
4148 LCC_VERSION_EXTRA=`echo $PACKAGE_VERSION | cut -d'.' -f4-`
4150 LCC_VERSION_STRING="$LCC_VERSION_MAJOR.$LCC_VERSION_MINOR.$LCC_VERSION_PATCH"
4152 AC_SUBST(LCC_VERSION_MAJOR)
4153 AC_SUBST(LCC_VERSION_MINOR)
4154 AC_SUBST(LCC_VERSION_PATCH)
4155 AC_SUBST(LCC_VERSION_EXTRA)
4156 AC_SUBST(LCC_VERSION_STRING)
4158 AC_CONFIG_FILES(src/libcollectdclient/lcc_features.h)
4160 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)
4162 if test "x$with_librrd" = "xyes" \
4163 && test "x$librrd_threadsafe" != "xyes"
4165 with_librrd="yes (warning: librrd is not thread-safe)"
4168 if test "x$with_libiptc" = "xyes" -a "x$with_own_libiptc" = "xyes"
4170 with_libiptc="yes (shipped version)"
4173 if test "x$with_libperl" = "xyes"
4175 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
4177 enable_perl="no (needs libperl)"
4180 if test "x$enable_perl" = "xno" && test "x$c_cv_have_perl_ithreads" = "xno"
4182 enable_perl="no (libperl doesn't support ithreads)"
4185 if test "x$with_perl_bindings" = "xyes" \
4186 && test "x$PERL_BINDINGS_OPTIONS" != "x"
4188 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
4195 libcurl . . . . . . . $with_libcurl
4196 libdbi . . . . . . . $with_libdbi
4197 libesmtp . . . . . . $with_libesmtp
4198 libganglia . . . . . $with_libganglia
4199 libgcrypt . . . . . . $with_libgcrypt
4200 libiokit . . . . . . $with_libiokit
4201 libiptc . . . . . . . $with_libiptc
4202 libjvm . . . . . . . $with_java
4203 libkstat . . . . . . $with_kstat
4204 libkvm . . . . . . . $with_libkvm
4205 libmemcached . . . . $with_libmemcached
4206 libmysql . . . . . . $with_libmysql
4207 libnetapp . . . . . . $with_libnetapp
4208 libnetlink . . . . . $with_libnetlink
4209 libnetsnmp . . . . . $with_libnetsnmp
4210 libnotify . . . . . . $with_libnotify
4211 liboconfig . . . . . $with_liboconfig
4212 libopenipmi . . . . . $with_libopenipmipthread
4213 liboping . . . . . . $with_liboping
4214 libpcap . . . . . . . $with_libpcap
4215 libperl . . . . . . . $with_libperl
4216 libpq . . . . . . . . $with_libpq
4217 libpthread . . . . . $with_libpthread
4218 librrd . . . . . . . $with_librrd
4219 libsensors . . . . . $with_libsensors
4220 libstatgrab . . . . . $with_libstatgrab
4221 libtokyotyrant . . . $with_libtokyotyrant
4222 libupsclient . . . . $with_libupsclient
4223 libvirt . . . . . . . $with_libvirt
4224 libxml2 . . . . . . . $with_libxml2
4225 libxmms . . . . . . . $with_libxmms
4226 libyajl . . . . . . . $with_libyajl
4227 oracle . . . . . . . $with_oracle
4228 python . . . . . . . $with_python
4231 daemon mode . . . . . $enable_daemon
4232 debug . . . . . . . . $enable_debug
4235 perl . . . . . . . . $with_perl_bindings
4238 apache . . . . . . . $enable_apache
4239 apcups . . . . . . . $enable_apcups
4240 apple_sensors . . . . $enable_apple_sensors
4241 ascent . . . . . . . $enable_ascent
4242 battery . . . . . . . $enable_battery
4243 bind . . . . . . . . $enable_bind
4244 conntrack . . . . . . $enable_conntrack
4245 cpu . . . . . . . . . $enable_cpu
4246 cpufreq . . . . . . . $enable_cpufreq
4247 csv . . . . . . . . . $enable_csv
4248 curl . . . . . . . . $enable_curl
4249 curl_json . . . . . . $enable_curl_json
4250 dbi . . . . . . . . . $enable_dbi
4251 df . . . . . . . . . $enable_df
4252 disk . . . . . . . . $enable_disk
4253 dns . . . . . . . . . $enable_dns
4254 email . . . . . . . . $enable_email
4255 entropy . . . . . . . $enable_entropy
4256 exec . . . . . . . . $enable_exec
4257 filecount . . . . . . $enable_filecount
4258 fscache . . . . . . . $enable_fscache
4259 gmond . . . . . . . . $enable_gmond
4260 hddtemp . . . . . . . $enable_hddtemp
4261 interface . . . . . . $enable_interface
4262 ipmi . . . . . . . . $enable_ipmi
4263 iptables . . . . . . $enable_iptables
4264 ipvs . . . . . . . . $enable_ipvs
4265 irq . . . . . . . . . $enable_irq
4266 java . . . . . . . . $enable_java
4267 libvirt . . . . . . . $enable_libvirt
4268 load . . . . . . . . $enable_load
4269 logfile . . . . . . . $enable_logfile
4270 madwifi . . . . . . . $enable_madwifi
4271 match_empty_counter . $enable_match_empty_counter
4272 match_regex . . . . . $enable_match_regex
4273 match_timediff . . . $enable_match_timediff
4274 match_value . . . . . $enable_match_value
4275 mbmon . . . . . . . . $enable_mbmon
4276 memcachec . . . . . . $enable_memcachec
4277 memcached . . . . . . $enable_memcached
4278 memory . . . . . . . $enable_memory
4279 multimeter . . . . . $enable_multimeter
4280 mysql . . . . . . . . $enable_mysql
4281 netapp . . . . . . . $enable_netapp
4282 netlink . . . . . . . $enable_netlink
4283 network . . . . . . . $enable_network
4284 nfs . . . . . . . . . $enable_nfs
4285 nginx . . . . . . . . $enable_nginx
4286 notify_desktop . . . $enable_notify_desktop
4287 notify_email . . . . $enable_notify_email
4288 ntpd . . . . . . . . $enable_ntpd
4289 nut . . . . . . . . . $enable_nut
4290 olsrd . . . . . . . . $enable_olsrd
4291 onewire . . . . . . . $enable_onewire
4292 openvpn . . . . . . . $enable_openvpn
4293 oracle . . . . . . . $enable_oracle
4294 perl . . . . . . . . $enable_perl
4295 ping . . . . . . . . $enable_ping
4296 postgresql . . . . . $enable_postgresql
4297 powerdns . . . . . . $enable_powerdns
4298 processes . . . . . . $enable_processes
4299 protocols . . . . . . $enable_protocols
4300 python . . . . . . . $enable_python
4301 rrdcached . . . . . . $enable_rrdcached
4302 rrdtool . . . . . . . $enable_rrdtool
4303 sensors . . . . . . . $enable_sensors
4304 serial . . . . . . . $enable_serial
4305 snmp . . . . . . . . $enable_snmp
4306 swap . . . . . . . . $enable_swap
4307 syslog . . . . . . . $enable_syslog
4308 table . . . . . . . . $enable_table
4309 tail . . . . . . . . $enable_tail
4310 tape . . . . . . . . $enable_tape
4311 target_notification . $enable_target_notification
4312 target_replace . . . $enable_target_replace
4313 target_scale . . . . $enable_target_scale
4314 target_set . . . . . $enable_target_set
4315 tcpconns . . . . . . $enable_tcpconns
4316 teamspeak2 . . . . . $enable_teamspeak2
4317 ted . . . . . . . . . $enable_ted
4318 thermal . . . . . . . $enable_thermal
4319 tokyotyrant . . . . . $enable_tokyotyrant
4320 unixsock . . . . . . $enable_unixsock
4321 uptime . . . . . . . $enable_uptime
4322 users . . . . . . . . $enable_users
4323 uuid . . . . . . . . $enable_uuid
4324 vmem . . . . . . . . $enable_vmem
4325 vserver . . . . . . . $enable_vserver
4326 wireless . . . . . . $enable_wireless
4327 write_http . . . . . $enable_write_http
4328 xmms . . . . . . . . $enable_xmms
4329 zfs_arc . . . . . . . $enable_zfs_arc
4333 if test "x$dependency_error" = "xyes"; then
4334 AC_MSG_ERROR("Some plugins are missing dependencies - see the summary above for details")
4337 if test "x$dependency_warning" = "xyes"; then
4338 AC_MSG_WARN("Some plugins seem to have missing dependencies but have been enabled forcibly - see the summary above for details")
4341 # vim: set fdm=marker :