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_CACHE_CHECK([for strtok_r],
377 [have_strtok_r_default],
386 char buffer[] = "foo,bar,baz";
393 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
396 printf ("token = %s;\n", token);
399 [have_strtok_r_default="yes"],
400 [have_strtok_r_default="no"]
404 if test "x$have_strtok_r_default" = "xno"
406 SAVE_CFLAGS="$CFLAGS"
407 CFLAGS="$CFLAGS -D_REENTRANT=1"
409 AC_CACHE_CHECK([if strtok_r needs _REENTRANT],
410 [have_strtok_r_reentrant],
419 char buffer[] = "foo,bar,baz";
426 while ((token = strtok_r (dummy, ",", &saveptr)) != NULL)
429 printf ("token = %s;\n", token);
432 [have_strtok_r_reentrant="yes"],
433 [AC_MSG_FAILURE([strtok_r isn't available. Please file a bugreport!])]
438 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
440 socket_needs_socket="no"
441 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
442 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
444 nanosleep_needs_rt="no"
445 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
446 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
448 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
449 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
450 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
451 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
452 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
453 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
454 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
455 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
456 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
457 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
460 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
463 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
465 if test "x$withval" = "xno"; then
467 else if test "x$withval" = "xyes"; then
474 if test "x$nan_type" = "xnone"; then
475 AC_CACHE_CHECK([whether NAN is defined by default],
482 static float foo = NAN;
490 [have_nan_default="yes"],
491 [have_nan_default="no"]
494 if test "x$have_nan_default" = "xyes"
499 if test "x$nan_type" = "xnone"; then
500 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
506 #define __USE_ISOC99 1
508 static float foo = NAN;
516 [have_nan_isoc="yes"],
520 if test "x$have_nan_isoc" = "xyes"
525 if test "x$nan_type" = "xnone"; then
526 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
536 #define NAN (0.0 / 0.0)
538 # define isnan(f) ((f) != (f))
540 static float foo = NAN;
548 [have_nan_zero="yes"],
552 if test "x$have_nan_zero" = "xyes"
558 if test "x$nan_type" = "xdefault"; then
559 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
560 [Define if NAN is defined by default and can initialize static variables.])
561 else if test "x$nan_type" = "xisoc99"; then
562 AC_DEFINE(NAN_STATIC_ISOC, 1,
563 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
564 else if test "x$nan_type" = "xzero"; then
565 AC_DEFINE(NAN_ZERO_ZERO, 1,
566 [Define if NAN can be defined as (0.0 / 0.0)])
568 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
571 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
573 if test "x$withval" = "xnothing"; then
574 fp_layout_type="nothing"
575 else if test "x$withval" = "xendianflip"; then
576 fp_layout_type="endianflip"
577 else if test "x$withval" = "xintswap"; then
578 fp_layout_type="intswap"
580 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
583 [fp_layout_type="unknown"])
585 if test "x$fp_layout_type" = "xunknown"; then
586 AC_CACHE_CHECK([if doubles are stored in x86 representation],
587 [fp_layout_need_nothing],
603 memcpy ((void *) &i0, (void *) &d, 8);
606 memcpy ((void *) c, (void *) &i1, 8);
608 if ((c[0] == 0x2f) && (c[1] == 0x25)
609 && (c[2] == 0xc0) && (c[3] == 0xc7)
610 && (c[4] == 0x43) && (c[5] == 0x2b)
611 && (c[6] == 0x1f) && (c[7] == 0x5b))
616 [fp_layout_need_nothing="yes"],
617 [fp_layout_need_nothing="no"]
620 if test "x$fp_layout_need_nothing" = "xyes"; then
621 fp_layout_type="nothing"
624 if test "x$fp_layout_type" = "xunknown"; then
625 AC_CACHE_CHECK([if endianflip converts to x86 representation],
626 [fp_layout_need_endianflip],
634 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
635 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
636 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
637 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
638 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
639 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
640 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
641 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
650 memcpy ((void *) &i0, (void *) &d, 8);
652 i1 = endianflip (i0);
653 memcpy ((void *) c, (void *) &i1, 8);
655 if ((c[0] == 0x2f) && (c[1] == 0x25)
656 && (c[2] == 0xc0) && (c[3] == 0xc7)
657 && (c[4] == 0x43) && (c[5] == 0x2b)
658 && (c[6] == 0x1f) && (c[7] == 0x5b))
663 [fp_layout_need_endianflip="yes"],
664 [fp_layout_need_endianflip="no"]
667 if test "x$fp_layout_need_endianflip" = "xyes"; then
668 fp_layout_type="endianflip"
671 if test "x$fp_layout_type" = "xunknown"; then
672 AC_CACHE_CHECK([if intswap converts to x86 representation],
673 [fp_layout_need_intswap],
681 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
682 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
691 memcpy ((void *) &i0, (void *) &d, 8);
694 memcpy ((void *) c, (void *) &i1, 8);
696 if ((c[0] == 0x2f) && (c[1] == 0x25)
697 && (c[2] == 0xc0) && (c[3] == 0xc7)
698 && (c[4] == 0x43) && (c[5] == 0x2b)
699 && (c[6] == 0x1f) && (c[7] == 0x5b))
704 [fp_layout_need_intswap="yes"],
705 [fp_layout_need_intswap="no"]
708 if test "x$fp_layout_need_intswap" = "xyes"; then
709 fp_layout_type="intswap"
713 if test "x$fp_layout_type" = "xnothing"; then
714 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
715 [Define if doubles are stored in x86 representation.])
716 else if test "x$fp_layout_type" = "xendianflip"; then
717 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
718 [Define if endianflip is needed to convert to x86 representation.])
719 else if test "x$fp_layout_type" = "xintswap"; then
720 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
721 [Define if intswap is needed to convert to x86 representation.])
723 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
727 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
729 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
731 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
734 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
735 if test "x$have_getmntent" = "xno"; then
736 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
738 if test "x$have_getmntent" = "xno"; then
739 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
741 if test "x$have_getmntent" = "xno"; then
742 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
745 if test "x$have_getmntent" = "xc"; then
746 AC_CACHE_CHECK([whether getmntent takes one argument],
747 [have_one_getmntent],
749 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
751 #include "$srcdir/src/utils_mount.h"]],
755 fh = setmntent ("/etc/mtab", "r");
759 [have_one_getmntent="yes"],
760 [have_one_getmntent="no"]
763 AC_CACHE_CHECK([whether getmntent takes two arguments],
764 [have_two_getmntent],
766 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
767 #include <sys/mnttab.h>
768 #include "$srcdir/src/utils_mount.h"]],
773 fh = fopen ("/etc/mnttab", "r");
774 status = getmntent (fh, &mt);
777 [have_two_getmntent="yes"],
778 [have_two_getmntent="no"]
783 # Check for different versions of `getmntent' here..
785 if test "x$have_getmntent" = "xc"; then
786 if test "x$have_one_getmntent" = "xyes"; then
787 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
788 [Define if the function getmntent exists and takes one argument.])
790 if test "x$have_two_getmntent" = "xyes"; then
791 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
792 [Define if the function getmntent exists and takes two arguments.])
795 if test "x$have_getmntent" = "xsun"; then
796 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
797 [Define if the function getmntent exists. It's the version from libsun.])
799 if test "x$have_getmntent" = "xseq"; then
800 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
801 [Define if the function getmntent exists. It's the version from libseq.])
803 if test "x$have_getmntent" = "xgen"; then
804 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
805 [Define if the function getmntent exists. It's the version from libgen.])
808 # Check for structures
809 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
810 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
813 #include <sys/types.h>
814 #include <sys/socket.h>
817 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
818 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
821 #include <sys/types.h>
822 #include <sys/socket.h>
823 #include <linux/if.h>
824 #include <linux/netdevice.h>
827 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
832 # include <sys/types.h>
834 #if HAVE_NETINET_IN_SYSTM_H
835 # include <netinet/in_systm.h>
837 #if HAVE_NETINET_IN_H
838 # include <netinet/in.h>
840 #if HAVE_NETINET_IP_H
841 # include <netinet/ip.h>
843 #if HAVE_NETINET_UDP_H
844 # include <netinet/udp.h>
847 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
852 # include <sys/types.h>
854 #if HAVE_NETINET_IN_SYSTM_H
855 # include <netinet/in_systm.h>
857 #if HAVE_NETINET_IN_H
858 # include <netinet/in.h>
860 #if HAVE_NETINET_IP_H
861 # include <netinet/ip.h>
863 #if HAVE_NETINET_UDP_H
864 # include <netinet/udp.h>
868 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
878 # Checks for libraries begin here
881 AC_CHECK_LIB(resolv, res_search,
883 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
885 [with_libresolv="no"])
886 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
888 dnl Check for HAL (hardware abstraction library)
890 AC_CHECK_LIB(hal,libhal_device_property_exists,
891 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
893 if test "x$with_libhal" = "xyes"; then
895 if test "x$PKG_CONFIG" != "x"; then
896 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
897 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
898 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
899 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
903 m4_divert_once([HELP_WITH], [
904 collectd additional packages:])
906 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
909 librrd_threadsafe="yes"
910 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
911 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
913 librrd_cflags="-I$withval/include"
914 librrd_ldflags="-L$withval/lib"
917 with_rrdtool="$withval"
919 ], [with_rrdtool="yes"])
920 if test "x$with_rrdtool" = "xyes"
922 SAVE_CPPFLAGS="$CPPFLAGS"
923 SAVE_LDFLAGS="$LDFLAGS"
925 CPPFLAGS="$CPPFLAGS $librrd_cflags"
926 LDFLAGS="$LDFLAGS $librrd_ldflags"
928 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
930 CPPFLAGS="$SAVE_CPPFLAGS"
931 LDFLAGS="$SAVE_LDFLAGS"
933 if test "x$with_rrdtool" = "xyes"
935 SAVE_CPPFLAGS="$CPPFLAGS"
936 SAVE_LDFLAGS="$LDFLAGS"
938 CPPFLAGS="$CPPFLAGS $librrd_cflags"
939 LDFLAGS="$LDFLAGS $librrd_ldflags"
941 AC_CHECK_LIB(rrd_th, rrd_update_r,
943 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
945 [librrd_threadsafe="no"
946 AC_CHECK_LIB(rrd, rrd_update,
948 librrd_ldflags="$librrd_ldflags -lrrd -lm"
950 [with_rrdtool="no (symbol 'rrd_update' not found)"],
955 CPPFLAGS="$SAVE_CPPFLAGS"
956 LDFLAGS="$SAVE_LDFLAGS"
958 if test "x$with_rrdtool" = "xyes"
960 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
961 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
962 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
963 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
965 if test "x$librrd_threadsafe" = "xyes"
967 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
970 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
971 [ if test "x$withval" != "xno" -a "x$withval" != "xyes"
973 LDFLAGS="$LDFLAGS -L$withval/lib"
974 CPPFLAGS="$CPPFLAGS -I$withval/include"
975 with_libpthread="yes"
977 if test "x$withval" = "xno"
979 with_libpthread="no (disabled)"
982 ], [with_libpthread="yes"])
983 if test "x$with_libpthread" = "xyes"
985 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
987 if test "x$with_libpthread" = "xyes"
989 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
991 if test "x$with_libpthread" = "xyes"
997 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
998 [Wether or not to use pthread (POSIX threads) library])
999 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
1001 if test "x$ac_system" = "xSolaris"
1006 with_kstat="no (Solaris only)"
1007 with_devinfo="no (Solaris only)"
1010 if test "x$with_kstat" = "xyes"
1012 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
1014 if test "x$with_kstat" = "xyes"
1016 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
1017 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
1019 if test "x$with_kstat" = "xyes"
1021 AC_DEFINE(HAVE_LIBKSTAT, 1,
1022 [Define to 1 if you have the 'kstat' library (-lkstat)])
1024 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
1025 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
1027 ### BEGIN of check for libcurl ###
1028 with_curl_config="curl-config"
1031 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
1033 if test "x$withval" = "xno"
1036 else if test "x$withval" = "xyes"
1040 if test -f "$withval" && test -x "$withval"
1042 with_curl_config="$withval"
1044 else if test -x "$withval/bin/curl-config"
1046 with_curl_config="$withval/bin/curl-config"
1055 if test "x$with_libcurl" = "xyes"
1057 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
1058 curl_config_status=$?
1060 if test $curl_config_status -ne 0
1062 with_libcurl="no ($with_curl_config failed)"
1064 SAVE_CPPFLAGS="$CPPFLAGS"
1065 CPPFLAGS="$CPPFLAGS $with_curl_cflags"
1067 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1069 CPPFLAGS="$SAVE_CPPFLAGS"
1072 if test "x$with_libcurl" = "xyes"
1074 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1075 curl_config_status=$?
1077 if test $curl_config_status -ne 0
1079 with_libcurl="no ($with_curl_config failed)"
1081 AC_CHECK_LIB(curl, curl_easy_init,
1082 [with_libcurl="yes"],
1083 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1087 if test "x$with_libcurl" = "xyes"
1089 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1090 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1091 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1092 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1094 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1095 ### END of check for libcurl ###
1099 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1108 AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
1109 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1111 with_libstatgrab_cflags=""
1112 with_libstatgrab_ldflags=""
1113 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
1115 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1117 with_libstatgrab_cflags="-I$withval/include"
1118 with_libstatgrab_ldflags="-L$withval/lib"
1119 with_libstatgrab="yes"
1121 with_libstatgrab="$withval"
1125 if test "x$ac_system" == "xunknown"
1127 with_libstatgrab="yes"
1129 with_libstatgrab="no"
1132 with_libstatgrab_pkg_config="yes"
1133 if test "x$with_libstatgrab" = "xyes" \
1134 && test "x$PKG_CONFIG" != "x"
1136 AC_MSG_CHECKING([pkg-config for libstatgrab])
1138 $PKG_CONFIG --exists libstatgrab 2>/dev/null
1141 with_libstatgrab_pkg_config="no"
1142 temp_result="not found"
1144 AC_MSG_RESULT([$temp_result])
1146 AC_MSG_NOTICE([pkg-config not available, trying to guess flags for the statgrab library.])
1147 with_libstatgrab_pkg_config="no"
1148 with_libstatgrab_ldflags="$with_libstatgrab_ldflags -lstatgrab"
1151 if test "x$with_libstatgrab" = "xyes" \
1152 && test "x$with_libstatgrab_pkg_config" = "xyes" \
1153 && test "x$with_libstatgrab_cflags" = "x"
1155 AC_MSG_CHECKING([for libstatgrab CFLAGS])
1156 temp_result="`$PKG_CONFIG --cflags libstatgrab`"
1159 with_libstatgrab_cflags="$temp_result"
1161 with_libstatgrab="no ($PKG_CONFIG --cflags libstatgrab failed)"
1162 temp_result="$PKG_CONFIG --cflags libstatgrab failed"
1164 AC_MSG_RESULT([$temp_result])
1167 if test "x$with_libstatgrab" = "xyes" \
1168 && test "x$with_libstatgrab_pkg_config" = "xyes" \
1169 && test "x$with_libstatgrab_ldflags" = "x"
1171 AC_MSG_CHECKING([for libstatgrab LDFLAGS])
1172 temp_result="`$PKG_CONFIG --libs libstatgrab`"
1175 with_libstatgrab_ldflags="$temp_result"
1177 with_libstatgrab="no ($PKG_CONFIG --libs libstatgrab failed)"
1178 temp_result="$PKG_CONFIG --libs libstatgrab failed"
1180 AC_MSG_RESULT([$temp_result])
1183 if test "x$with_libstatgrab" = "xyes"
1185 SAVE_CPPFLAGS="$CPPFLAGS"
1186 CPPFLAGS="$CPPFLAGS $with_libstatgrab_cflags"
1188 AC_CHECK_HEADERS(statgrab.h,
1189 [with_libstatgrab="yes"],
1190 [with_libstatgrab="no (statgrab.h not found)"])
1192 CPPFLAGS="$SAVE_CPPFLAGS"
1195 if test "x$with_libstatgrab" = "xyes"
1197 SAVE_CFLAGS="$CFLAGS"
1198 SAVE_LDFLAGS="$LDFLAGS"
1200 CFLAGS="$CFLAGS $with_libstatgrab_cflags"
1201 LDFLAGS="$LDFLAGS $with_libstatgrab_ldflags"
1203 AC_CHECK_LIB(statgrab, sg_init,
1204 [with_libstatgrab="yes"],
1205 [with_libstatgrab="no (symbol sg_init not found)"])
1207 CFLAGS="$SAVE_CFLAGS"
1208 LDFLAGS="$SAVE_LDFLAGS"
1211 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
1212 if test "x$with_libstatgrab" = "xyes"
1214 BUILD_WITH_LIBSTATGRAB_CFLAGS="$with_libstatgrab_cflags"
1215 BUILD_WITH_LIBSTATGRAB_LDFLAGS="$with_libstatgrab_ldflags"
1216 AC_SUBST(BUILD_WITH_LIBSTATGRAB_CFLAGS)
1217 AC_SUBST(BUILD_WITH_LIBSTATGRAB_LDFLAGS)
1220 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
1221 if test "x$with_libkvm" = "xyes"
1223 AC_DEFINE(HAVE_LIBKVM, 1, [Define to 1 if you have the 'kvm' library (-lkvm)])
1225 AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes")
1227 with_sensors_cflags=""
1228 with_sensors_ldflags=""
1229 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
1231 if test "x$withval" = "xno"
1233 with_lm_sensors="no"
1235 with_lm_sensors="yes"
1236 if test "x$withval" != "xyes"
1238 with_sensors_cflags="-I$withval/include"
1239 with_sensors_ldflags="-L$withval/lib"
1240 with_lm_sensors="yes"
1245 if test "x$ac_system" = "xLinux"
1247 with_lm_sensors="yes"
1249 with_lm_sensors="no (Linux only library)"
1252 if test "x$with_lm_sensors" = "xyes"
1254 SAVE_CPPFLAGS="$CPPFLAGS"
1255 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1257 # AC_CHECK_HEADERS(sensors/sensors.h,
1259 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
1261 # [with_lm_sensors="no (sensors/sensors.h not found)"])
1262 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_lm_sensors="no (sensors/sensors.h not found)"])
1264 CPPFLAGS="$SAVE_CPPFLAGS"
1266 if test "x$with_lm_sensors" = "xyes"
1268 SAVE_CPPFLAGS="$CPPFLAGS"
1269 SAVE_LDFLAGS="$LDFLAGS"
1270 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1271 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
1273 AC_CHECK_LIB(sensors, sensors_init,
1275 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
1277 [with_lm_sensors="no (libsensors not found)"])
1279 CPPFLAGS="$SAVE_CPPFLAGS"
1280 LDFLAGS="$SAVE_LDFLAGS"
1282 if test "x$with_lm_sensors" = "xyes"
1284 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
1285 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
1286 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
1287 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
1289 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
1291 with_mysql_config="mysql_config"
1292 with_mysql_cflags=""
1294 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1296 if test "x$withval" = "xno"
1299 else if test "x$withval" = "xyes"
1303 if test -f "$withval" && test -x "$withval";
1305 with_mysql_config="$withval"
1306 else if test -x "$withval/bin/mysql_config"
1308 with_mysql_config="$withval/bin/mysql_config"
1316 if test "x$with_libmysql" = "xyes"
1318 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1319 mysql_config_status=$?
1321 if test $mysql_config_status -ne 0
1325 SAVE_CPPFLAGS="$CPPFLAGS"
1326 CPPFLAGS="$CPPFLAGS $with_mysql_cflags"
1328 AC_CHECK_HEADERS(mysql/mysql.h, [], [with_libmysql="no (mysql/mysql.h not found)"], [])
1330 CPPFLAGS="$SAVE_CPPFLAGS"
1333 if test "x$with_libmysql" = "xyes"
1335 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1336 mysql_config_status=$?
1338 if test $mysql_config_status -ne 0
1342 AC_CHECK_LIB(mysqlclient, mysql_init,
1343 [with_libmysql="yes"],
1344 [with_libmysql="no (symbol 'mysql_init' not found)"],
1348 if test "x$with_libmysql" = "xyes"
1350 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1351 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1352 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1353 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1355 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1357 with_own_liboconfig="no"
1358 liboconfig_LDFLAGS="$LDFLAGS"
1359 liboconfig_CPPFLAGS="$CPPFLAGS"
1360 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1362 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1364 if test -d "$withval/lib"
1366 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1368 if test -d "$withval/include"
1370 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1373 if test "x$withval" = "xno"
1375 AC_MSG_ERROR("liboconfig is required")
1379 with_liboconfig="yes"
1382 save_LDFLAGS="$LDFLAGS"
1383 save_CPPFLAGS="$CPPFLAGS"
1384 LDFLAGS="$liboconfig_LDFLAGS"
1385 CPPFLAGS="$liboconfig_CPPFLAGS"
1386 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1388 with_liboconfig="yes"
1389 with_own_liboconfig="no"
1392 with_liboconfig="yes"
1393 with_own_liboconfig="yes"
1394 LDFLAGS="$save_LDFLAGS"
1395 CPPFLAGS="$save_CPPFLAGS"
1398 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1399 if test "x$with_own_liboconfig" = "xyes"
1401 with_liboconfig="yes (shipped version)"
1404 #with_liboping="yes"
1405 with_own_liboping="no"
1406 liboping_LDFLAGS="$LDFLAGS"
1407 liboping_CPPFLAGS="$CPPFLAGS"
1408 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1410 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1412 if test -d "$withval/lib"
1414 liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
1416 if test -d "$withval/include"
1418 liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
1421 if test "x$withval" = "xno"
1424 with_own_liboping="no"
1425 else if test "x$withval" = "xyes"
1434 if test "x$with_liboping" = "xyes"
1436 save_LDFLAGS="$LDFLAGS"
1437 save_CPPFLAGS="$CPPFLAGS"
1438 LDFLAGS="$liboping_LDFLAGS"
1439 CPPFLAGS="$liboping_CPPFLAGS"
1440 AC_CHECK_LIB(oping, ping_construct,
1443 with_own_liboping="no"
1447 with_own_liboping="yes"
1448 LDFLAGS="$save_LDFLAGS"
1449 CPPFLAGS="$save_CPPFLAGS"
1452 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1453 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
1455 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
1457 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1459 LDFLAGS="$LDFLAGS -L$withval/lib"
1460 CPPFLAGS="$CPPFLAGS -I$withval/include"
1463 with_libpcap="$withval"
1469 if test "x$with_libpcap" = "xyes"
1471 AC_CHECK_LIB(pcap, pcap_open_live,
1473 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
1474 ], [with_libpcap="no (libpcap not found)"])
1476 if test "x$with_libpcap" = "xyes"
1478 AC_CHECK_HEADERS(pcap.h,
1480 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
1481 ], [with_libpcap="no (pcap.h not found)"])
1483 if test "x$with_libpcap" = "xyes"
1489 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
1490 [Wether or not to use the pcap library])
1491 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
1493 perl_interpreter="perl"
1494 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
1496 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1498 LDFLAGS="$LDFLAGS -L$withval/lib"
1499 CPPFLAGS="$CPPFLAGS -I$withval/include"
1500 perl_interpreter="$withval/bin/perl"
1503 with_libperl="$withval"
1510 AC_MSG_CHECKING([for perl])
1511 perl_interpreter=`which "$perl_interpreter" 2> /dev/null`
1512 if test -x "$perl_interpreter"
1514 AC_MSG_RESULT([yes])
1520 AC_SUBST(PERL, "$perl_interpreter")
1522 if test "x$with_libperl" = "xyes" -a -n "$perl_interpreter"
1525 SAVE_LDFLAGS=$LDFLAGS
1526 PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts`
1527 PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts`
1528 CFLAGS="$CFLAGS $PERL_CFLAGS"
1529 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1531 AC_CACHE_CHECK([for libperl],
1541 PerlInterpreter *perl = NULL;
1542 Perl_load_module (perl, PERL_LOADMOD_NOIMPORT,
1543 newSVpv ("Collectd::Plugin::FooBar", 24),
1546 [have_libperl="yes"],
1551 if test "x$have_libperl" = "xyes"
1553 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
1554 AC_SUBST(PERL_CFLAGS)
1555 AC_SUBST(PERL_LDFLAGS)
1561 LDFLAGS=$SAVE_LDFLAGS
1562 else if test -z "$perl_interpreter"; then
1563 with_libperl="no (no perl interpreter found)"
1566 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1568 if test "x$with_libperl" = "xyes"
1571 SAVE_LDFLAGS=$LDFLAGS
1572 CFLAGS="$CFLAGS $PERL_CFLAGS"
1573 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1575 AC_CACHE_CHECK([if perl supports ithreads],
1576 [have_perl_ithreads],
1584 #if !defined(USE_ITHREADS)
1585 # error "Perl does not support ithreads!"
1586 #endif /* !defined(USE_ITHREADS) */
1589 [have_perl_ithreads="yes"],
1590 [have_perl_ithreads="no"]
1594 if test "x$have_perl_ithreads" = "xyes"
1596 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
1600 LDFLAGS=$SAVE_LDFLAGS
1603 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1605 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1607 LDFLAGS="$LDFLAGS -L$withval/lib"
1608 CPPFLAGS="$CPPFLAGS -I$withval/include"
1611 with_libiptc="$withval"
1615 if test "x$ac_system" = "xLinux"
1619 with_libiptc="no (Linux only)"
1622 if test "x$with_libiptc" = "xyes"
1624 AC_CHECK_LIB(iptc, iptc_init,
1626 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1627 ], [with_libiptc="no (libiptc not found)"])
1629 if test "x$with_libiptc" = "xyes"
1631 AC_CHECK_HEADERS(libiptc/libiptc.h,
1633 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1634 ], [with_libiptc="no (libiptc/libiptc.h not found)"])
1636 if test "x$with_libiptc" = "xyes"
1642 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1644 with_snmp_config="net-snmp-config"
1647 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1649 if test "x$withval" = "xno"
1651 with_libnetsnmp="no"
1652 else if test "x$withval" = "xyes"
1654 with_libnetsnmp="yes"
1656 if test -x "$withval"
1658 with_snmp_config="$withval"
1659 with_libnetsnmp="yes"
1661 with_snmp_config="$withval/bin/net-snmp-config"
1662 with_libnetsnmp="yes"
1666 [with_libnetsnmp="yes"])
1667 if test "x$with_libnetsnmp" = "xyes"
1669 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
1670 snmp_config_status=$?
1672 if test $snmp_config_status -ne 0
1674 with_libnetsnmp="no ($with_snmp_config failed)"
1676 SAVE_CPPFLAGS="$CPPFLAGS"
1677 CPPFLAGS="$CPPFLAGS $with_snmp_cflags"
1679 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1681 CPPFLAGS="$SAVE_CPPFLAGS"
1684 if test "x$with_libnetsnmp" = "xyes"
1686 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
1687 snmp_config_status=$?
1689 if test $snmp_config_status -ne 0
1691 with_libnetsnmp="no ($with_snmp_config failed)"
1693 AC_CHECK_LIB(netsnmp, init_snmp,
1694 [with_libnetsnmp="yes"],
1695 [with_libnetsnmp="no (libnetsnmp not found)"],
1699 if test "x$with_libnetsnmp" = "xyes"
1701 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
1702 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
1703 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
1704 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
1706 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1708 with_upsclient_config="libupsclient-config"
1709 with_upsclient_cflags=""
1710 with_upsclient_libs=""
1711 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])],
1713 if test "x$withval" = "xno"
1715 with_libupsclient="no"
1717 if test "x$withval" != "xyes"
1719 if test -f "$withval" && test -x "$withval";
1721 with_upsclient_config="$withval"
1723 with_upsclient_config="$withval/bin/libupsclient-config"
1726 with_libupsclient="yes"
1730 with_libupsclient="yes"
1732 if test "x$with_libupsclient" = "xyes"
1734 with_upsclient_cflags=`$with_upsclient_config --cflags 2>/dev/null`
1735 upsclient_config_status=$?
1737 if test $upsclient_config_status -ne 0
1739 with_libupsclient="no ($with_upsclient_config failed)"
1742 if test "x$with_libupsclient" = "xyes"
1744 SAVE_CPPFLAGS="$CPPFLAGS"
1745 CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
1747 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
1749 CPPFLAGS="$SAVE_CPPFLAGS"
1751 if test "x$with_libupsclient" = "xyes"
1753 with_upsclient_libs=`$with_upsclient_config --libs 2>/dev/null`
1754 upsclient_config_status=$?
1756 if test $upsclient_config_status -ne 0
1758 with_libupsclient="no ($with_upsclient_config failed)"
1761 if test "x$with_libupsclient" = "xyes"
1763 AC_CHECK_LIB(upsclient, upscli_connect,
1765 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_upsclient_cflags"
1766 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_upsclient_libs"
1767 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1768 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
1771 with_libupsclient="no (symbol 'upscli_connect' not found)"
1772 ], [$with_upsclient_libs])
1774 if test "x$with_libupsclient" = "xyes"
1776 SAVE_CPPFLAGS="$CPPFLAGS"
1777 CPPFLAGS="$CPPFLAGS $with_upsclient_cflags"
1779 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
1780 [#include <stdlib.h>
1782 #include <upsclient.h>])
1784 CPPFLAGS="$SAVE_CPPFLAGS"
1786 AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
1788 ### BEGIN of check for libxmms ###
1789 with_xmms_config="xmms-config"
1792 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
1794 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1796 if test -f "$withval" && test -x "$withval";
1798 with_xmms_config="$withval"
1799 else if test -x "$withval/bin/xmms-config"
1801 with_xmms_config="$withval/bin/xmms-config"
1804 else if test "x$withval" = "xno"
1814 if test "x$with_libxmms" = "xyes"
1816 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
1817 xmms_config_status=$?
1819 if test $xmms_config_status -ne 0
1824 if test "x$with_libxmms" = "xyes"
1826 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
1827 xmms_config_status=$?
1829 if test $xmms_config_status -ne 0
1834 if test "x$with_libxmms" = "xyes"
1836 AC_CHECK_LIB(xmms, xmms_remote_get_info,
1838 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
1839 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
1840 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
1841 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
1848 with_libxmms_numeric=0
1849 if test "x$with_libxmms" = "xyes"
1851 with_libxmms_numeric=1
1853 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
1854 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
1855 ### END of check for libxmms ###
1857 with_libnetlink_cflags=""
1858 with_libnetlink_libs="-lnetlink"
1859 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1861 echo "libnetlink: withval = $withval"
1862 if test "x$withval" = "xyes"
1864 with_libnetlink="yes"
1865 else if test "x$withval" = "xno"
1867 with_libnetlink="no"
1869 if test -d "$withval/include"
1871 with_libnetlink_cflags="-I$withval/include"
1872 with_libnetlink_libs="-L$withval/lib -lnetlink"
1873 with_libnetlink="yes"
1875 AC_MSG_ERROR("no such directory: $withval/include")
1880 if test "x$ac_system" = "xLinux"
1882 with_libnetlink="yes"
1884 with_libnetlink="no (Linux only library)"
1887 if test "x$with_libnetlink" = "xyes"
1890 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1892 with_libnetlink="no (libnetlink.h not found)"
1894 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1896 with_libnetlink="yes"
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>])
1905 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1907 #include <sys/types.h>
1908 #include <asm/types.h>
1909 #include <sys/socket.h>])
1913 #include <sys/types.h>
1914 #include <asm/types.h>
1915 #include <sys/socket.h>
1916 #include <linux/netlink.h>
1917 #include <linux/rtnetlink.h>
1921 int retval = TCA_STATS2;
1924 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1929 #include <sys/types.h>
1930 #include <asm/types.h>
1931 #include <sys/socket.h>
1932 #include <linux/netlink.h>
1933 #include <linux/rtnetlink.h>
1937 int retval = TCA_STATS;
1940 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1943 CFLAGS="$SAVE_CFLAGS"
1945 if test "x$with_libnetlink" = "xyes"
1947 AC_CHECK_LIB(netlink, rtnl_open,
1948 [with_libnetlink="yes"],
1949 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1950 [$with_libnetlink_libs])
1952 if test "x$with_libnetlink" = "xyes"
1954 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1955 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1956 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1957 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1959 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1961 dnl Check for libvirt and libxml2 libraries.
1962 with_libxml2="no (pkg-config isn't available)"
1963 with_libxml2_cflags=""
1964 with_libxml2_ldflags=""
1965 with_libvirt="no (pkg-config isn't available)"
1966 with_libvirt_cflags=""
1967 with_libvirt_ldflags=""
1969 if test "x$PKG_CONFIG" != "x"
1971 pkg-config --exists 'libxml-2.0' 2>/dev/null
1976 with_libxml2="no (pkg-config doesn't know library)"
1979 pkg-config --exists libvirt 2>/dev/null
1984 with_libvirt="no (pkg-config doesn't know library)"
1987 if test "x$with_libxml2" = "xyes"
1989 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
1994 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
2000 if test "x$with_libxml2" = "xyes"
2002 SAVE_CPPFLAGS="$CPPFLAGS"
2003 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
2005 AC_CHECK_HEADERS(libxml/parser.h, [],
2006 [with_libxml2="no (libxml/parser.h not found)"])
2008 CPPFLAGS="$SAVE_CPPFLAGS"
2010 if test "x$with_libxml2" = "xyes"
2012 SAVE_CFLAGS="$CFLAGS"
2013 SAVE_LDFLAGS="$LDFLAGS"
2015 CFLAGS="$CFLAGS $with_libxml2_cflags"
2016 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
2018 AC_CHECK_LIB(xml2, xmlXPathEval,
2019 [with_libxml2="yes"],
2020 [with_libxml2="no (symbol xmlXPathEval not found)"])
2022 CFLAGS="$SAVE_CFLAGS"
2023 LDFLAGS="$SAVE_LDFLAGS"
2025 dnl Add the right compiler flags and libraries.
2026 if test "x$with_libxml2" = "xyes"; then
2027 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
2028 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
2029 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
2030 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
2032 if test "x$with_libvirt" = "xyes"
2034 with_libvirt_cflags="`pkg-config --cflags libvirt`"
2039 with_libvirt_ldflags="`pkg-config --libs libvirt`"
2045 if test "x$with_libvirt" = "xyes"
2047 SAVE_CPPFLAGS="$CPPFLAGS"
2048 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
2050 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
2051 [with_libvirt="no (libvirt/libvirt.h not found)"])
2053 CPPFLAGS="$SAVE_CPPFLAGS"
2055 if test "x$with_libvirt" = "xyes"
2057 SAVE_CFLAGS="$CFLAGS"
2058 SAVE_LDFLAGS="$LDFLAGS"
2060 CFLAGS="$CFLAGS $with_libvirt_cflags"
2061 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
2063 AC_CHECK_LIB(virt, virDomainBlockStats,
2064 [with_libvirt="yes"],
2065 [with_libvirt="no (symbol virDomainBlockStats not found)"])
2067 CFLAGS="$SAVE_CFLAGS"
2068 LDFLAGS="$SAVE_LDFLAGS"
2070 dnl Add the right compiler flags and libraries.
2071 if test "x$with_libvirt" = "xyes"; then
2072 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
2073 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
2074 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
2075 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
2078 dnl End of check for libvirt and libxml2 libraries.
2080 # Check for enabled/disabled features
2083 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
2084 # ------------------------------------------------------------
2086 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
2091 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
2096 m4_define([EnDis],[disabled])dnl
2097 m4_define([YesNo],[no])dnl
2103 m4_define([EnDis],[enabled])dnl
2104 m4_define([YesNo],[yes])dnl
2107 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
2111 m4_if([$3], [feature], [],
2115 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
2121 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
2123 enable_$1='[YesNo]'dnl
2125 if test "x$enable_$1" = "xno"
2129 if test "x$enable_$1" = "xyes"
2133 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
2138 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
2139 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
2141 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
2143 # AC_PLUGIN(name, default, info)
2144 # ------------------------------------------------------------
2150 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
2152 if test "x$enableval" = "xyes"
2160 if test "x$2" = "xyes"
2167 if test "x$enable_plugin" = "xyes"
2169 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
2171 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
2172 enable_$1="$enable_plugin"
2174 )# AC_PLUGIN(name, default, info)
2176 m4_divert_once([HELP_ENABLE], [
2177 collectd features:])
2178 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
2179 AC_COLLECTD([debug], [enable], [feature], [debugging])
2180 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
2181 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
2189 plugin_interface="no"
2195 plugin_multimeter="no"
2198 plugin_processes="no"
2202 plugin_tcpconns="no"
2205 plugin_wireless="no"
2208 if test "x$ac_system" = "xLinux"
2210 plugin_battery="yes"
2212 plugin_cpufreq="yes"
2214 plugin_entropy="yes"
2215 plugin_interface="yes"
2220 plugin_processes="yes"
2223 plugin_tcpconns="yes"
2224 plugin_vserver="yes"
2225 plugin_wireless="yes"
2227 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
2234 if test "x$with_libiokit" = "xyes"
2236 plugin_battery="yes"
2241 if test "x$with_devinfo$with_kstat" = "xyesyes"
2245 plugin_interface="yes"
2252 if test "x$with_libstatgrab" = "xyes"
2254 plugin_interface="yes"
2260 if test "x$have_processor_info" = "xyes"
2264 if test "x$have_sysctlbyname" = "xyes"
2268 plugin_tcpconns="yes"
2271 if test "x$have_statfs" = "xyes"
2275 if test "x$have_statvfs" = "xyes"
2280 if test "x$have_getifaddrs" = "xyes"
2282 plugin_interface="yes"
2285 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
2287 plugin_libvirt="yes"
2290 if test "x$have_getloadavg" = "xyes"
2295 if test "x$have_libperl$have_perl_ithreads" = "xyesyes"
2300 # Mac OS X memory interface
2301 if test "x$have_host_statistics" = "xyes"
2306 if test "x$have_termios_h" = "xyes"
2308 plugin_multimeter="yes"
2311 if test "x$have_thread_info" = "xyes"
2313 plugin_processes="yes"
2316 if test "x$with_libkvm" = "xyes"
2321 if test "x$have_getutent" = "xyes"
2325 if test "x$have_getutxent" = "xyes"
2330 # FIXME: sysctl for swap plugin
2332 m4_divert_once([HELP_ENABLE], [
2335 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
2336 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
2337 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
2338 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
2339 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
2340 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
2341 AC_PLUGIN([csv], [yes], [CSV output plugin])
2342 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
2343 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
2344 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
2345 AC_PLUGIN([email], [yes], [EMail statistics])
2346 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
2347 AC_PLUGIN([exec], [yes], [Execution of external programs])
2348 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
2349 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
2350 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
2351 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
2352 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
2353 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
2354 AC_PLUGIN([load], [$plugin_load], [System load])
2355 AC_PLUGIN([logfile], [yes], [File logging plugin])
2356 AC_PLUGIN([mbmon], [yes], [Query mbmond])
2357 AC_PLUGIN([memcached], [yes], [memcached statistics])
2358 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
2359 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
2360 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
2361 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
2362 AC_PLUGIN([network], [yes], [Network communication plugin])
2363 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
2364 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
2365 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
2366 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
2367 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
2368 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
2369 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
2370 AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
2371 AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
2372 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
2373 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
2374 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
2375 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
2376 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
2377 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
2378 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
2379 AC_PLUGIN([users], [$plugin_users], [User statistics])
2380 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
2381 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
2382 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
2383 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
2386 if test "x$ac_system" = "xLinux" -a "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
2388 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
2392 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
2394 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2396 PERL_BINDINGS_OPTIONS="$withval"
2397 with_perl_bindings="yes"
2399 PERL_BINDINGS_OPTIONS=""
2400 with_perl_bindings="$withval"
2404 PERL_BINDINGS_OPTIONS=""
2405 if test -n "$perl_interpreter"
2407 with_perl_bindings="yes"
2409 with_perl_bindings="no (no perl interpreter found)"
2412 if test "x$with_perl_bindings" = "xyes"
2414 PERL_BINDINGS="perl"
2418 AC_SUBST(PERL_BINDINGS)
2419 AC_SUBST(PERL_BINDINGS_OPTIONS)
2421 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
2423 if test "x$with_rrdtool" = "xyes" -a "x$librrd_threadsafe" != "xyes"
2425 with_rrdtool="yes (warning: librrd is not thread-safe)"
2428 if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
2430 with_liboping="yes (shipped version)"
2433 if test "x$with_libperl" = "xyes"
2435 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
2437 enable_perl="no (needs libperl)"
2440 if test "x$with_perl_bindings" = "xyes" -a "x$PERL_BINDINGS_OPTIONS" != "x"
2442 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
2449 libcurl . . . . . . $with_libcurl
2450 libiokit . . . . . $with_libiokit
2451 libiptc . . . . . . $with_libiptc
2452 libkstat . . . . . $with_kstat
2453 libkvm . . . . . . $with_libkvm
2454 libmysql . . . . . $with_libmysql
2455 libnetlink . . . . $with_libnetlink
2456 libnetsnmp . . . . $with_libnetsnmp
2457 liboconfig . . . . $with_liboconfig
2458 liboping . . . . . $with_liboping
2459 libpcap . . . . . . $with_libpcap
2460 libperl . . . . . . $with_libperl
2461 libpthread . . . . $with_libpthread
2462 librrd . . . . . . $with_rrdtool
2463 libsensors . . . . $with_lm_sensors
2464 libstatgrab . . . . $with_libstatgrab
2465 libupsclient . . . $with_libupsclient
2466 libvirt . . . . . . $with_libvirt
2467 libxml2 . . . . . . $with_libxml2
2468 libxmms . . . . . . $with_libxmms
2471 daemon mode . . . . $enable_daemon
2472 debug . . . . . . . $enable_debug
2475 perl . . . . . . . $with_perl_bindings
2478 apache . . . . . . $enable_apache
2479 apcups . . . . . . $enable_apcups
2480 apple_sensors . . . $enable_apple_sensors
2481 battery . . . . . . $enable_battery
2482 cpu . . . . . . . . $enable_cpu
2483 cpufreq . . . . . . $enable_cpufreq
2484 csv . . . . . . . . $enable_csv
2485 df . . . . . . . . $enable_df
2486 disk . . . . . . . $enable_disk
2487 dns . . . . . . . . $enable_dns
2488 email . . . . . . . $enable_email
2489 entropy . . . . . . $enable_entropy
2490 exec . . . . . . . $enable_exec
2491 hddtemp . . . . . . $enable_hddtemp
2492 interface . . . . . $enable_interface
2493 iptables . . . . . $enable_iptables
2494 ipvs . . . . . . . $enable_ipvs
2495 irq . . . . . . . . $enable_irq
2496 libvirt . . . . . . $enable_libvirt
2497 load . . . . . . . $enable_load
2498 logfile . . . . . . $enable_logfile
2499 mbmon . . . . . . . $enable_mbmon
2500 memcached . . . . . $enable_memcached
2501 memory . . . . . . $enable_memory
2502 multimeter . . . . $enable_multimeter
2503 mysql . . . . . . . $enable_mysql
2504 netlink . . . . . . $enable_netlink
2505 network . . . . . . $enable_network
2506 nfs . . . . . . . . $enable_nfs
2507 nginx . . . . . . . $enable_nginx
2508 ntpd . . . . . . . $enable_ntpd
2509 nut . . . . . . . . $enable_nut
2510 perl . . . . . . . $enable_perl
2511 ping . . . . . . . $enable_ping
2512 processes . . . . . $enable_processes
2513 rrdtool . . . . . . $enable_rrdtool
2514 sensors . . . . . . $enable_sensors
2515 serial . . . . . . $enable_serial
2516 snmp . . . . . . . $enable_snmp
2517 swap . . . . . . . $enable_swap
2518 syslog . . . . . . $enable_syslog
2519 tape . . . . . . . $enable_tape
2520 tcpconns . . . . . $enable_tcpconns
2521 unixsock . . . . . $enable_unixsock
2522 users . . . . . . . $enable_users
2523 uuid . . . . . . . $enable_uuid
2524 vserver . . . . . . $enable_vserver
2525 wireless . . . . . $enable_wireless
2526 xmms . . . . . . . $enable_xmms