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
32 AC_CONFIG_SUBDIRS(libltdl)
34 AC_MSG_CHECKING([for kernel type ($host_os)])
37 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
41 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
50 AC_MSG_RESULT([$ac_system])
53 # Checks for header files.
59 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)
62 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
67 # include <sys/types.h>
70 AC_CHECK_HEADERS(netinet/in.h, [], [],
75 # include <sys/types.h>
77 #if HAVE_NETINET_IN_SYSTM_H
78 # include <netinet/in_systm.h>
81 AC_CHECK_HEADERS(netinet/ip.h, [], [],
86 # include <sys/types.h>
88 #if HAVE_NETINET_IN_SYSTM_H
89 # include <netinet/in_systm.h>
92 # include <netinet/in.h>
95 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
100 # include <sys/types.h>
102 #if HAVE_NETINET_IN_SYSTM_H
103 # include <netinet/in_systm.h>
105 #if HAVE_NETINET_IN_H
106 # include <netinet/in.h>
108 #if HAVE_NETINET_IP_H
109 # include <netinet/ip.h>
112 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
117 # include <sys/types.h>
119 #if HAVE_NETINET_IN_SYSTM_H
120 # include <netinet/in_systm.h>
122 #if HAVE_NETINET_IN_H
123 # include <netinet/in.h>
125 #if HAVE_NETINET_IP_H
126 # include <netinet/ip.h>
129 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
134 # include <sys/types.h>
136 #if HAVE_NETINET_IN_SYSTM_H
137 # include <netinet/in_systm.h>
139 #if HAVE_NETINET_IN_H
140 # include <netinet/in.h>
143 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
148 # include <sys/types.h>
150 #if HAVE_NETINET_IN_SYSTM_H
151 # include <netinet/in_systm.h>
153 #if HAVE_NETINET_IN_H
154 # include <netinet/in.h>
156 #if HAVE_NETINET_IP6_H
157 # include <netinet/ip6.h>
160 AC_CHECK_HEADERS(netinet/tcp.h, [], [],
165 # include <sys/types.h>
167 #if HAVE_NETINET_IN_SYSTM_H
168 # include <netinet/in_systm.h>
170 #if HAVE_NETINET_IN_H
171 # include <netinet/in.h>
173 #if HAVE_NETINET_IP_H
174 # include <netinet/ip.h>
177 AC_CHECK_HEADERS(netinet/udp.h, [], [],
182 # include <sys/types.h>
184 #if HAVE_NETINET_IN_SYSTM_H
185 # include <netinet/in_systm.h>
187 #if HAVE_NETINET_IN_H
188 # include <netinet/in.h>
190 #if HAVE_NETINET_IP_H
191 # include <netinet/ip.h>
196 AC_CHECK_HEADERS(sys/dkstat.h)
197 if test "x$ac_system" = "xDarwin"
199 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)
200 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h IOKit/IOKitLib.h IOKit/IOTypes.h IOKit/ps/IOPSKeys.h IOKit/IOBSD.h IOKit/storage/IOBlockStorageDriver.h)
202 AC_CHECK_HEADERS(sys/sysctl.h, [], [],
205 # include <sys/types.h>
208 # include <sys/param.h>
213 AC_CHECK_HEADERS(linux/major.h libgen.h)
215 # For the battery plugin
216 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
218 #if HAVE_IOKIT_IOKITLIB_H
219 # include <IOKit/IOKitLib.h>
221 #if HAVE_IOKIT_IOTYPES_H
222 # include <IOKit/IOTypes.h>
226 # For the swap module
227 AC_CHECK_HEADERS(sys/swap.h, [], [],
230 # include <sys/types.h>
233 # include <sys/param.h>
238 # For the processes plugin
240 AC_CHECK_HEADERS(sys/loadavg.h linux/config.h utmp.h utmpx.h)
242 # For interface plugin
243 AC_CHECK_HEADERS(ifaddrs.h)
244 AC_CHECK_HEADERS(net/if.h, [], [],
247 # include <sys/types.h>
249 #if HAVE_SYS_SOCKET_H
250 # include <sys/socket.h>
253 AC_CHECK_HEADERS(linux/if.h, [], [],
256 # include <sys/types.h>
258 #if HAVE_SYS_SOCKET_H
259 # include <sys/socket.h>
262 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
265 # include <sys/types.h>
267 #if HAVE_SYS_SOCKET_H
268 # include <sys/socket.h>
271 # include <linux/if.h>
276 have_net_ip_vs_h="no"
278 if test "x$ac_system" = "xLinux"
280 AC_CHECK_HEADERS(net/ip_vs.h, [have_net_ip_vs_h="yes"])
281 AC_CHECK_HEADERS(ip_vs.h, [have_ip_vs_h="yes"])
285 AC_CHECK_HEADERS(sys/ucred.h, [], [],
288 # include <sys/types.h>
291 # include <sys/param.h>
295 # For mount interface
296 AC_CHECK_HEADERS(sys/mount.h, [], [],
299 # include <sys/types.h>
302 # include <sys/param.h>
306 # For the email plugin
307 AC_CHECK_HEADERS(linux/un.h, [], [],
309 #if HAVE_SYS_SOCKET_H
310 # include <sys/socket.h>
314 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)
317 AC_CHECK_HEADERS(arpa/nameser.h)
318 AC_CHECK_HEADERS(arpa/nameser_compat.h, [], [],
320 #if HAVE_ARPA_NAMESER_H
321 # include <arpa/nameser.h>
325 AC_CHECK_HEADERS(net/if_arp.h, [], [],
326 [#if HAVE_SYS_SOCKET_H
327 # include <sys/socket.h>
330 AC_CHECK_HEADERS(net/ppp_defs.h)
331 AC_CHECK_HEADERS(net/if_ppp.h, [], [],
332 [#if HAVE_NET_PPP_DEFS_H
333 # include <net/ppp_defs.h>
336 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
341 # include <sys/types.h>
343 #if HAVE_SYS_SOCKET_H
344 # include <sys/socket.h>
349 #if HAVE_NETINET_IN_H
350 # include <netinet/in.h>
354 # For the multimeter plugin
356 AC_CHECK_HEADERS(termios.h, [have_termios_h="yes"])
359 # Checks for typedefs, structures, and compiler characteristics.
368 # Checks for library functions.
370 AC_PROG_GCC_TRADITIONAL
371 AC_CHECK_FUNCS(gettimeofday select strdup strtol getaddrinfo getnameinfo strchr memcpy strstr strcmp strncmp strncpy strlen strncasecmp strcasecmp openlog closelog)
375 AC_CHECK_FUNCS(getpwnam_r getgrnam_r setgroups regcomp regerror regexec regfree)
377 socket_needs_socket="no"
378 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
379 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
381 nanosleep_needs_rt="no"
382 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
383 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
385 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
386 AC_CHECK_FUNCS(host_statistics, [have_host_statistics="yes"], [have_host_statistics="no"])
387 AC_CHECK_FUNCS(processor_info, [have_processor_info="yes"], [have_processor_info="no"])
388 AC_CHECK_FUNCS(thread_info, [have_thread_info="yes"], [have_thread_info="no"])
389 AC_CHECK_FUNCS(statfs, [have_statfs="yes"], [have_statfs="no"])
390 AC_CHECK_FUNCS(statvfs, [have_statvfs="yes"], [have_statvfs="no"])
391 AC_CHECK_FUNCS(getifaddrs, [have_getifaddrs="yes"], [have_getifaddrs="no"])
392 AC_CHECK_FUNCS(syslog, [have_syslog="yes"], [have_syslog="no"])
393 AC_CHECK_FUNCS(getutent, [have_getutent="yes"], [have_getutent="no"])
394 AC_CHECK_FUNCS(getutxent, [have_getutxent="yes"], [have_getutxent="no"])
397 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
400 AC_ARG_WITH(nan-emulation, [AS_HELP_STRING([--with-nan-emulation], [use emulated NAN. For crosscompiling only.])],
402 if test "x$withval" = "xno"; then
404 else if test "x$withval" = "xyes"; then
411 if test "x$nan_type" = "xnone"; then
412 AC_CACHE_CHECK([whether NAN is defined by default],
419 static float foo = NAN;
427 [have_nan_default="yes"],
428 [have_nan_default="no"]
431 if test "x$have_nan_default" = "xyes"
436 if test "x$nan_type" = "xnone"; then
437 AC_CACHE_CHECK([whether NAN is defined by __USE_ISOC99],
443 #define __USE_ISOC99 1
445 static float foo = NAN;
453 [have_nan_isoc="yes"],
457 if test "x$have_nan_isoc" = "xyes"
462 if test "x$nan_type" = "xnone"; then
463 AC_CACHE_CHECK([whether NAN can be defined by 0/0],
473 #define NAN (0.0 / 0.0)
475 # define isnan(f) ((f) != (f))
477 static float foo = NAN;
485 [have_nan_zero="yes"],
489 if test "x$have_nan_zero" = "xyes"
495 if test "x$nan_type" = "xdefault"; then
496 AC_DEFINE(NAN_STATIC_DEFAULT, 1,
497 [Define if NAN is defined by default and can initialize static variables.])
498 else if test "x$nan_type" = "xisoc99"; then
499 AC_DEFINE(NAN_STATIC_ISOC, 1,
500 [Define if NAN is defined by __USE_ISOC99 and can initialize static variables.])
501 else if test "x$nan_type" = "xzero"; then
502 AC_DEFINE(NAN_ZERO_ZERO, 1,
503 [Define if NAN can be defined as (0.0 / 0.0)])
505 AC_MSG_ERROR([Didn't find out how to statically initialize variables to NAN. Sorry.])
508 AC_ARG_WITH(fp-layout, [AS_HELP_STRING([--with-fp-layout], [set the memory layout of doubles. For crosscompiling only.])],
510 if test "x$withval" = "xnothing"; then
511 fp_layout_type="nothing"
512 else if test "x$withval" = "xendianflip"; then
513 fp_layout_type="endianflip"
514 else if test "x$withval" = "xintswap"; then
515 fp_layout_type="intswap"
517 AC_MSG_ERROR([Invalid argument for --with-fp-layout. Valid arguments are: nothing, endianflip, intswap]);
520 [fp_layout_type="unknown"])
522 if test "x$fp_layout_type" = "xunknown"; then
523 AC_CACHE_CHECK([if doubles are stored in x86 representation],
524 [fp_layout_need_nothing],
540 memcpy ((void *) &i0, (void *) &d, 8);
543 memcpy ((void *) c, (void *) &i1, 8);
545 if ((c[0] == 0x2f) && (c[1] == 0x25)
546 && (c[2] == 0xc0) && (c[3] == 0xc7)
547 && (c[4] == 0x43) && (c[5] == 0x2b)
548 && (c[6] == 0x1f) && (c[7] == 0x5b))
553 [fp_layout_need_nothing="yes"],
554 [fp_layout_need_nothing="no"]
557 if test "x$fp_layout_need_nothing" = "xyes"; then
558 fp_layout_type="nothing"
561 if test "x$fp_layout_type" = "xunknown"; then
562 AC_CACHE_CHECK([if endianflip converts to x86 representation],
563 [fp_layout_need_endianflip],
571 #define endianflip(A) ((((uint64_t)(A) & 0xff00000000000000LL) >> 56) | \
572 (((uint64_t)(A) & 0x00ff000000000000LL) >> 40) | \
573 (((uint64_t)(A) & 0x0000ff0000000000LL) >> 24) | \
574 (((uint64_t)(A) & 0x000000ff00000000LL) >> 8) | \
575 (((uint64_t)(A) & 0x00000000ff000000LL) << 8) | \
576 (((uint64_t)(A) & 0x0000000000ff0000LL) << 24) | \
577 (((uint64_t)(A) & 0x000000000000ff00LL) << 40) | \
578 (((uint64_t)(A) & 0x00000000000000ffLL) << 56))
587 memcpy ((void *) &i0, (void *) &d, 8);
589 i1 = endianflip (i0);
590 memcpy ((void *) c, (void *) &i1, 8);
592 if ((c[0] == 0x2f) && (c[1] == 0x25)
593 && (c[2] == 0xc0) && (c[3] == 0xc7)
594 && (c[4] == 0x43) && (c[5] == 0x2b)
595 && (c[6] == 0x1f) && (c[7] == 0x5b))
600 [fp_layout_need_endianflip="yes"],
601 [fp_layout_need_endianflip="no"]
604 if test "x$fp_layout_need_endianflip" = "xyes"; then
605 fp_layout_type="endianflip"
608 if test "x$fp_layout_type" = "xunknown"; then
609 AC_CACHE_CHECK([if intswap converts to x86 representation],
610 [fp_layout_need_intswap],
618 #define intswap(A) ((((uint64_t)(A) & 0xffffffff00000000LL) >> 32) | \
619 (((uint64_t)(A) & 0x00000000ffffffffLL) << 32))
628 memcpy ((void *) &i0, (void *) &d, 8);
631 memcpy ((void *) c, (void *) &i1, 8);
633 if ((c[0] == 0x2f) && (c[1] == 0x25)
634 && (c[2] == 0xc0) && (c[3] == 0xc7)
635 && (c[4] == 0x43) && (c[5] == 0x2b)
636 && (c[6] == 0x1f) && (c[7] == 0x5b))
641 [fp_layout_need_intswap="yes"],
642 [fp_layout_need_intswap="no"]
645 if test "x$fp_layout_need_intswap" = "xyes"; then
646 fp_layout_type="intswap"
650 if test "x$fp_layout_type" = "xnothing"; then
651 AC_DEFINE(FP_LAYOUT_NEED_NOTHING, 1,
652 [Define if doubles are stored in x86 representation.])
653 else if test "x$fp_layout_type" = "xendianflip"; then
654 AC_DEFINE(FP_LAYOUT_NEED_ENDIANFLIP, 1,
655 [Define if endianflip is needed to convert to x86 representation.])
656 else if test "x$fp_layout_type" = "xintswap"; then
657 AC_DEFINE(FP_LAYOUT_NEED_INTSWAP, 1,
658 [Define if intswap is needed to convert to x86 representation.])
660 AC_MSG_ERROR([Didn't find out how doubles are stored in memory. Sorry.])
664 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
666 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
668 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
671 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
672 if test "x$have_getmntent" = "xno"; then
673 AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
675 if test "x$have_getmntent" = "xno"; then
676 AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
678 if test "x$have_getmntent" = "xno"; then
679 AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
682 if test "x$have_getmntent" = "xc"; then
683 AC_CACHE_CHECK([whether getmntent takes one argument],
684 [have_one_getmntent],
686 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
688 #include "$srcdir/src/utils_mount.h"]],
692 fh = setmntent ("/etc/mtab", "r");
696 [have_one_getmntent="yes"],
697 [have_one_getmntent="no"]
700 AC_CACHE_CHECK([whether getmntent takes two arguments],
701 [have_two_getmntent],
703 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
704 #include <sys/mnttab.h>
705 #include "$srcdir/src/utils_mount.h"]],
710 fh = fopen ("/etc/mnttab", "r");
711 status = getmntent (fh, &mt);
714 [have_two_getmntent="yes"],
715 [have_two_getmntent="no"]
720 # Check for different versions of `getmntent' here..
722 if test "x$have_getmntent" = "xc"; then
723 if test "x$have_one_getmntent" = "xyes"; then
724 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
725 [Define if the function getmntent exists and takes one argument.])
727 if test "x$have_two_getmntent" = "xyes"; then
728 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
729 [Define if the function getmntent exists and takes two arguments.])
732 if test "x$have_getmntent" = "xsun"; then
733 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
734 [Define if the function getmntent exists. It's the version from libsun.])
736 if test "x$have_getmntent" = "xseq"; then
737 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
738 [Define if the function getmntent exists. It's the version from libseq.])
740 if test "x$have_getmntent" = "xgen"; then
741 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
742 [Define if the function getmntent exists. It's the version from libgen.])
745 # Check for structures
746 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
747 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
750 #include <sys/types.h>
751 #include <sys/socket.h>
754 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
755 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
758 #include <sys/types.h>
759 #include <sys/socket.h>
760 #include <linux/if.h>
761 #include <linux/netdevice.h>
764 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
769 # include <sys/types.h>
771 #if HAVE_NETINET_IN_SYSTM_H
772 # include <netinet/in_systm.h>
774 #if HAVE_NETINET_IN_H
775 # include <netinet/in.h>
777 #if HAVE_NETINET_IP_H
778 # include <netinet/ip.h>
780 #if HAVE_NETINET_UDP_H
781 # include <netinet/udp.h>
784 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
789 # include <sys/types.h>
791 #if HAVE_NETINET_IN_SYSTM_H
792 # include <netinet/in_systm.h>
794 #if HAVE_NETINET_IN_H
795 # include <netinet/in.h>
797 #if HAVE_NETINET_IP_H
798 # include <netinet/ip.h>
800 #if HAVE_NETINET_UDP_H
801 # include <netinet/udp.h>
805 AC_CHECK_MEMBERS([kstat_io_t.nwritten, kstat_io_t.writes, kstat_io_t.nwrites, kstat_io_t.wtime],
815 AC_CHECK_LIB(resolv, res_search,
817 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
819 [with_libresolv="no"])
820 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
822 dnl Check for HAL (hardware abstraction library)
824 AC_CHECK_LIB(hal,libhal_device_property_exists,
825 [AC_DEFINE(HAVE_LIBHAL, 1, [Define to 1 if you have 'hal' library])],
827 if test "x$with_libhal" = "xyes"; then
829 if test "x$PKG_CONFIG" != "x"; then
830 BUILD_WITH_LIBHAL_CFLAGS="`pkg-config --cflags hal`"
831 BUILD_WITH_LIBHAL_LIBS="`pkg-config --libs hal`"
832 AC_SUBST(BUILD_WITH_LIBHAL_CFLAGS)
833 AC_SUBST(BUILD_WITH_LIBHAL_LIBS)
837 m4_divert_once([HELP_WITH], [
838 collectd additional packages:])
840 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
843 librrd_threadsafe="yes"
844 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
845 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
847 librrd_cflags="-I$withval/include"
848 librrd_ldflags="-L$withval/lib"
851 with_rrdtool="$withval"
853 ], [with_rrdtool="yes"])
854 if test "x$with_rrdtool" = "xyes"
856 SAVE_CPPFLAGS="$CPPFLAGS"
857 SAVE_LDFLAGS="$LDFLAGS"
859 CPPFLAGS="$CPPFLAGS $librrd_cflags"
860 LDFLAGS="$LDFLAGS $librrd_ldflags"
862 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
864 CPPFLAGS="$SAVE_CPPFLAGS"
865 LDFLAGS="$SAVE_LDFLAGS"
867 if test "x$with_rrdtool" = "xyes"
869 SAVE_CPPFLAGS="$CPPFLAGS"
870 SAVE_LDFLAGS="$LDFLAGS"
872 CPPFLAGS="$CPPFLAGS $librrd_cflags"
873 LDFLAGS="$LDFLAGS $librrd_ldflags"
875 AC_CHECK_LIB(rrd_th, rrd_update_r,
877 librrd_ldflags="$librrd_ldflags -lrrd_th -lm"
879 [librrd_threadsafe="no"
880 AC_CHECK_LIB(rrd, rrd_update,
882 librrd_ldflags="$librrd_ldflags -lrrd -lm"
884 [with_rrdtool="no (symbol 'rrd_update' not found)"],
889 CPPFLAGS="$SAVE_CPPFLAGS"
890 LDFLAGS="$SAVE_LDFLAGS"
892 if test "x$with_rrdtool" = "xyes"
894 BUILD_WITH_LIBRRD_CFLAGS="$librrd_cflags"
895 BUILD_WITH_LIBRRD_LDFLAGS="$librrd_ldflags"
896 AC_SUBST(BUILD_WITH_LIBRRD_CFLAGS)
897 AC_SUBST(BUILD_WITH_LIBRRD_LDFLAGS)
899 if test "x$librrd_threadsafe" = "xyes"
901 AC_DEFINE(HAVE_THREADSAFE_LIBRRD, 1, [Define to 1 if you have the threadsafe rrd library (-lrrd_th).])
904 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
905 [ if test "x$withval" != "xno" -a "x$withval" != "xyes"
907 LDFLAGS="$LDFLAGS -L$withval/lib"
908 CPPFLAGS="$CPPFLAGS -I$withval/include"
909 with_libpthread="yes"
911 if test "x$withval" = "xno"
913 with_libpthread="no (disabled)"
916 ], [with_libpthread="yes"])
917 if test "x$with_libpthread" = "xyes"
919 AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
921 if test "x$with_libpthread" = "xyes"
923 AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
925 if test "x$with_libpthread" = "xyes"
931 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
932 [Wether or not to use pthread (POSIX threads) library])
933 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
935 if test "x$ac_system" = "xSolaris"
940 with_kstat="no (Solaris only)"
941 with_devinfo="no (Solaris only)"
944 if test "x$with_kstat" = "xyes"
946 AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
948 if test "x$with_kstat" = "xyes"
950 AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
951 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
953 if test "x$with_kstat" = "xyes"
955 AC_DEFINE(HAVE_LIBKSTAT, 1,
956 [Define to 1 if you have the 'kstat' library (-lkstat)])
958 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
959 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
961 ### BEGIN of check for libcurl ###
962 with_curl_config="curl-config"
965 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
967 if test "x$withval" = "xno"
970 else if test "x$withval" = "xyes"
974 if test -f "$withval" && test -x "$withval"
976 with_curl_config="$withval"
978 else if test -x "$withval/bin/curl-config"
980 with_curl_config="$withval/bin/curl-config"
989 if test "x$with_libcurl" = "xyes"
991 with_curl_cflags=`$with_curl_config --cflags 2>/dev/null`
992 curl_config_status=$?
994 if test $curl_config_status -ne 0
996 with_libcurl="no ($with_curl_config failed)"
999 CFLAGS="$CFLAGS $with_curl_cflags"
1001 AC_CHECK_HEADERS(curl/curl.h, [], [with_libcurl="no (curl/curl.h not found)"], [])
1003 CFLAGS="$SAVE_CFLAGS"
1006 if test "x$with_libcurl" = "xyes"
1008 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
1009 curl_config_status=$?
1011 if test $curl_config_status -ne 0
1013 with_libcurl="no ($with_curl_config failed)"
1015 AC_CHECK_LIB(curl, curl_easy_init,
1016 [with_libcurl="yes"],
1017 [with_libcurl="no (symbol 'curl_easy_init' not found)"],
1021 if test "x$with_libcurl" = "xyes"
1023 BUILD_WITH_LIBCURL_CFLAGS="$with_curl_cflags"
1024 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
1025 AC_SUBST(BUILD_WITH_LIBCURL_CFLAGS)
1026 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
1028 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
1029 ### END of check for libcurl ###
1033 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
1042 AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
1043 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
1045 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
1047 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1049 LDFLAGS="$LDFLAGS -L$withval/lib"
1050 CPPFLAGS="$CPPFLAGS -I$withval/include"
1051 with_libstatgrab="yes"
1053 with_libstatgrab="$withval"
1057 if test "x$ac_system" == "xunknown"
1059 with_libstatgrab="yes"
1061 with_libstatgrab="no"
1064 if test "x$with_libstatgrab" = "xyes"
1066 AC_CHECK_LIB(statgrab, sg_init, [with_libstatgrab="yes"], [with_libstatgrab="no (libstatgrab not found)"])
1068 if test "x$with_libstatgrab" = "xyes"
1070 AC_CHECK_HEADERS(statgrab.h,, [with_libstatgrab="no (statgrab.h not found)"])
1072 if test "x$with_libstatgrab" = "xyes"
1074 AC_CHECK_LIB(devstat, getdevs, [with_libdevstat="yes"], [with_libdevstat="no"])
1076 if test "x$with_libstatgrab" = "xyes"
1078 collect_libstatgrab=1
1080 collect_libstatgrab=0
1082 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
1083 [Wether or not to use statgrab library])
1084 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
1085 AM_CONDITIONAL(BUILD_WITH_LIBDEVSTAT, test "x$with_libdevstat" = "xyes")
1087 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
1088 if test "x$with_libkvm" = "xyes"
1090 AC_DEFINE(HAVE_LIBKVM, 1, [Define to 1 if you have the 'kvm' library (-lkvm)])
1092 AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes")
1094 with_sensors_cflags=""
1095 with_sensors_ldflags=""
1096 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
1098 if test "x$withval" = "xno"
1100 with_lm_sensors="no"
1102 with_lm_sensors="yes"
1103 if test "x$withval" != "xyes"
1105 with_sensors_cflags="-I$withval/include"
1106 with_sensors_ldflags="-L$withval/lib"
1107 with_lm_sensors="yes"
1112 if test "x$ac_system" = "xLinux"
1114 with_lm_sensors="yes"
1116 with_lm_sensors="no (Linux only library)"
1119 if test "x$with_lm_sensors" = "xyes"
1121 SAVE_CPPFLAGS="$CPPFLAGS"
1122 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1124 # AC_CHECK_HEADERS(sensors/sensors.h,
1126 # AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
1128 # [with_lm_sensors="no (sensors/sensors.h not found)"])
1129 AC_CHECK_HEADERS(sensors/sensors.h, [], [with_lm_sensors="no (sensors/sensors.h not found)"])
1131 CPPFLAGS="$SAVE_CPPFLAGS"
1133 if test "x$with_lm_sensors" = "xyes"
1135 SAVE_CPPFLAGS="$CPPFLAGS"
1136 SAVE_LDFLAGS="$LDFLAGS"
1137 CPPFLAGS="$CPPFLAGS $with_sensors_cflags"
1138 LDFLAGS="$LDFLAGS $with_sensors_ldflags"
1140 AC_CHECK_LIB(sensors, sensors_init,
1142 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
1144 [with_lm_sensors="no (libsensors not found)"])
1146 CPPFLAGS="$SAVE_CPPFLAGS"
1147 LDFLAGS="$SAVE_LDFLAGS"
1149 if test "x$with_lm_sensors" = "xyes"
1151 BUILD_WITH_LIBSENSORS_CFLAGS="$with_sensors_cflags"
1152 BUILD_WITH_LIBSENSORS_LDFLAGS="$with_sensors_ldflags"
1153 AC_SUBST(BUILD_WITH_LIBSENSORS_CFLAGS)
1154 AC_SUBST(BUILD_WITH_LIBSENSORS_LDFLAGS)
1156 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
1158 with_mysql_config="mysql_config"
1159 with_mysql_cflags=""
1161 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
1163 if test "x$withval" = "xno"
1166 else if test "x$withval" = "xyes"
1170 if test -f "$withval" && test -x "$withval";
1172 with_mysql_config="$withval"
1173 else if test -x "$withval/bin/mysql_config"
1175 with_mysql_config="$withval/bin/mysql_config"
1183 if test "x$with_libmysql" = "xyes"
1185 with_mysql_cflags=`$with_mysql_config --cflags 2>/dev/null`
1186 mysql_config_status=$?
1188 if test $mysql_config_status -ne 0
1193 CFLAGS="$CFLAGS $with_mysql_cflags"
1195 AC_CHECK_HEADERS(mysql/mysql.h, [], [with_libmysql="no (mysql/mysql.h not found)"], [])
1197 CFLAGS="$SAVE_CFLAGS"
1200 if test "x$with_libmysql" = "xyes"
1202 with_mysql_libs=`$with_mysql_config --libs 2>/dev/null`
1203 mysql_config_status=$?
1205 if test $mysql_config_status -ne 0
1209 AC_CHECK_LIB(mysqlclient, mysql_init,
1210 [with_libmysql="yes"],
1211 [with_libmysql="no (symbol 'mysql_init' not found)"],
1215 if test "x$with_libmysql" = "xyes"
1217 BUILD_WITH_LIBMYSQL_CFLAGS="$with_mysql_cflags"
1218 BUILD_WITH_LIBMYSQL_LIBS="$with_mysql_libs"
1219 AC_SUBST(BUILD_WITH_LIBMYSQL_CFLAGS)
1220 AC_SUBST(BUILD_WITH_LIBMYSQL_LIBS)
1222 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
1224 with_own_liboconfig="no"
1225 liboconfig_LDFLAGS="$LDFLAGS"
1226 liboconfig_CPPFLAGS="$CPPFLAGS"
1227 AC_ARG_WITH(liboconfig, [AS_HELP_STRING([--with-liboconfig@<:@=PREFIX@:>@], [Path to liboconfig.])],
1229 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1231 if test -d "$withval/lib"
1233 liboconfig_LDFLAGS="$LDFLAGS -L$withval/lib"
1235 if test -d "$withval/include"
1237 liboconfig_CPPFLAGS="$CPPFLAGS -I$withval/include"
1240 if test "x$withval" = "xno"
1242 AC_MSG_ERROR("liboconfig is required")
1246 with_liboconfig="yes"
1249 save_LDFLAGS="$LDFLAGS"
1250 save_CPPFLAGS="$CPPFLAGS"
1251 LDFLAGS="$liboconfig_LDFLAGS"
1252 CPPFLAGS="$liboconfig_CPPFLAGS"
1253 AC_CHECK_LIB(oconfig, oconfig_parse_fh,
1255 with_liboconfig="yes"
1256 with_own_liboconfig="no"
1259 with_liboconfig="yes"
1260 with_own_liboconfig="yes"
1261 LDFLAGS="$save_LDFLAGS"
1262 CPPFLAGS="$save_CPPFLAGS"
1265 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOCONFIG, test "x$with_own_liboconfig" = "xyes")
1266 if test "x$with_own_liboconfig" = "xyes"
1268 with_liboconfig="yes (shipped version)"
1271 #with_liboping="yes"
1272 with_own_liboping="no"
1273 liboping_LDFLAGS="$LDFLAGS"
1274 liboping_CPPFLAGS="$CPPFLAGS"
1275 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
1277 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1279 if test -d "$withval/lib"
1281 liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
1283 if test -d "$withval/include"
1285 liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
1288 if test "x$withval" = "xno"
1291 with_own_liboping="no"
1292 else if test "x$withval" = "xyes"
1301 if test "x$with_liboping" = "xyes"
1303 save_LDFLAGS="$LDFLAGS"
1304 save_CPPFLAGS="$CPPFLAGS"
1305 LDFLAGS="$liboping_LDFLAGS"
1306 CPPFLAGS="$liboping_CPPFLAGS"
1307 AC_CHECK_LIB(oping, ping_construct,
1310 with_own_liboping="no"
1314 with_own_liboping="yes"
1315 LDFLAGS="$save_LDFLAGS"
1316 CPPFLAGS="$save_CPPFLAGS"
1319 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
1320 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
1322 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
1324 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1326 LDFLAGS="$LDFLAGS -L$withval/lib"
1327 CPPFLAGS="$CPPFLAGS -I$withval/include"
1330 with_libpcap="$withval"
1336 if test "x$with_libpcap" = "xyes"
1338 AC_CHECK_LIB(pcap, pcap_open_live,
1340 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
1341 ], [with_libpcap="no (libpcap not found)"])
1343 if test "x$with_libpcap" = "xyes"
1345 AC_CHECK_HEADERS(pcap.h,
1347 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
1348 ], [with_libpcap="no (pcap.h not found)"])
1350 if test "x$with_libpcap" = "xyes"
1356 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
1357 [Wether or not to use the pcap library])
1358 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
1360 perl_interpreter="perl"
1361 AC_ARG_WITH(libperl, [AS_HELP_STRING([--with-libperl@<:@=PREFIX@:>@], [Path to libperl.])],
1363 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1365 LDFLAGS="$LDFLAGS -L$withval/lib"
1366 CPPFLAGS="$CPPFLAGS -I$withval/include"
1367 perl_interpreter="$withval/bin/perl"
1370 with_libperl="$withval"
1377 AC_SUBST(PERL, "$perl_interpreter")
1379 if test "x$with_libperl" = "xyes"
1382 SAVE_LDFLAGS=$LDFLAGS
1383 PERL_CFLAGS=`$perl_interpreter -MExtUtils::Embed -e ccopts`
1384 PERL_LDFLAGS=`$perl_interpreter -MExtUtils::Embed -e ldopts`
1385 CFLAGS="$CFLAGS $PERL_CFLAGS"
1386 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1388 AC_CACHE_CHECK([for libperl],
1398 PerlInterpreter *perl = NULL;
1399 Perl_load_module (perl, PERL_LOADMOD_NOIMPORT,
1400 newSVpv ("Collectd::Plugin::FooBar", 24),
1403 [have_libperl="yes"],
1408 if test "x$have_libperl" = "xyes"
1410 AC_DEFINE(HAVE_LIBPERL, 1, [Define if libperl is present and usable.])
1411 AC_SUBST(PERL_CFLAGS)
1412 AC_SUBST(PERL_LDFLAGS)
1418 LDFLAGS=$SAVE_LDFLAGS
1420 AM_CONDITIONAL(BUILD_WITH_LIBPERL, test "x$with_libperl" = "xyes")
1422 if test "x$with_libperl" = "xyes"
1425 SAVE_LDFLAGS=$LDFLAGS
1426 CFLAGS="$CFLAGS $PERL_CFLAGS"
1427 LDFLAGS="$LDFLAGS $PERL_LDFLAGS"
1429 AC_CACHE_CHECK([if perl supports ithreads],
1430 [have_perl_ithreads],
1438 #if !defined(USE_ITHREADS)
1439 # error "Perl does not support ithreads!"
1440 #endif /* !defined(USE_ITHREADS) */
1443 [have_perl_ithreads="yes"],
1444 [have_perl_ithreads="no"]
1448 if test "x$have_perl_ithreads" = "xyes"
1450 AC_DEFINE(HAVE_PERL_ITHREADS, 1, [Define if Perl supports ithreads.])
1454 LDFLAGS=$SAVE_LDFLAGS
1457 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
1459 if test "x$withval" != "xno" && test "x$withval" != "xyes"
1461 LDFLAGS="$LDFLAGS -L$withval/lib"
1462 CPPFLAGS="$CPPFLAGS -I$withval/include"
1465 with_libiptc="$withval"
1469 if test "x$ac_system" = "xLinux"
1473 with_libiptc="no (Linux only)"
1476 if test "x$with_libiptc" = "xyes"
1478 AC_CHECK_LIB(iptc, iptc_init,
1480 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
1481 ], [with_libiptc="no (libiptc not found)"])
1483 if test "x$with_libiptc" = "xyes"
1485 AC_CHECK_HEADERS(libiptc/libiptc.h,
1487 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
1488 ], [with_libiptc="no (libiptc/libiptc.h not found)"])
1490 if test "x$with_libiptc" = "xyes"
1496 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
1498 with_snmp_config="net-snmp-config"
1501 AC_ARG_WITH(libnetsnmp, [AS_HELP_STRING([--with-libnetsnmp@<:@=PREFIX@:>@], [Path to the Net-SNMPD library.])],
1503 if test "x$withval" = "xno"
1505 with_libnetsnmp="no"
1506 else if test "x$withval" = "xyes"
1508 with_libnetsnmp="yes"
1510 if test -x "$withval"
1512 with_snmp_config="$withval"
1513 with_libnetsnmp="yes"
1515 with_snmp_config="$withval/bin/net-snmp-config"
1516 with_libnetsnmp="yes"
1520 [with_libnetsnmp="yes"])
1521 if test "x$with_libnetsnmp" = "xyes"
1523 with_snmp_cflags=`$with_snmp_config --cflags 2>/dev/null`
1524 snmp_config_status=$?
1526 if test $snmp_config_status -ne 0
1528 with_libnetsnmp="no ($with_snmp_config failed)"
1531 CFLAGS="$CFLAGS $with_snmp_cflags"
1533 AC_CHECK_HEADERS(net-snmp/net-snmp-config.h, [], [with_libnetsnmp="no (net-snmp/net-snmp-config.h not found)"])
1535 CFLAGS="$SAVE_CFLAGS"
1538 if test "x$with_libnetsnmp" = "xyes"
1540 with_snmp_libs=`$with_snmp_config --libs 2>/dev/null`
1541 snmp_config_status=$?
1543 if test $snmp_config_status -ne 0
1545 with_libnetsnmp="no ($with_snmp_config failed)"
1547 AC_CHECK_LIB(netsnmp, init_snmp,
1548 [with_libnetsnmp="yes"],
1549 [with_libnetsnmp="no (libnetsnmp not found)"],
1553 if test "x$with_libnetsnmp" = "xyes"
1555 BUILD_WITH_LIBSNMP_CFLAGS="$with_snmp_cflags"
1556 BUILD_WITH_LIBSNMP_LIBS="$with_snmp_libs"
1557 AC_SUBST(BUILD_WITH_LIBSNMP_CFLAGS)
1558 AC_SUBST(BUILD_WITH_LIBSNMP_LIBS)
1560 AM_CONDITIONAL(BUILD_WITH_LIBNETSNMP, test "x$with_libnetsnmp" = "xyes")
1562 with_upsclient_config="libupsclient-config"
1563 with_upsclient_cflags=""
1564 with_upsclient_libs=""
1565 AC_ARG_WITH(libupsclient, [AS_HELP_STRING([--with-libupsclient@<:@=PREFIX@:>@], [Path to libupsclient.])],
1567 if test "x$withval" = "xno"
1569 with_libupsclient="no"
1571 if test "x$withval" != "xyes"
1573 if test -f "$withval" && test -x "$withval";
1575 with_upsclient_config="$withval"
1577 with_upsclient_config="$withval/bin/libupsclient-config"
1580 with_libupsclient="yes"
1584 with_libupsclient="yes"
1586 if test "x$with_libupsclient" = "xyes"
1588 with_upsclient_cflags=`$with_upsclient_config --cflags 2>/dev/null`
1589 upsclient_config_status=$?
1591 if test $upsclient_config_status -ne 0
1593 with_libupsclient="no ($with_upsclient_config failed)"
1596 if test "x$with_libupsclient" = "xyes"
1598 SAVE_CFLAGS="$CFLAGS"
1599 CFLAGS="$CFLAGS $with_upsclient_cflags"
1601 AC_CHECK_HEADERS(upsclient.h, [], [with_libupsclient="no (upsclient.h not found)"])
1603 CFLAGS="$SAVE_CFLAGS"
1605 if test "x$with_libupsclient" = "xyes"
1607 with_upsclient_libs=`$with_upsclient_config --libs 2>/dev/null`
1608 upsclient_config_status=$?
1610 if test $upsclient_config_status -ne 0
1612 with_libupsclient="no ($with_upsclient_config failed)"
1615 if test "x$with_libupsclient" = "xyes"
1617 AC_CHECK_LIB(upsclient, upscli_connect,
1619 BUILD_WITH_LIBUPSCLIENT_CFLAGS="$with_upsclient_cflags"
1620 BUILD_WITH_LIBUPSCLIENT_LIBS="$with_upsclient_libs"
1621 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_CFLAGS)
1622 AC_SUBST(BUILD_WITH_LIBUPSCLIENT_LIBS)
1625 with_libupsclient="no (symbol 'upscli_connect' not found)"
1626 ], [$with_upsclient_libs])
1628 if test "x$with_libupsclient" = "xyes"
1630 AC_CHECK_TYPES([UPSCONN_t, UPSCONN], [], [],
1631 [#include <stdlib.h>
1633 #include <upsclient.h>])
1635 AM_CONDITIONAL(BUILD_WITH_LIBUPSCLIENT, test "x$with_libupsclient" = "xyes")
1637 ### BEGIN of check for libxmms ###
1638 with_xmms_config="xmms-config"
1641 AC_ARG_WITH(libxmms, [AS_HELP_STRING([--with-libxmms@<:@=PREFIX@:>@], [Path to libxmms.])],
1643 if test "x$withval" != "xno" -a "x$withval" != "xyes"
1645 if test -f "$withval" && test -x "$withval";
1647 with_xmms_config="$withval"
1648 else if test -x "$withval/bin/xmms-config"
1650 with_xmms_config="$withval/bin/xmms-config"
1653 else if test "x$withval" = "xno"
1663 if test "x$with_libxmms" = "xyes"
1665 with_xmms_cflags=`$with_xmms_config --cflags 2>/dev/null`
1666 xmms_config_status=$?
1668 if test $xmms_config_status -ne 0
1673 if test "x$with_libxmms" = "xyes"
1675 with_xmms_libs=`$with_xmms_config --libs 2>/dev/null`
1676 xmms_config_status=$?
1678 if test $xmms_config_status -ne 0
1683 if test "x$with_libxmms" = "xyes"
1685 AC_CHECK_LIB(xmms, xmms_remote_get_info,
1687 BUILD_WITH_LIBXMMS_CFLAGS="$with_xmms_cflags"
1688 BUILD_WITH_LIBXMMS_LIBS="$with_xmms_libs"
1689 AC_SUBST(BUILD_WITH_LIBXMMS_CFLAGS)
1690 AC_SUBST(BUILD_WITH_LIBXMMS_LIBS)
1697 with_libxmms_numeric=0
1698 if test "x$with_libxmms" = "xyes"
1700 with_libxmms_numeric=1
1702 AC_DEFINE_UNQUOTED(HAVE_LIBXMMS, [$with_libxmms_numeric], [Define to 1 if you have the 'xmms' library (-lxmms).])
1703 AM_CONDITIONAL(BUILD_WITH_LIBXMMS, test "x$with_libxmms" = "xyes")
1704 ### END of check for libxmms ###
1706 with_libnetlink_cflags=""
1707 with_libnetlink_libs="-lnetlink"
1708 AC_ARG_WITH(libnetlink, [AS_HELP_STRING([--with-libnetlink@<:@=PREFIX@:>@], [Path to libnetlink.])],
1710 echo "libnetlink: withval = $withval"
1711 if test "x$withval" = "xyes"
1713 with_libnetlink="yes"
1714 else if test "x$withval" = "xno"
1716 with_libnetlink="no"
1718 if test -d "$withval/include"
1720 with_libnetlink_cflags="-I$withval/include"
1721 with_libnetlink_libs="-L$withval/lib -lnetlink"
1722 with_libnetlink="yes"
1724 AC_MSG_ERROR("no such directory: $withval/include")
1729 if test "x$ac_system" = "xLinux"
1731 with_libnetlink="yes"
1733 with_libnetlink="no (Linux only library)"
1736 if test "x$with_libnetlink" = "xyes"
1739 CFLAGS="$CFLAGS $with_libnetlink_cflags"
1741 with_libnetlink="no (libnetlink.h not found)"
1743 AC_CHECK_HEADERS(libnetlink.h iproute/libnetlink.h linux/libnetlink.h,
1745 with_libnetlink="yes"
1749 #include <sys/types.h>
1750 #include <asm/types.h>
1751 #include <sys/socket.h>
1752 #include <linux/netlink.h>
1753 #include <linux/rtnetlink.h>])
1754 AC_CHECK_HEADERS(linux/gen_stats.h linux/pkt_sched.h, [], [],
1756 #include <sys/types.h>
1757 #include <asm/types.h>
1758 #include <sys/socket.h>])
1762 #include <sys/types.h>
1763 #include <asm/types.h>
1764 #include <sys/socket.h>
1765 #include <linux/netlink.h>
1766 #include <linux/rtnetlink.h>
1770 int retval = TCA_STATS2;
1773 [AC_DEFINE([HAVE_TCA_STATS2], 1, [True if the enum-member TCA_STATS2 exists])]
1778 #include <sys/types.h>
1779 #include <asm/types.h>
1780 #include <sys/socket.h>
1781 #include <linux/netlink.h>
1782 #include <linux/rtnetlink.h>
1786 int retval = TCA_STATS;
1789 [AC_DEFINE([HAVE_TCA_STATS], 1, [True if the enum-member TCA_STATS exists])]
1792 CFLAGS="$SAVE_CFLAGS"
1794 if test "x$with_libnetlink" = "xyes"
1796 AC_CHECK_LIB(netlink, rtnl_open,
1797 [with_libnetlink="yes"],
1798 [with_libnetlink="no (symbol 'rtnl_open' not found)"],
1799 [$with_libnetlink_libs])
1801 if test "x$with_libnetlink" = "xyes"
1803 BUILD_WITH_LIBNETLINK_CFLAGS="$with_libnetlink_cflags"
1804 BUILD_WITH_LIBNETLINK_LIBS="$with_libnetlink_libs"
1805 AC_SUBST(BUILD_WITH_LIBNETLINK_CFLAGS)
1806 AC_SUBST(BUILD_WITH_LIBNETLINK_LIBS)
1808 AM_CONDITIONAL(BUILD_WITH_LIBNETLINK, test "x$with_libnetlink" = "xyes")
1810 dnl Check for libvirt and libxml2 libraries.
1811 with_libxml2="no (pkg-config isn't available)"
1812 with_libxml2_cflags=""
1813 with_libxml2_ldflags=""
1814 with_libvirt="no (pkg-config isn't available)"
1815 with_libvirt_cflags=""
1816 with_libvirt_ldflags=""
1818 if test "x$PKG_CONFIG" != "x"
1820 pkg-config --exists 'libxml-2.0' 2>/dev/null
1825 with_libxml2="no (pkg-config doesn't know library)"
1828 pkg-config --exists libvirt 2>/dev/null
1833 with_libvirt="no (pkg-config doesn't know library)"
1836 if test "x$with_libxml2" = "xyes"
1838 with_libxml2_cflags="`pkg-config --cflags libxml-2.0`"
1843 with_libxml2_ldflags="`pkg-config --libs libxml-2.0`"
1849 if test "x$with_libxml2" = "xyes"
1851 SAVE_CPPFLAGS="$CPPFLAGS"
1852 CPPFLAGS="$CPPFLAGS $with_libxml2_cflags"
1854 AC_CHECK_HEADERS(libxml/parser.h, [],
1855 [with_libxml2="no (libxml/parser.h not found)"])
1857 CPPFLAGS="$SAVE_CPPFLAGS"
1859 if test "x$with_libxml2" = "xyes"
1861 SAVE_CFLAGS="$CFLAGS"
1862 SAVE_LD_FLAGS="$LDFLAGS"
1864 CFLAGS="$CFLAGS $with_libxml2_cflags"
1865 LDFLAGS="$LDFLAGS $with_libxml2_ldflags"
1867 AC_CHECK_LIB(xml2, xmlXPathEval,
1868 [with_libxml2="yes"],
1869 [with_libxml2="no (symbol xmlXPathEval not found)"])
1871 CFLAGS="$SAVE_CFLAGS"
1872 LDFLAGS="$SAVE_LDFLAGS"
1874 dnl Add the right compiler flags and libraries.
1875 if test "x$with_libxml2" = "xyes"; then
1876 BUILD_WITH_LIBXML2_CFLAGS="$with_libxml2_cflags"
1877 BUILD_WITH_LIBXML2_LIBS="$with_libxml2_ldflags"
1878 AC_SUBST(BUILD_WITH_LIBXML2_CFLAGS)
1879 AC_SUBST(BUILD_WITH_LIBXML2_LIBS)
1881 if test "x$with_libvirt" = "xyes"
1883 with_libvirt_cflags="`pkg-config --cflags libvirt`"
1888 with_libvirt_ldflags="`pkg-config --libs libvirt`"
1894 if test "x$with_libvirt" = "xyes"
1896 SAVE_CPPFLAGS="$CPPFLAGS"
1897 CPPFLAGS="$CPPFLAGS $with_libvirt_cflags"
1899 AC_CHECK_HEADERS(libvirt/libvirt.h, [],
1900 [with_libvirt="no (libvirt/libvirt.h not found)"])
1902 CPPFLAGS="$SAVE_CPPFLAGS"
1904 if test "x$with_libvirt" = "xyes"
1906 SAVE_CFLAGS="$CFLAGS"
1907 SAVE_LD_FLAGS="$LDFLAGS"
1909 CFLAGS="$CFLAGS $with_libvirt_cflags"
1910 LDFLAGS="$LDFLAGS $with_libvirt_ldflags"
1912 AC_CHECK_LIB(virt, virDomainBlockStats,
1913 [with_libvirt="yes"],
1914 [with_libvirt="no (symbol virDomainBlockStats not found)"])
1916 CFLAGS="$SAVE_CFLAGS"
1917 LDFLAGS="$SAVE_LDFLAGS"
1919 dnl Add the right compiler flags and libraries.
1920 if test "x$with_libvirt" = "xyes"; then
1921 BUILD_WITH_LIBVIRT_CFLAGS="$with_libvirt_cflags"
1922 BUILD_WITH_LIBVIRT_LIBS="$with_libvirt_ldflags"
1923 AC_SUBST(BUILD_WITH_LIBVIRT_CFLAGS)
1924 AC_SUBST(BUILD_WITH_LIBVIRT_LIBS)
1927 dnl End of check for libvirt and libxml2 libraries.
1929 # Check for enabled/disabled features
1932 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
1933 # ------------------------------------------------------------
1935 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
1940 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
1945 m4_define([EnDis],[disabled])dnl
1946 m4_define([YesNo],[no])dnl
1952 m4_define([EnDis],[enabled])dnl
1953 m4_define([YesNo],[yes])dnl
1956 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
1960 m4_if([$3], [feature], [],
1964 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
1970 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
1972 enable_$1='[YesNo]'dnl
1974 if test "x$enable_$1" = "xno"
1978 if test "x$enable_$1" = "xyes"
1982 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
1987 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
1988 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
1990 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
1992 # AC_PLUGIN(name, default, info)
1993 # ------------------------------------------------------------
1999 AC_ARG_ENABLE([$1], AC_HELP_STRING([--enable-$1], [$3]),
2001 if test "x$enableval" = "xyes"
2009 if test "x$2" = "xyes"
2016 if test "x$enable_plugin" = "xyes"
2018 AC_DEFINE([HAVE_PLUGIN_]my_toupper([$1]), 1, [Define to 1 if the $1 plugin is enabled.])
2020 AM_CONDITIONAL([BUILD_PLUGIN_]my_toupper([$1]), test "x$enable_plugin" = "xyes")
2021 enable_$1="$enable_plugin"
2023 )# AC_PLUGIN(name, default, info)
2025 m4_divert_once([HELP_ENABLE], [
2026 collectd features:])
2027 # FIXME: Remove these calls to `AC_COLLECTD' and then remove that macro.
2028 AC_COLLECTD([debug], [enable], [feature], [debugging])
2029 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
2030 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
2038 plugin_interface="no"
2044 plugin_multimeter="no"
2047 plugin_processes="no"
2051 plugin_tcpconns="no"
2055 plugin_wireless="no"
2058 if test "x$ac_system" = "xLinux"
2060 plugin_battery="yes"
2062 plugin_cpufreq="yes"
2064 plugin_entropy="yes"
2065 plugin_interface="yes"
2070 plugin_processes="yes"
2073 plugin_tcpconns="yes"
2075 plugin_vserver="yes"
2076 plugin_wireless="yes"
2078 if test "x$have_net_ip_vs_h" = "xyes" -o "x$have_ip_vs_h" = "xyes"
2085 if test "x$with_libiokit" = "xyes"
2087 plugin_battery="yes"
2092 if test "x$with_devinfo$with_kstat" = "xyesyes"
2096 plugin_interface="yes"
2103 if test "x$with_libstatgrab" = "xyes"
2105 plugin_interface="yes"
2111 if test "x$have_processor_info" = "xyes"
2115 if test "x$have_sysctlbyname" = "xyes"
2119 plugin_tcpconns="yes"
2122 if test "x$have_statfs" = "xyes"
2126 if test "x$have_statvfs" = "xyes"
2131 if test "x$have_getifaddrs" = "xyes"
2133 plugin_interface="yes"
2136 if test "x$with_libxml2" = "xyes" && test "x$with_libvirt" = "xyes"
2138 plugin_libvirt="yes"
2141 if test "x$have_getloadavg" = "xyes"
2146 if test "x$have_libperl$have_perl_ithreads" = "xyesyes"
2151 # Mac OS X memory interface
2152 if test "x$have_host_statistics" = "xyes"
2157 if test "x$have_termios_h" = "xyes"
2159 plugin_multimeter="yes"
2162 if test "x$have_thread_info" = "xyes"
2164 plugin_processes="yes"
2167 if test "x$with_libkvm" = "xyes"
2172 if test "x$have_getutent" = "xyes"
2176 if test "x$have_getutxent" = "xyes"
2181 # FIXME: sysctl for swap plugin
2183 m4_divert_once([HELP_ENABLE], [
2186 AC_PLUGIN([apache], [$with_libcurl], [Apache httpd statistics])
2187 AC_PLUGIN([apcups], [yes], [Statistics of UPSes by APC])
2188 AC_PLUGIN([apple_sensors], [$with_libiokit], [Apple's hardware sensors])
2189 AC_PLUGIN([battery], [$plugin_battery], [Battery statistics])
2190 AC_PLUGIN([cpu], [$plugin_cpu], [CPU usage statistics])
2191 AC_PLUGIN([cpufreq], [$plugin_cpufreq], [CPU frequency statistics])
2192 AC_PLUGIN([csv], [yes], [CSV output plugin])
2193 AC_PLUGIN([df], [$plugin_df], [Filesystem usage statistics])
2194 AC_PLUGIN([disk], [$plugin_disk], [Disk usage statistics])
2195 AC_PLUGIN([dns], [$with_libpcap], [DNS traffic analysis])
2196 AC_PLUGIN([email], [yes], [EMail statistics])
2197 AC_PLUGIN([entropy], [$plugin_entropy], [Entropy statistics])
2198 AC_PLUGIN([exec], [yes], [Execution of external programs])
2199 AC_PLUGIN([hddtemp], [yes], [Query hddtempd])
2200 AC_PLUGIN([interface], [$plugin_interface], [Interface traffic statistics])
2201 AC_PLUGIN([iptables], [$with_libiptc], [IPTables rule counters])
2202 AC_PLUGIN([ipvs], [$plugin_ipvs], [IPVS connection statistics])
2203 AC_PLUGIN([irq], [$plugin_irq], [IRQ statistics])
2204 AC_PLUGIN([libvirt], [$plugin_libvirt], [Virtual machine statistics])
2205 AC_PLUGIN([load], [$plugin_load], [System load])
2206 AC_PLUGIN([logfile], [yes], [File logging plugin])
2207 AC_PLUGIN([mbmon], [yes], [Query mbmond])
2208 AC_PLUGIN([memcached], [yes], [memcached statistics])
2209 AC_PLUGIN([memory], [$plugin_memory], [Memory usage])
2210 AC_PLUGIN([multimeter], [$plugin_multimeter], [Read multimeter values])
2211 AC_PLUGIN([mysql], [$with_libmysql], [MySQL statistics])
2212 AC_PLUGIN([netlink], [$with_libnetlink], [Enhanced Linux network statistics])
2213 AC_PLUGIN([network], [yes], [Network communication plugin])
2214 AC_PLUGIN([nfs], [$plugin_nfs], [NFS statistics])
2215 AC_PLUGIN([nginx], [$with_libcurl], [nginx statistics])
2216 AC_PLUGIN([ntpd], [yes], [NTPd statistics])
2217 AC_PLUGIN([nut], [$with_libupsclient], [Network UPS tools statistics])
2218 AC_PLUGIN([perl], [$plugin_perl], [Embed a Perl interpreter])
2219 AC_PLUGIN([ping], [$with_liboping], [Network latency statistics])
2220 AC_PLUGIN([processes], [$plugin_processes], [Process statistics])
2221 AC_PLUGIN([rrdtool], [$with_rrdtool], [RRDTool output plugin])
2222 AC_PLUGIN([sensors], [$with_lm_sensors], [lm_sensors statistics])
2223 AC_PLUGIN([serial], [$plugin_serial], [serial port traffic])
2224 AC_PLUGIN([snmp], [$with_libnetsnmp], [SNMP querying plugin])
2225 AC_PLUGIN([swap], [$plugin_swap], [Swap usage statistics])
2226 AC_PLUGIN([syslog], [$have_syslog], [Syslog logging plugin])
2227 AC_PLUGIN([tail], [yes], [Parsing of logfiles])
2228 AC_PLUGIN([tape], [$plugin_tape], [Tape drive statistics])
2229 AC_PLUGIN([tcpconns], [$plugin_tcpconns], [TCP connection statistics])
2230 AC_PLUGIN([unixsock], [yes], [Unixsock communication plugin])
2231 AC_PLUGIN([users], [$plugin_users], [User statistics])
2232 AC_PLUGIN([uuid], [yes], [UUID as hostname plugin])
2233 AC_PLUGIN([vmem], [$plugin_vmem], [Virtual memory statistics])
2234 AC_PLUGIN([vserver], [$plugin_vserver], [Linux VServer statistics])
2235 AC_PLUGIN([wireless], [$plugin_wireless], [Wireless statistics])
2236 AC_PLUGIN([xmms], [$with_libxmms], [XMMS statistics])
2239 if test "x$ac_system" = "xLinux" -a "x$have_net_ip_vs_h$have_ip_vs_h" = "xnono"
2241 enable_ipvs="$enable_ipvs (ip_vs.h not found)"
2245 AC_ARG_WITH(perl-bindings, [AS_HELP_STRING([--with-perl-bindings@<:@=OPTIONS@:>@], [Options passed to "perl Makefile.PL".])],
2247 if test "x$withval" != "xno" && test "x$withval" != "xyes"
2249 PERL_BINDINGS_OPTIONS="$withval"
2250 with_perl_bindings="yes"
2252 PERL_BINDINGS_OPTIONS=""
2253 with_perl_bindings="$withval"
2257 PERL_BINDINGS_OPTIONS=""
2258 with_perl_bindings="yes"
2260 if test "x$with_perl_bindings" = "xyes"
2262 PERL_BINDINGS="perl"
2266 AC_SUBST(PERL_BINDINGS)
2267 AC_SUBST(PERL_BINDINGS_OPTIONS)
2269 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/liboconfig/Makefile src/liboping/Makefile bindings/Makefile)
2271 if test "x$with_rrdtool" = "xyes" -a "x$librrd_threadsafe" != "xyes"
2273 with_rrdtool="yes (warning: librrd is not thread-safe)"
2276 if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
2278 with_liboping="yes (shipped version)"
2281 if test "x$with_libperl" = "xyes"
2283 with_libperl="yes (version `$perl_interpreter -MConfig -e 'print $Config{version};'`)"
2285 enable_perl="no (needs libperl)"
2288 if test "x$with_perl_bindings" = "xyes" -a "x$PERL_BINDINGS_OPTIONS" != "x"
2290 with_perl_bindings="yes ($PERL_BINDINGS_OPTIONS)"
2297 libcurl . . . . . . $with_libcurl
2298 libiokit . . . . . $with_libiokit
2299 libiptc . . . . . . $with_libiptc
2300 libkstat . . . . . $with_kstat
2301 libkvm . . . . . . $with_libkvm
2302 libmysql . . . . . $with_libmysql
2303 libnetlink . . . . $with_libnetlink
2304 libnetsnmp . . . . $with_libnetsnmp
2305 liboconfig . . . . $with_liboconfig
2306 liboping . . . . . $with_liboping
2307 libpcap . . . . . . $with_libpcap
2308 libperl . . . . . . $with_libperl
2309 libpthread . . . . $with_libpthread
2310 librrd . . . . . . $with_rrdtool
2311 libsensors . . . . $with_lm_sensors
2312 libstatgrab . . . . $with_libstatgrab
2313 libupsclient . . . $with_libupsclient
2314 libvirt . . . . . . $with_libvirt
2315 libxml2 . . . . . . $with_libxml2
2316 libxmms . . . . . . $with_libxmms
2319 daemon mode . . . . $enable_daemon
2320 debug . . . . . . . $enable_debug
2323 perl . . . . . . . $with_perl_bindings
2326 apache . . . . . . $enable_apache
2327 apcups . . . . . . $enable_apcups
2328 apple_sensors . . . $enable_apple_sensors
2329 battery . . . . . . $enable_battery
2330 cpu . . . . . . . . $enable_cpu
2331 cpufreq . . . . . . $enable_cpufreq
2332 csv . . . . . . . . $enable_csv
2333 df . . . . . . . . $enable_df
2334 disk . . . . . . . $enable_disk
2335 dns . . . . . . . . $enable_dns
2336 email . . . . . . . $enable_email
2337 entropy . . . . . . $enable_entropy
2338 exec . . . . . . . $enable_exec
2339 hddtemp . . . . . . $enable_hddtemp
2340 interface . . . . . $enable_interface
2341 iptables . . . . . $enable_iptables
2342 ipvs . . . . . . . $enable_ipvs
2343 irq . . . . . . . . $enable_irq
2344 libvirt . . . . . . $enable_libvirt
2345 load . . . . . . . $enable_load
2346 logfile . . . . . . $enable_logfile
2347 mbmon . . . . . . . $enable_mbmon
2348 memcached . . . . . $enable_memcached
2349 memory . . . . . . $enable_memory
2350 multimeter . . . . $enable_multimeter
2351 mysql . . . . . . . $enable_mysql
2352 netlink . . . . . . $enable_netlink
2353 network . . . . . . $enable_network
2354 nfs . . . . . . . . $enable_nfs
2355 nginx . . . . . . . $enable_nginx
2356 ntpd . . . . . . . $enable_ntpd
2357 nut . . . . . . . . $enable_nut
2358 perl . . . . . . . $enable_perl
2359 ping . . . . . . . $enable_ping
2360 processes . . . . . $enable_processes
2361 rrdtool . . . . . . $enable_rrdtool
2362 sensors . . . . . . $enable_sensors
2363 serial . . . . . . $enable_serial
2364 snmp . . . . . . . $enable_snmp
2365 swap . . . . . . . $enable_swap
2366 syslog . . . . . . $enable_syslog
2367 tail . . . . . . . $enable_tail
2368 tape . . . . . . . $enable_tape
2369 tcpconns . . . . . $enable_tcpconns
2370 unixsock . . . . . $enable_unixsock
2371 users . . . . . . . $enable_users
2372 uuid . . . . . . . $enable_uuid
2373 vmem . . . . . . . $enable_vmem
2374 vserver . . . . . . $enable_vserver
2375 wireless . . . . . $enable_wireless
2376 xmms . . . . . . . $enable_xmms