1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, m4_esyscmd(./version-gen.sh))
3 AC_CONFIG_SRCDIR(src/collectd.c)
4 AC_CONFIG_HEADERS(src/config.h)
5 AM_INIT_AUTOMAKE(dist-bzip2)
8 AC_PREFIX_DEFAULT("/opt/collectd")
13 # Checks for programs.
21 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
25 AC_LIBLTDL_CONVENIENCE
33 AC_CONFIG_SUBDIRS(libltdl)
35 AC_MSG_CHECKING([for kernel type ($host_os)])
38 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
42 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
51 AC_MSG_RESULT([$ac_system])
54 # Checks for header files.
60 AC_CHECK_HEADERS(stdint.h stdio.h errno.h math.h stdarg.h syslog.h fcntl.h signal.h assert.h sys/types.h sys/socket.h sys/select.h poll.h netdb.h arpa/inet.h sys/resource.h sys/param.h kstat.h regex.h sys/ioctl.h endian.h)
63 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
68 # include <sys/types.h>
71 AC_CHECK_HEADERS(netinet/in.h, [], [],
76 # include <sys/types.h>
78 #if HAVE_NETINET_IN_SYSTM_H
79 # include <netinet/in_systm.h>
82 AC_CHECK_HEADERS(netinet/ip.h, [], [],
87 # include <sys/types.h>
89 #if HAVE_NETINET_IN_SYSTM_H
90 # include <netinet/in_systm.h>
93 # include <netinet/in.h>
96 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
101 # include <sys/types.h>
103 #if HAVE_NETINET_IN_SYSTM_H
104 # include <netinet/in_systm.h>
106 #if HAVE_NETINET_IN_H
107 # include <netinet/in.h>
109 #if HAVE_NETINET_IP_H
110 # include <netinet/ip.h>
113 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
118 # include <sys/types.h>
120 #if HAVE_NETINET_IN_SYSTM_H
121 # include <netinet/in_systm.h>
123 #if HAVE_NETINET_IN_H
124 # include <netinet/in.h>
126 #if HAVE_NETINET_IP_H
127 # include <netinet/ip.h>
130 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
135 # include <sys/types.h>
137 #if HAVE_NETINET_IN_SYSTM_H
138 # include <netinet/in_systm.h>
140 #if HAVE_NETINET_IN_H
141 # include <netinet/in.h>
144 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
149 # include <sys/types.h>
151 #if HAVE_NETINET_IN_SYSTM_H
152 # include <netinet/in_systm.h>
154 #if HAVE_NETINET_IN_H
155 # include <netinet/in.h>
157 #if HAVE_NETINET_IP6_H
158 # include <netinet/ip6.h>
161 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
166 # include <sys/types.h>
168 #if HAVE_NETINET_IN_SYSTM_H
169 # include <netinet/in_systm.h>
171 #if HAVE_NETINET_IN_H
172 # include <netinet/in.h>
174 #if HAVE_NETINET_IP_H
175 # include <netinet/ip.h>
178 AC_CHECK_HEADERS(netinet/udp.h, [], [],
183 # include <sys/types.h>
185 #if HAVE_NETINET_IN_SYSTM_H
186 # include <netinet/in_systm.h>
188 #if HAVE_NETINET_IN_H
189 # include <netinet/in.h>
191 #if HAVE_NETINET_IP_H
192 # include <netinet/ip.h>
197 AC_CHECK_HEADERS(sys/dkstat.h)
198 if test "x$ac_system" = "xDarwin"
200 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)
201 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
203 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
206 # include <sys/types.h>
209 # include <sys/param.h>
214 AC_CHECK_HEADERS(linux/major.h libgen.h)
216 # For the battery plugin
217 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
219 #if HAVE_IOKIT_IOKITLIB_H
220 # include <IOKit/IOKitLib.h>
222 #if HAVE_IOKIT_IOTYPES_H
223 # include <IOKit/IOTypes.h>
227 # For the swap module
228 AC_CHECK_HEADERS(sys/swap.h, [], [],
231 # include <sys/types.h>
234 # include <sys/param.h>
239 # For the processes plugin
241 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
243 # For interface plugin
244 AC_CHECK_HEADERS(ifaddrs.h)
245 AC_CHECK_HEADERS(net/if.h, [], [],
248 # include <sys/types.h>
250 #if HAVE_SYS_SOCKET_H
251 # include <sys/socket.h>
254 AC_CHECK_HEADERS(linux/if.h, [], [],
257 # include <sys/types.h>
259 #if HAVE_SYS_SOCKET_H
260 # include <sys/socket.h>
263 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
266 # include <sys/types.h>
268 #if HAVE_SYS_SOCKET_H
269 # include <sys/socket.h>
272 # include <linux/if.h>
277 have_net_ip_vs_h="no"
279 if test "x$ac_system" = "xLinux"
281 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
282 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
286 AC_CHECK_HEADERS(sys/ucred.h, [], [],
289 # include <sys/types.h>
292 # include <sys/param.h>
296 # For mount interface
297 AC_CHECK_HEADERS(sys/mount.h, [], [],
300 # include <sys/types.h>
303 # include <sys/param.h>
307 # For the email plugin
308 AC_CHECK_HEADERS(linux/un.h, [], [],
310 #if HAVE_SYS_SOCKET_H
311 # include <sys/socket.h>
315 AC_CHECK_HEADERS(pwd.h grp.h sys/un.h ctype.h limits.h sys/quota.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)
318 AC_CHECK_HEADERS(arpa/nameser.h)
319 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
321 #if HAVE_ARPA_NAMESER_H
322 # include <arpa/nameser.h>
326 AC_CHECK_HEADERS(net/if_arp.h, [], [],
327 [#if HAVE_SYS_SOCKET_H
328 # include <sys/socket.h>
331 AC_CHECK_HEADERS(net/ppp_defs.h)
332 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
333 [#if HAVE_NET_PPP_DEFS_H
334 # include <net/ppp_defs.h>
337 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
342 # include <sys/types.h>
344 #if HAVE_SYS_SOCKET_H
345 # include <sys/socket.h>
350 #if HAVE_NETINET_IN_H
351 # include <netinet/in.h>
355 # For the multimeter plugin
357 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
360 # Checks for typedefs, structures, and compiler characteristics.
369 # Checks for library functions.
371 AC_PROG_GCC_TRADITIONAL
372 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog)
376 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
378 socket_needs_socket="no"
379 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
380 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
382 nanosleep_needs_rt="no"
383 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
384 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
386 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
387 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
388 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
389 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
390 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
391 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
392 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
393 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
394 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
395 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
398 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
401 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
403 if test "x$withval" = "xno"; then
405 else if test "x$withval" = "xyes"; then
412 if test "x$nan_type" = "xnone"; then
413 AC_CACHE_CHECK([whether NAN is defined by default],
420 static float foo = NAN;
428 [have_nan_default="yes"],
429 [have_nan_default="no"]
432 if test "x$have_nan_default" = "xyes"
437 if test "x$nan_type" = "xnone"; then
438 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
444 #define __USE_ISOC99 1
446 static float foo = NAN;
454 [have_nan_isoc="yes"],
458 if test "x$have_nan_isoc" = "xyes"
463 if test "x$nan_type" = "xnone"; then
464 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
474 #define NAN (0.0 / 0.0)
476 # define isnan(f) ((f) != (f))
478 static float foo = NAN;
486 [have_nan_zero="yes"],
490 if test "x$have_nan_zero" = "xyes"
496 if test "x$nan_type" = "xdefault"; then
497 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
498 [Define if NAN is defined by default and can initialize static variables.])
499 else if test "x$nan_type" = "xisoc99"; then
500 AC_DEFINE(NAN_STATIC_ISOC, 1,
501 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
502 else if test "x$nan_type" = "xzero"; then
503 AC_DEFINE(NAN_ZERO_ZERO, 1,
504 [Define if NAN can be defined as (0.0 / 0.0)])
506 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
509 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
511 if test "x$withval" = "xnothing"; then
512 fp_layout_type="nothing"
513 else if test "x$withval" = "xendianflip"; then
514 fp_layout_type="endianflip"
515 else if test "x$withval" = "xintswap"; then
516 fp_layout_type="intswap"
518 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
521 [fp_layout_type="unknown"])
523 if test "x$fp_layout_type" = "xunknown"; then
524 AC_CACHE_CHECK([if doubles are stored in x86 representation],
525 [fp_layout_need_nothing],
541 memcpy ((void *) &i0, (void *) &d, 8);
544 memcpy ((void *) c, (void *) &i1, 8);
546 if ((c[0] == 0x2f) && (c[1] == 0x25)
547 && (c[2] == 0xc0) && (c[3] == 0xc7)
548 && (c[4] == 0x43) && (c[5] == 0x2b)
549 && (c[6] == 0x1f) && (c[7] == 0x5b))
554 [fp_layout_need_nothing="yes"],
555 [fp_layout_need_nothing="no"]
558 if test "x$fp_layout_need_nothing" = "xyes"; then
559 fp_layout_type="nothing"
562 if test "x$fp_layout_type" = "xunknown"; then
563 AC_CACHE_CHECK([if endianflip converts to x86 representation],
564 [fp_layout_need_endianflip],
572 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
573 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
574 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
575 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
576 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
577 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
578 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
579 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
588 memcpy ((void *) &i0, (void *) &d, 8);
590 i1 = endianflip (i0);
591 memcpy ((void *) c, (void *) &i1, 8);
593 if ((c[0] == 0x2f) && (c[1] == 0x25)
594 && (c[2] == 0xc0) && (c[3] == 0xc7)
595 && (c[4] == 0x43) && (c[5] == 0x2b)
596 && (c[6] == 0x1f) && (c[7] == 0x5b))
601 [fp_layout_need_endianflip="yes"],
602 [fp_layout_need_endianflip="no"]
605 if test "x$fp_layout_need_endianflip" = "xyes"; then
606 fp_layout_type="endianflip"
609 if test "x$fp_layout_type" = "xunknown"; then
610 AC_CACHE_CHECK([if intswap converts to x86 representation],
611 [fp_layout_need_intswap],
619 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
620 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
629 memcpy ((void *) &i0, (void *) &d, 8);
632 memcpy ((void *) c, (void *) &i1, 8);
634 if ((c[0] == 0x2f) && (c[1] == 0x25)
635 && (c[2] == 0xc0) && (c[3] == 0xc7)
636 && (c[4] == 0x43) && (c[5] == 0x2b)
637 && (c[6] == 0x1f) && (c[7] == 0x5b))
642 [fp_layout_need_intswap="yes"],
643 [fp_layout_need_intswap="no"]
646 if test "x$fp_layout_need_intswap" = "xyes"; then
647 fp_layout_type="intswap"
651 if test "x$fp_layout_type" = "xnothing"; then
652 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
653 [Define if doubles are stored in x86 representation.])
654 else if test "x$fp_layout_type" = "xendianflip"; then
655 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
656 [Define if endianflip is needed to convert to x86 representation.])
657 else if test "x$fp_layout_type" = "xintswap"; then
658 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
659 [Define if intswap is needed to convert to x86 representation.])
661 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
665 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
667 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
669 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
672 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
673 if test "x$have_getmntent" = "xno"; then
674 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
676 if test "x$have_getmntent" = "xno"; then
677 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
679 if test "x$have_getmntent" = "xno"; then
680 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
683 if test "x$have_getmntent" = "xc"; then
684 AC_CACHE_CHECK([whether getmntent takes one argument],
685 [have_one_getmntent],
687 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
689 #include "$srcdir/src/utils_mount.h"]],
693 fh = setmntent ("/etc/mtab", "r");
697 [have_one_getmntent="yes"],
698 [have_one_getmntent="no"]
701 AC_CACHE_CHECK([whether getmntent takes two arguments],
702 [have_two_getmntent],
704 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
705 #include <sys/mnttab.h>
706 #include "$srcdir/src/utils_mount.h"]],
711 fh = fopen ("/etc/mnttab", "r");
712 status = getmntent (fh, &mt);
715 [have_two_getmntent="yes"],
716 [have_two_getmntent="no"]
721 # Check for different versions of `getmntent' here..
723 if test "x$have_getmntent" = "xc"; then
724 if test "x$have_one_getmntent" = "xyes"; then
725 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
726 [Define if the function getmntent exists and takes one argument.])
728 if test "x$have_two_getmntent" = "xyes"; then
729 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
730 [Define if the function getmntent exists and takes two arguments.])
733 if test "x$have_getmntent" = "xsun"; then
734 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
735 [Define if the function getmntent exists. It's the version from libsun.])
737 if test "x$have_getmntent" = "xseq"; then
738 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
739 [Define if the function getmntent exists. It's the version from libseq.])
741 if test "x$have_getmntent" = "xgen"; then
742 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
743 [Define if the function getmntent exists. It's the version from libgen.])
746 # Check for structures
747 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
748 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
751 #include <sys/types.h>
752 #include <sys/socket.h>
755 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
756 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
759 #include <sys/types.h>
760 #include <sys/socket.h>
761 #include <linux/if.h>
762 #include <linux/netdevice.h>
765 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
770 # include <sys/types.h>
772 #if HAVE_NETINET_IN_SYSTM_H
773 # include <netinet/in_systm.h>
775 #if HAVE_NETINET_IN_H
776 # include <netinet/in.h>
778 #if HAVE_NETINET_IP_H
779 # include <netinet/ip.h>
781 #if HAVE_NETINET_UDP_H
782 # include <netinet/udp.h>
785 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
790 # include <sys/types.h>
792 #if HAVE_NETINET_IN_SYSTM_H
793 # include <netinet/in_systm.h>
795 #if HAVE_NETINET_IN_H
796 # include <netinet/in.h>
798 #if HAVE_NETINET_IP_H
799 # include <netinet/ip.h>
801 #if HAVE_NETINET_UDP_H
802 # include <netinet/udp.h>
806 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
816 AC_CHECK_LIB(resolv, res_search,
818 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
820 [with_libresolv="no"])
821 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
823 dnl Check for HAL (hardware abstraction library)
825 AC_CHECK_LIB(hal,libhal_device_property_exists,
826 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
828 if test "x$with_libhal" = "xyes"; then
830 if test "x$PKG_CONFIG" != "x"; then
831 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
832 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
833 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
834 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
838 m4_divert_once([HELP_WITH], [
839 collectd additional packages:])
841 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
844 librrd_threadsafe="yes"
845 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
846 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
848 librrd_cflags="-I$withval/include"
849 librrd_ldflags="-L$withval/lib"
852 with_rrdtool="$withval"
854 ], [with_rrdtool="yes"])
855 if test "x$with_rrdtool" = "xyes"
857 SAVE_CPPFLAGS="$CPPFLAGS"
858 SAVE_LDFLAGS="$LDFLAGS"
860 CPPFLAGS="$CPPFLAGS $librrd_cflags"
861 LDFLAGS="$LDFLAGS $librrd_ldflags"
863 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
865 CPPFLAGS="$SAVE_CPPFLAGS"
866 LDFLAGS="$SAVE_LDFLAGS"
868 if test "x$with_rrdtool" = "xyes"
870 SAVE_CPPFLAGS="$CPPFLAGS"
871 SAVE_LDFLAGS="$LDFLAGS"
873 CPPFLAGS="$CPPFLAGS $librrd_cflags"
874 LDFLAGS="$LDFLAGS $librrd_ldflags"
876 AC_CHECK_LIB(rrd_th, rrd_update_r,
878 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
880 [librrd_threadsafe="no"
881 AC_CHECK_LIB(rrd, rrd_update,
883 librrd_ldflags="$librrd_ldflags -lrrd -lm"
885 [with_rrdtool="no (symbol 'rrd_update' not found)"],
890 CPPFLAGS="$SAVE_CPPFLAGS"
891 LDFLAGS="$SAVE_LDFLAGS"
893 if test "x$with_rrdtool" = "xyes"
895 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
896 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
897 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
898 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
900 if test "x$librrd_threadsafe" = "xyes"
902 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
905 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
906 [ if test "x$withval" != "xno" -a "x$withval" != "xyes"
908 LDFLAGS="$LDFLAGS -L$withval/lib"
909 CPPFLAGS="$CPPFLAGS -I$withval/include"
910 with_libpthread="yes"
912 if test "x$withval" = "xno"
914 with_libpthread="no (disabled)"
917 ], [with_libpthread="yes"])
918 if test "x$with_libpthread" = "xyes"
920 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
922 if test "x$with_libpthread" = "xyes"
924 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
926 if test "x$with_libpthread" = "xyes"
932 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
933 [Wether or not to use pthread (POSIX threads) library])
934 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
936 if test "x$ac_system" = "xSolaris"
941 with_kstat="no (Solaris only)"
942 with_devinfo="no (Solaris only)"
945 if test "x$with_kstat" = "xyes"
947 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
949 if test "x$with_kstat" = "xyes"
951 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
952 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
954 if test "x$with_kstat" = "xyes"
956 AC_DEFINE(HAVE_LIBKSTAT, 1,
957 [Define to 1 if you have the 'kstat' library (-lkstat)])
959 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
960 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
962 ### BEGIN of check for libcurl ###
963 with_curl_config="curl-config"
966 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
968 if test "x$withval" = "xno"
971 else if test "x$withval" = "xyes"
975 if test -f "$withval" && test -x "$withval"
977 with_curl_config="$withval"
979 else if test -x "$withval/bin/curl-config"
981 with_curl_config="$withval/bin/curl-config"
990 if test "x$with_libcurl" = "xyes"
992 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
993 curl_config_status=$?
995 if test $curl_config_status -ne 0
997 with_libcurl="no ($with_curl_config failed)"
999 SAVE_CPPFLAGS="$CPPFLAGS"
1000 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1002 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1004 CPPFLAGS="$SAVE_CPPFLAGS"
1007 if test "x$with_libcurl" = "xyes"
1009 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1010 curl_config_status=$?
1012 if test $curl_config_status -ne 0
1014 with_libcurl="no ($with_curl_config failed)"
1016 AC_CHECK_LIB(curl, curl_easy_init,
1017 [with_libcurl="yes"],
1018 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1022 if test "x$with_libcurl" = "xyes"
1024 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1025 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1026 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1027 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1029 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1030 ### END of check for libcurl ###
1034 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1043 AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
1044 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1046 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
1048 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1050 LDFLAGS="$LDFLAGS -L$withval/lib"
1051 CPPFLAGS="$CPPFLAGS -I$withval/include"
1052 with_libstatgrab="yes"
1054 with_libstatgrab="$withval"
1058 if test "x$ac_system" == "xunknown"
1060 with_libstatgrab="yes"
1062 with_libstatgrab="no"
1065 if test "x$with_libstatgrab" = "xyes"
1067 AC_CHECK_LIB(statgrab, sg_init, [with_libstatgrab="yes"], [with_libstatgrab="no (libstatgrab not found)"])
1069 if test "x$with_libstatgrab" = "xyes"
1071 AC_CHECK_HEADERS(statgrab.h,, [with_libstatgrab="no (statgrab.h not found)"])
1073 if test "x$with_libstatgrab" = "xyes"
1075 AC_CHECK_LIB(devstat, getdevs, [with_libdevstat="yes"], [with_libdevstat="no"])
1077 if test "x$with_libstatgrab" = "xyes"
1079 collect_libstatgrab=1
1081 collect_libstatgrab=0
1083 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
1084 [Wether or not to use statgrab library])
1085 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
1086 AM_CONDITIONAL(BUILD_WITH_LIBDEVSTAT, test "x$with_libdevstat" = "xyes")
1088 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
1089 if test "x$with_libkvm" = "xyes"
1091 AC_DEFINE(HAVE_LIBKVM, 1, [Define to 1 if you have the 'kvm' library (-lkvm)])
1093 AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes")
1095 with_sensors_cflags=""
1096 with_sensors_ldflags=""
1097 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
1099 if test "x$withval" = "xno"
1101 with_lm_sensors="no"
1103 with_lm_sensors="yes"
1104 if test "x$withval" != "xyes"
1106 with_sensors_cflags="-I$withval/include"
1107 with_sensors_ldflags="-L$withval/lib"
1108 with_lm_sensors="yes"
1113 if test "x$ac_system" = "xLinux"
1115 with_lm_sensors="yes"
1117 with_lm_sensors="no (Linux only library)"
1120 if test "x$with_lm_sensors" = "xyes"
1122 SAVE_CPPFLAGS="$CPPFLAGS"
1123 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1125 # AC_CHECK_HEADERS(sensors/sensors.h,
1127 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
1129 # [with_lm_sensors="no (sensors/sensors.h not found)"])
1130 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_lm_sensors="no (sensors/sensors.h not found)"])
1132 CPPFLAGS="$SAVE_CPPFLAGS"
1134 if test "x$with_lm_sensors" = "xyes"
1136 SAVE_CPPFLAGS="$CPPFLAGS"
1137 SAVE_LDFLAGS="$LDFLAGS"
1138 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1139 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
1141 AC_CHECK_LIB(sensors, sensors_init,
1143 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
1145 [with_lm_sensors="no (libsensors not found)"])
1147 CPPFLAGS="$SAVE_CPPFLAGS"
1148 LDFLAGS="$SAVE_LDFLAGS"
1150 if test "x$with_lm_sensors" = "xyes"
1152 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
1153 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
1154 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
1155 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
1157 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
1159 with_mysql_config="mysql_config"
1160 with_mysql_cflags=""
1162 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1164 if test "x$withval" = "xno"
1167 else if test "x$withval" = "xyes"
1171 if test -f "$withval" && test -x "$withval";
1173 with_mysql_config="$withval"
1174 else if test -x "$withval/bin/mysql_config"
1176 with_mysql_config="$withval/bin/mysql_config"
1184 if test "x$with_libmysql" = "xyes"
1186 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1187 mysql_config_status=$?
1189 if test $mysql_config_status -ne 0
1193 SAVE_CPPFLAGS="$CPPFLAGS"
1194 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1196 AC_CHECK_HEADERS(mysql/mysql.h, [], [with_libmysql="no (mysql/mysql.h not found)"], [])
1198 CPPFLAGS="$SAVE_CPPFLAGS"
1201 if test "x$with_libmysql" = "xyes"
1203 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1204 mysql_config_status=$?
1206 if test $mysql_config_status -ne 0
1210 AC_CHECK_LIB(mysqlclient, mysql_init,
1211 [with_libmysql="yes"],
1212 [with_libmysql="no (symbol 'mysql_init' not found)"],
1216 if test "x$with_libmysql" = "xyes"
1218 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1219 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1220 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1221 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1223 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1225 with_own_liboconfig="no"
1226 liboconfig_LDFLAGS="$LDFLAGS"
1227 liboconfig_CPPFLAGS="$CPPFLAGS"
1228 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1230 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1232 if test -d "$withval/lib"
1234 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1236 if test -d "$withval/include"
1238 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1241 if test "x$withval" = "xno"
1243 AC_MSG_ERROR("liboconfig is required")
1247 with_liboconfig="yes"
1250 save_LDFLAGS="$LDFLAGS"
1251 save_CPPFLAGS="$CPPFLAGS"
1252 LDFLAGS="$liboconfig_LDFLAGS"
1253 CPPFLAGS="$liboconfig_CPPFLAGS"
1254 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1256 with_liboconfig="yes"
1257 with_own_liboconfig="no"
1260 with_liboconfig="yes"
1261 with_own_liboconfig="yes"
1262 LDFLAGS="$save_LDFLAGS"
1263 CPPFLAGS="$save_CPPFLAGS"
1266 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1267 if test "x$with_own_liboconfig" = "xyes"
1269 with_liboconfig="yes (shipped version)"
1272 #with_liboping="yes"
1273 with_own_liboping="no"
1274 liboping_LDFLAGS="$LDFLAGS"
1275 liboping_CPPFLAGS="$CPPFLAGS"
1276 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1278 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1280 if test -d "$withval/lib"
1282 liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
1284 if test -d "$withval/include"
1286 liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
1289 if test "x$withval" = "xno"
1292 with_own_liboping="no"
1293 else if test "x$withval" = "xyes"
1302 if test "x$with_liboping" = "xyes"
1304 save_LDFLAGS="$LDFLAGS"
1305 save_CPPFLAGS="$CPPFLAGS"
1306 LDFLAGS="$liboping_LDFLAGS"
1307 CPPFLAGS="$liboping_CPPFLAGS"
1308 AC_CHECK_LIB(oping, ping_construct,
1311 with_own_liboping="no"
1315 with_own_liboping="yes"
1316 LDFLAGS="$save_LDFLAGS"
1317 CPPFLAGS="$save_CPPFLAGS"
1320 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1321 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
1323 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
1325 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1327 LDFLAGS="$LDFLAGS -L$withval/lib"
1328 CPPFLAGS="$CPPFLAGS -I$withval/include"
1331 with_libpcap="$withval"
1337 if test "x$with_libpcap" = "xyes"
1339 AC_CHECK_LIB(pcap, pcap_open_live,
1341 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
1342 ], [with_libpcap="no (libpcap not found)"])
1344 if test "x$with_libpcap" = "xyes"
1346 AC_CHECK_HEADERS(pcap.h,
1348 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
1349 ], [with_libpcap="no (pcap.h not found)"])
1351 if test "x$with_libpcap" = "xyes"
1357 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
1358 [Wether or not to use the pcap library])
1359 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
1361 perl_interpreter="perl"
1362 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
1364 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1366 LDFLAGS="$LDFLAGS -L$withval/lib"
1367 CPPFLAGS="$CPPFLAGS -I$withval/include"
1368 perl_interpreter="$withval/bin/perl"
1371 with_libperl="$withval"
1378 AC_SUBST(PERL, "$perl_interpreter")
1380 if test "x$with_libperl" = "xyes"
1383 SAVE_LDFLAGS=$LDFLAGS
1384 PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts`
1385 PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts`
1386 CFLAGS="$CFLAGS $PERL_CFLAGS"
1387 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1389 AC_CACHE_CHECK([for libperl],
1399 PerlInterpreter *perl = NULL;
1400 Perl_load_module (perl, PERL_LOADMOD_NOIMPORT,
1401 newSVpv ("Collectd::Plugin::FooBar", 24),
1404 [have_libperl="yes"],
1409 if test "x$have_libperl" = "xyes"
1411 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
1412 AC_SUBST(PERL_CFLAGS)
1413 AC_SUBST(PERL_LDFLAGS)
1419 LDFLAGS=$SAVE_LDFLAGS
1421 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1423 if test "x$with_libperl" = "xyes"
1426 SAVE_LDFLAGS=$LDFLAGS
1427 CFLAGS="$CFLAGS $PERL_CFLAGS"
1428 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1430 AC_CACHE_CHECK([if perl supports ithreads],
1431 [have_perl_ithreads],
1439 #if !defined(USE_ITHREADS)
1440 # error "Perl does not support ithreads!"
1441 #endif /* !defined(USE_ITHREADS) */
1444 [have_perl_ithreads="yes"],
1445 [have_perl_ithreads="no"]
1449 if test "x$have_perl_ithreads" = "xyes"
1451 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
1455 LDFLAGS=$SAVE_LDFLAGS
1458 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1460 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1462 LDFLAGS="$LDFLAGS -L$withval/lib"
1463 CPPFLAGS="$CPPFLAGS -I$withval/include"
1466 with_libiptc="$withval"
1470 if test "x$ac_system" = "xLinux"
1474 with_libiptc="no (Linux only)"
1477 if test "x$with_libiptc" = "xyes"
1479 AC_CHECK_LIB(iptc, iptc_init,
1481 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1482 ], [with_libiptc="no (libiptc not found)"])
1484 if test "x$with_libiptc" = "xyes"
1486 AC_CHECK_HEADERS(libiptc/libiptc.h,
1488 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1489 ], [with_libiptc="no (libiptc/libiptc.h not found)"])
1491 if test "x$with_libiptc" = "xyes"
1497 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1499 with_snmp_config="net-snmp-config"
1502 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1504 if test "x$withval" = "xno"
1506 with_libnetsnmp="no"
1507 else if test "x$withval" = "xyes"
1509 with_libnetsnmp="yes"
1511 if test -x "$withval"
1513 with_snmp_config="$withval"
1514 with_libnetsnmp="yes"
1516 with_snmp_config="$withval/bin/net-snmp-config"
1517 with_libnetsnmp="yes"
1521 [with_libnetsnmp="yes"])
1522 if test "x$with_libnetsnmp" = "xyes"
1524 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
1525 snmp_config_status=$?
1527 if test $snmp_config_status -ne 0
1529 with_libnetsnmp="no ($with_snmp_config failed)"
1531 SAVE_CPPFLAGS="$CPPFLAGS"
1532 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
1534 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1536 CPPFLAGS="$SAVE_CPPFLAGS"
1539 if test "x$with_libnetsnmp" = "xyes"
1541 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
1542 snmp_config_status=$?
1544 if test $snmp_config_status -ne 0
1546 with_libnetsnmp="no ($with_snmp_config failed)"
1548 AC_CHECK_LIB(netsnmp, init_snmp,
1549 [with_libnetsnmp="yes"],
1550 [with_libnetsnmp="no (libnetsnmp not found)"],
1554 if test "x$with_libnetsnmp" = "xyes"
1556 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
1557 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
1558 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
1559 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
1561 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1563 with_upsclient_config="libupsclient-config"
1564 with_upsclient_cflags=""
1565 with_upsclient_libs=""
1566 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])],
1568 if test "x$withval" = "xno"
1570 with_libupsclient="no"
1572 if test "x$withval" != "xyes"
1574 if test -f "$withval" && test -x "$withval";
1576 with_upsclient_config="$withval"
1578 with_upsclient_config="$withval/bin/libupsclient-config"
1581 with_libupsclient="yes"
1585 with_libupsclient="yes"
1587 if test "x$with_libupsclient" = "xyes"
1589 with_upsclient_cflags=`$with_upsclient_config --cflags 2>/dev/null`
1590 upsclient_config_status=$?
1592 if test $upsclient_config_status -ne 0
1594 with_libupsclient="no ($with_upsclient_config failed)"
1597 if test "x$with_libupsclient" = "xyes"
1599 SAVE_CPPFLAGS="$CPPFLAGS"
1600 CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
1602 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
1604 CPPFLAGS="$SAVE_CPPFLAGS"
1606 if test "x$with_libupsclient" = "xyes"
1608 with_upsclient_libs=`$with_upsclient_config --libs 2>/dev/null`
1609 upsclient_config_status=$?
1611 if test $upsclient_config_status -ne 0
1613 with_libupsclient="no ($with_upsclient_config failed)"
1616 if test "x$with_libupsclient" = "xyes"
1618 AC_CHECK_LIB(upsclient, upscli_connect,
1620 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_upsclient_cflags"
1621 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_upsclient_libs"
1622 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1623 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
1626 with_libupsclient="no (symbol 'upscli_connect' not found)"
1627 ], [$with_upsclient_libs])
1629 if test "x$with_libupsclient" = "xyes"
1631 SAVE_CPPFLAGS="$CPPFLAGS"
1632 CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
1634 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
1635 [#include <stdlib.h>
1637 #include <upsclient.h>])
1639 CPPFLAGS="$SAVE_CPPFLAGS"
1641 AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
1643 ### BEGIN of check for libxmms ###
1644 with_xmms_config="xmms-config"
1647 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
1649 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1651 if test -f "$withval" && test -x "$withval";
1653 with_xmms_config="$withval"
1654 else if test -x "$withval/bin/xmms-config"
1656 with_xmms_config="$withval/bin/xmms-config"
1659 else if test "x$withval" = "xno"
1669 if test "x$with_libxmms" = "xyes"
1671 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
1672 xmms_config_status=$?
1674 if test $xmms_config_status -ne 0
1679 if test "x$with_libxmms" = "xyes"
1681 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
1682 xmms_config_status=$?
1684 if test $xmms_config_status -ne 0
1689 if test "x$with_libxmms" = "xyes"
1691 AC_CHECK_LIB(xmms, xmms_remote_get_info,
1693 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
1694 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
1695 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
1696 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
1703 with_libxmms_numeric=0
1704 if test "x$with_libxmms" = "xyes"
1706 with_libxmms_numeric=1
1708 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
1709 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
1710 ### END of check for libxmms ###
1712 with_libnetlink_cflags=""
1713 with_libnetlink_libs="-lnetlink"
1714 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1716 echo "libnetlink: withval = $withval"
1717 if test "x$withval" = "xyes"
1719 with_libnetlink="yes"
1720 else if test "x$withval" = "xno"
1722 with_libnetlink="no"
1724 if test -d "$withval/include"
1726 with_libnetlink_cflags="-I$withval/include"
1727 with_libnetlink_libs="-L$withval/lib -lnetlink"
1728 with_libnetlink="yes"
1730 AC_MSG_ERROR("no such directory: $withval/include")
1735 if test "x$ac_system" = "xLinux"
1737 with_libnetlink="yes"
1739 with_libnetlink="no (Linux only library)"
1742 if test "x$with_libnetlink" = "xyes"
1745 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1747 with_libnetlink="no (libnetlink.h not found)"
1749 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1751 with_libnetlink="yes"
1755 #include <sys/types.h>
1756 #include <asm/types.h>
1757 #include <sys/socket.h>
1758 #include <linux/netlink.h>
1759 #include <linux/rtnetlink.h>])
1760 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1762 #include <sys/types.h>
1763 #include <asm/types.h>
1764 #include <sys/socket.h>])
1768 #include <sys/types.h>
1769 #include <asm/types.h>
1770 #include <sys/socket.h>
1771 #include <linux/netlink.h>
1772 #include <linux/rtnetlink.h>
1776 int retval = TCA_STATS2;
1779 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1784 #include <sys/types.h>
1785 #include <asm/types.h>
1786 #include <sys/socket.h>
1787 #include <linux/netlink.h>
1788 #include <linux/rtnetlink.h>
1792 int retval = TCA_STATS;
1795 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1798 CFLAGS="$SAVE_CFLAGS"
1800 if test "x$with_libnetlink" = "xyes"
1802 AC_CHECK_LIB(netlink, rtnl_open,
1803 [with_libnetlink="yes"],
1804 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1805 [$with_libnetlink_libs])
1807 if test "x$with_libnetlink" = "xyes"
1809 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1810 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1811 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1812 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1814 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1816 with_libopenipmipthread="yes"
1817 with_libopenipmipthread_cflags=""
1818 with_libopenipmipthread_libs=""
1820 AC_MSG_CHECKING([for pkg-config])
1822 if test "x$PKG_CONFIG" = "x"
1824 with_libopenipmipthread="no"
1827 temp_result="$PKG_CONFIG"
1829 AC_MSG_RESULT([$temp_result])
1831 if test "x$with_libopenipmipthread" = "xyes"
1833 AC_MSG_CHECKING([for libOpenIPMIpthread])
1834 $PKG_CONFIG --exists OpenIPMIpthread 2>/dev/null
1837 with_libopenipmipthread="no ($PKG_CONFIG doesn't know OpenIPMIpthread)"
1839 AC_MSG_RESULT([$with_libopenipmipthread])
1842 if test "x$with_libopenipmipthread" = "xyes"
1844 AC_MSG_CHECKING([for libOpenIPMIpthread CFLAGS])
1845 temp_result="`$PKG_CONFIG --cflags OpenIPMIpthread`"
1848 with_libopenipmipthread_cflags="$temp_result"
1850 with_libopenipmipthread="no ($PKG_CONFIG --cflags OpenIPMIpthread failed)"
1851 temp_result="$PKG_CONFIG --cflags OpenIPMIpthread failed"
1853 AC_MSG_RESULT([$temp_result])
1856 if test "x$with_libopenipmipthread" = "xyes"
1858 AC_MSG_CHECKING([for libOpenIPMIpthread LDFLAGS])
1859 temp_result="`$PKG_CONFIG --libs OpenIPMIpthread`"
1862 with_libopenipmipthread_ldflags="$temp_result"
1864 with_libopenipmipthread="no ($PKG_CONFIG --libs OpenIPMIpthread failed)"
1865 temp_result="$PKG_CONFIG --libs OpenIPMIpthread failed"
1867 AC_MSG_RESULT([$temp_result])
1870 if test "x$with_libopenipmipthread" = "xyes"
1872 SAVE_CPPFLAGS="$CPPFLAGS"
1873 CPPFLAGS="$CPPFLAGS $with_libopenipmipthread_cflags"
1875 AC_CHECK_HEADERS(OpenIPMI/ipmi_smi.h,
1876 [with_libopenipmipthread="yes"],
1877 [with_libopenipmipthread="no (OpenIPMI/ipmi_smi.h not found)"],
1878 [#include <OpenIPMI/ipmiif.h>
1879 #include <OpenIPMI/ipmi_err.h>
1880 #include <OpenIPMI/ipmi_posix.h>
1881 #include <OpenIPMI/ipmi_conn.h>
1884 CPPFLAGS="$SAVE_CPPFLAGS"
1887 if test "x$with_libopenipmipthread" = "xyes"
1889 BUILD_WITH_OPENIPMI_CFLAGS="$with_libopenipmipthread_cflags"
1890 BUILD_WITH_OPENIPMI_LIBS="$with_libopenipmipthread_ldflags"
1891 AC_SUBST(BUILD_WITH_OPENIPMI_CFLAGS)
1892 AC_SUBST(BUILD_WITH_OPENIPMI_LIBS)
1895 dnl Check for libvirt and libxml2 libraries.
1896 with_libxml2="no (pkg-config isn't available)"
1897 with_libxml2_cflags=""
1898 with_libxml2_ldflags=""
1899 with_libvirt="no (pkg-config isn't available)"
1900 with_libvirt_cflags=""
1901 with_libvirt_ldflags=""
1902 if test "x$PKG_CONFIG" != "x"
1904 pkg-config --exists 'libxml-2.0' 2>/dev/null
1909 with_libxml2="no (pkg-config doesn't know library)"
1912 pkg-config --exists libvirt 2>/dev/null
1917 with_libvirt="no (pkg-config doesn't know library)"
1920 if test "x$with_libxml2" = "xyes"
1922 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
1927 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
1933 if test "x$with_libxml2" = "xyes"
1935 SAVE_CPPFLAGS="$CPPFLAGS"
1936 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
1938 AC_CHECK_HEADERS(libxml/parser.h, [],
1939 [with_libxml2="no (libxml/parser.h not found)"])
1941 CPPFLAGS="$SAVE_CPPFLAGS"
1943 if test "x$with_libxml2" = "xyes"
1945 SAVE_CFLAGS="$CFLAGS"
1946 SAVE_LD_FLAGS="$LDFLAGS"
1948 CFLAGS="$CFLAGS $with_libxml2_cflags"
1949 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
1951 AC_CHECK_LIB(xml2, xmlXPathEval,
1952 [with_libxml2="yes"],
1953 [with_libxml2="no (symbol xmlXPathEval not found)"])
1955 CFLAGS="$SAVE_CFLAGS"
1956 LDFLAGS="$SAVE_LDFLAGS"
1958 dnl Add the right compiler flags and libraries.
1959 if test "x$with_libxml2" = "xyes"; then
1960 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
1961 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
1962 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
1963 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
1965 if test "x$with_libvirt" = "xyes"
1967 with_libvirt_cflags="`pkg-config --cflags libvirt`"
1972 with_libvirt_ldflags="`pkg-config --libs libvirt`"
1978 if test "x$with_libvirt" = "xyes"
1980 SAVE_CPPFLAGS="$CPPFLAGS"
1981 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
1983 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
1984 [with_libvirt="no (libvirt/libvirt.h not found)"])
1986 CPPFLAGS="$SAVE_CPPFLAGS"
1988 if test "x$with_libvirt" = "xyes"
1990 SAVE_CFLAGS="$CFLAGS"
1991 SAVE_LD_FLAGS="$LDFLAGS"
1993 CFLAGS="$CFLAGS $with_libvirt_cflags"
1994 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
1996 AC_CHECK_LIB(virt, virDomainBlockStats,
1997 [with_libvirt="yes"],
1998 [with_libvirt="no (symbol virDomainBlockStats not found)"])
2000 CFLAGS="$SAVE_CFLAGS"
2001 LDFLAGS="$SAVE_LDFLAGS"
2003 dnl Add the right compiler flags and libraries.
2004 if test "x$with_libvirt" = "xyes"; then
2005 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
2006 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
2007 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
2008 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
2011 dnl End of check for libvirt and libxml2 libraries.
2013 # Check for enabled/disabled features
2016 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
2017 # ------------------------------------------------------------
2019 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
2024 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
2029 m4_define([EnDis],[disabled])dnl
2030 m4_define([YesNo],[no])dnl
2036 m4_define([EnDis],[enabled])dnl
2037 m4_define([YesNo],[yes])dnl
2040 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
2044 m4_if([$3], [feature], [],
2048 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
2054 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
2056 enable_$1='[YesNo]'dnl
2058 if test "x$enable_$1" = "xno"
2062 if test "x$enable_$1" = "xyes"
2066 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
2071 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
2072 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
2074 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
2076 # AC_PLUGIN(name, default, info)
2077 # ------------------------------------------------------------
2083 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
2085 if test "x$enableval" = "xyes"
2093 if test "x$2" = "xyes"
2100 if test "x$enable_plugin" = "xyes"
2102 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
2104 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
2105 enable_$1="$enable_plugin"
2107 )# AC_PLUGIN(name, default, info)
2109 m4_divert_once([HELP_ENABLE], [
2110 collectd features:])
2111 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
2112 AC_COLLECTD([debug], [enable], [feature], [debugging])
2113 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
2114 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
2122 plugin_interface="no"
2129 plugin_multimeter="no"
2132 plugin_processes="no"
2136 plugin_tcpconns="no"
2140 plugin_wireless="no"
2143 if test "x$ac_system" = "xLinux"
2145 plugin_battery="yes"
2147 plugin_cpufreq="yes"
2149 plugin_entropy="yes"
2150 plugin_interface="yes"
2155 plugin_processes="yes"
2158 plugin_tcpconns="yes"
2160 plugin_vserver="yes"
2161 plugin_wireless="yes"
2163 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
2170 if test "x$with_libiokit" = "xyes"
2172 plugin_battery="yes"
2177 if test "x$with_devinfo$with_kstat" = "xyesyes"
2181 plugin_interface="yes"
2188 if test "x$with_libstatgrab" = "xyes"
2190 plugin_interface="yes"
2196 if test "x$with_libopenipmipthread" = "xyes"
2201 if test "x$have_processor_info" = "xyes"
2205 if test "x$have_sysctlbyname" = "xyes"
2209 plugin_tcpconns="yes"
2212 if test "x$have_statfs" = "xyes"
2216 if test "x$have_statvfs" = "xyes"
2221 if test "x$have_getifaddrs" = "xyes"
2223 plugin_interface="yes"
2226 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
2228 plugin_libvirt="yes"
2231 if test "x$have_getloadavg" = "xyes"
2236 if test "x$have_libperl$have_perl_ithreads" = "xyesyes"
2241 # Mac OS X memory interface
2242 if test "x$have_host_statistics" = "xyes"
2247 if test "x$have_termios_h" = "xyes"
2249 plugin_multimeter="yes"
2252 if test "x$have_thread_info" = "xyes"
2254 plugin_processes="yes"
2257 if test "x$with_libkvm" = "xyes"
2262 if test "x$have_getutent" = "xyes"
2266 if test "x$have_getutxent" = "xyes"
2271 # FIXME: sysctl for swap plugin
2273 m4_divert_once([HELP_ENABLE], [
2276 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
2277 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
2278 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
2279 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
2280 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
2281 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
2282 AC_PLUGIN([csv], [yes], [CSV output plugin])
2283 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
2284 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
2285 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
2286 AC_PLUGIN([email], [yes], [EMail statistics])
2287 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
2288 AC_PLUGIN([exec], [yes], [Execution of external programs])
2289 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
2290 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
2291 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
2292 AC_PLUGIN([ipmi], [$plugin_ipmi], [IPMI sensor statistics])
2293 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
2294 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
2295 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
2296 AC_PLUGIN([load], [$plugin_load], [System load])
2297 AC_PLUGIN([logfile], [yes], [File logging plugin])
2298 AC_PLUGIN([mbmon], [yes], [Query mbmond])
2299 AC_PLUGIN([memcached], [yes], [memcached statistics])
2300 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
2301 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
2302 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
2303 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
2304 AC_PLUGIN([network], [yes], [Network communication plugin])
2305 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
2306 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
2307 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
2308 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
2309 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
2310 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
2311 AC_PLUGIN([powerdns], [yes], [PowerDNS statistics])
2312 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
2313 AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
2314 AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
2315 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
2316 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
2317 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
2318 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
2319 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
2320 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
2321 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
2322 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
2323 AC_PLUGIN([users], [$plugin_users], [User statistics])
2324 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
2325 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
2326 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
2327 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
2328 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
2331 if test "x$ac_system" = "xLinux" -a "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
2333 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
2337 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
2339 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2341 PERL_BINDINGS_OPTIONS="$withval"
2342 with_perl_bindings="yes"
2344 PERL_BINDINGS_OPTIONS=""
2345 with_perl_bindings="$withval"
2349 PERL_BINDINGS_OPTIONS=""
2350 with_perl_bindings="yes"
2352 if test "x$with_perl_bindings" = "xyes"
2354 PERL_BINDINGS="perl"
2358 AC_SUBST(PERL_BINDINGS)
2359 AC_SUBST(PERL_BINDINGS_OPTIONS)
2361 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
2363 if test "x$with_rrdtool" = "xyes" -a "x$librrd_threadsafe" != "xyes"
2365 with_rrdtool="yes (warning: librrd is not thread-safe)"
2368 if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
2370 with_liboping="yes (shipped version)"
2373 if test "x$with_libperl" = "xyes"
2375 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
2377 enable_perl="no (needs libperl)"
2380 if test "x$with_perl_bindings" = "xyes" -a "x$PERL_BINDINGS_OPTIONS" != "x"
2382 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
2389 libcurl . . . . . . $with_libcurl
2390 libiokit . . . . . $with_libiokit
2391 libiptc . . . . . . $with_libiptc
2392 libkstat . . . . . $with_kstat
2393 libkvm . . . . . . $with_libkvm
2394 libmysql . . . . . $with_libmysql
2395 libnetlink . . . . $with_libnetlink
2396 libnetsnmp . . . . $with_libnetsnmp
2397 liboconfig . . . . $with_liboconfig
2398 liboping . . . . . $with_liboping
2399 libpcap . . . . . . $with_libpcap
2400 libperl . . . . . . $with_libperl
2401 libpthread . . . . $with_libpthread
2402 librrd . . . . . . $with_rrdtool
2403 libsensors . . . . $with_lm_sensors
2404 libstatgrab . . . . $with_libstatgrab
2405 libupsclient . . . $with_libupsclient
2406 libvirt . . . . . . $with_libvirt
2407 libxml2 . . . . . . $with_libxml2
2408 libxmms . . . . . . $with_libxmms
2411 daemon mode . . . . $enable_daemon
2412 debug . . . . . . . $enable_debug
2415 perl . . . . . . . $with_perl_bindings
2418 apache . . . . . . $enable_apache
2419 apcups . . . . . . $enable_apcups
2420 apple_sensors . . . $enable_apple_sensors
2421 battery . . . . . . $enable_battery
2422 cpu . . . . . . . . $enable_cpu
2423 cpufreq . . . . . . $enable_cpufreq
2424 csv . . . . . . . . $enable_csv
2425 df . . . . . . . . $enable_df
2426 disk . . . . . . . $enable_disk
2427 dns . . . . . . . . $enable_dns
2428 email . . . . . . . $enable_email
2429 entropy . . . . . . $enable_entropy
2430 exec . . . . . . . $enable_exec
2431 hddtemp . . . . . . $enable_hddtemp
2432 interface . . . . . $enable_interface
2433 iptables . . . . . $enable_iptables
2434 ipmi . . . . . . . $enable_ipmi
2435 ipvs . . . . . . . $enable_ipvs
2436 irq . . . . . . . . $enable_irq
2437 libvirt . . . . . . $enable_libvirt
2438 load . . . . . . . $enable_load
2439 logfile . . . . . . $enable_logfile
2440 mbmon . . . . . . . $enable_mbmon
2441 memcached . . . . . $enable_memcached
2442 memory . . . . . . $enable_memory
2443 multimeter . . . . $enable_multimeter
2444 mysql . . . . . . . $enable_mysql
2445 netlink . . . . . . $enable_netlink
2446 network . . . . . . $enable_network
2447 nfs . . . . . . . . $enable_nfs
2448 nginx . . . . . . . $enable_nginx
2449 ntpd . . . . . . . $enable_ntpd
2450 nut . . . . . . . . $enable_nut
2451 perl . . . . . . . $enable_perl
2452 ping . . . . . . . $enable_ping
2453 powerdns . . . . . $enable_powerdns
2454 processes . . . . . $enable_processes
2455 rrdtool . . . . . . $enable_rrdtool
2456 sensors . . . . . . $enable_sensors
2457 serial . . . . . . $enable_serial
2458 snmp . . . . . . . $enable_snmp
2459 swap . . . . . . . $enable_swap
2460 syslog . . . . . . $enable_syslog
2461 tail . . . . . . . $enable_tail
2462 tape . . . . . . . $enable_tape
2463 tcpconns . . . . . $enable_tcpconns
2464 unixsock . . . . . $enable_unixsock
2465 users . . . . . . . $enable_users
2466 uuid . . . . . . . $enable_uuid
2467 vmem . . . . . . . $enable_vmem
2468 vserver . . . . . . $enable_vserver
2469 wireless . . . . . $enable_wireless
2470 xmms . . . . . . . $enable_xmms