1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, 3.9.2)
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")
11 # Checks for programs.
18 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
22 AC_LIBLTDL_CONVENIENCE
28 AC_CONFIG_SUBDIRS(libltdl src/libconfig)
31 # Checks for header files.
36 AC_CHECK_HEADERS(stdint.h)
37 AC_CHECK_HEADERS(stdio.h)
38 AC_CHECK_HEADERS(errno.h)
39 AC_CHECK_HEADERS(math.h)
40 AC_CHECK_HEADERS(syslog.h)
41 AC_CHECK_HEADERS(fcntl.h)
42 AC_CHECK_HEADERS(signal.h)
43 AC_CHECK_HEADERS(assert.h)
44 AC_CHECK_HEADERS(sys/types.h)
45 AC_CHECK_HEADERS(sys/socket.h)
46 AC_CHECK_HEADERS(sys/select.h)
47 AC_CHECK_HEADERS(sys/poll.h)
48 AC_CHECK_HEADERS(netdb.h)
49 AC_CHECK_HEADERS(arpa/inet.h)
50 AC_CHECK_HEADERS(sys/resource.h)
51 AC_CHECK_HEADERS(sys/param.h)
54 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
59 AC_CHECK_HEADERS(netinet/in.h, [], [],
63 #if HAVE_NETINET_IN_SYSTM_H
64 # include <netinet/in_systm.h>
67 AC_CHECK_HEADERS(netinet/ip.h, [], [],
71 #if HAVE_NETINET_IN_SYSTM_H
72 # include <netinet/in_systm.h>
75 # include <netinet/in.h>
78 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
82 #if HAVE_NETINET_IN_SYSTM_H
83 # include <netinet/in_systm.h>
86 # include <netinet/in.h>
89 # include <netinet/ip.h>
92 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
96 #if HAVE_NETINET_IN_SYSTM_H
97 # include <netinet/in_systm.h>
100 # include <netinet/in.h>
102 #if HAVE_NETINET_IP_H
103 # include <netinet/ip.h>
106 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
111 # include <sys/types.h>
113 #if HAVE_NETINET_IN_SYSTM_H
114 # include <netinet/in_systm.h>
116 #if HAVE_NETINET_IN_H
117 # include <netinet/in.h>
120 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
125 # include <sys/types.h>
127 #if HAVE_NETINET_IN_SYSTM_H
128 # include <netinet/in_systm.h>
130 #if HAVE_NETINET_IN_H
131 # include <netinet/in.h>
133 #if HAVE_NETINET_IP6_H
134 # include <netinet/ip6.h>
139 AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
140 AC_CHECK_HEADERS(mach/mach_init.h)
141 AC_CHECK_HEADERS(mach/host_priv.h)
142 AC_CHECK_HEADERS(mach/mach_error.h)
143 AC_CHECK_HEADERS(mach/mach_host.h)
144 AC_CHECK_HEADERS(mach/mach_port.h)
145 AC_CHECK_HEADERS(mach/mach_types.h)
146 AC_CHECK_HEADERS(mach/message.h)
147 AC_CHECK_HEADERS(mach/processor_set.h)
148 AC_CHECK_HEADERS(mach/processor.h)
149 AC_CHECK_HEADERS(mach/processor_info.h)
150 AC_CHECK_HEADERS(mach/task.h)
151 AC_CHECK_HEADERS(mach/thread_act.h)
152 AC_CHECK_HEADERS(mach/vm_region.h)
153 AC_CHECK_HEADERS(mach/vm_map.h)
154 AC_CHECK_HEADERS(mach/vm_prot.h)
155 AC_CHECK_HEADERS(mach/vm_statistics.h)
156 AC_CHECK_HEADERS(mach/kern_return.h)
159 AC_CHECK_HEADERS(linux/major.h)
161 # For the apple_sensors module
162 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h)
163 AC_CHECK_HEADERS(IOKit/IOKitLib.h)
164 AC_CHECK_HEADERS(IOKit/IOTypes.h)
166 # For the battery plugin
167 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
169 #if HAVE_IOKIT_IOKITLIB_H
170 # include <IOKit/IOKitLib.h>
172 #if HAVE_IOKIT_IOTYPES_H
173 # include <IOKit/IOTypes.h>
176 AC_CHECK_HEADERS(IOKit/ps/IOPSKeys.h)
178 # For the `disk' plugin
179 AC_CHECK_HEADERS(IOKit/IOBSD.h)
180 AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDriver.h)
183 AC_CHECK_HEADERS(sys/loadavg.h)
185 # For the swap module
186 AC_CHECK_HEADERS(sys/swap.h)
189 AC_CHECK_HEADERS(utmp.h)
190 AC_CHECK_HEADERS(utmpx.h)
193 AC_CHECK_HEADERS(ifaddrs.h)
194 AC_CHECK_HEADERS(net/if.h, [], [],
197 # include <sys/types.h>
199 #if HAVE_SYS_SOCKET_H
200 # include <sys/socket.h>
203 AC_CHECK_HEADERS(linux/if.h, [], [],
206 # include <sys/types.h>
208 #if HAVE_SYS_SOCKET_H
209 # include <sys/socket.h>
212 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
215 # include <sys/types.h>
217 #if HAVE_SYS_SOCKET_H
218 # include <sys/socket.h>
221 # include <linux/if.h>
226 AC_CHECK_HEADERS(curl/curl.h)
229 AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h)
230 AC_CHECK_HEADERS(ctype.h)
231 AC_CHECK_HEADERS(limits.h)
232 AC_CHECK_HEADERS(sys/quota.h)
233 AC_CHECK_HEADERS(xfs/xqm.h)
235 # For mount interface
236 AC_CHECK_HEADERS(fs_info.h)
237 AC_CHECK_HEADERS(fshelp.h)
238 AC_CHECK_HEADERS(paths.h)
239 AC_CHECK_HEADERS(mntent.h)
240 AC_CHECK_HEADERS(mnttab.h)
241 AC_CHECK_HEADERS(sys/fstyp.h)
242 AC_CHECK_HEADERS(sys/fs_types.h)
243 AC_CHECK_HEADERS(sys/mntent.h)
244 AC_CHECK_HEADERS(sys/mnttab.h)
245 AC_CHECK_HEADERS(sys/mount.h)
246 AC_CHECK_HEADERS(sys/statfs.h)
247 AC_CHECK_HEADERS(sys/statvfs.h)
248 AC_CHECK_HEADERS(sys/vfs.h)
249 AC_CHECK_HEADERS(sys/vfstab.h)
251 # For debugging interface (variable number of arguments)
252 AC_CHECK_HEADERS(stdarg.h)
254 dnl Checking for libraries
258 # Checks for typedefs, structures, and compiler characteristics.
267 # Checks for library functions.
269 AC_PROG_GCC_TRADITIONAL
270 AC_CHECK_FUNCS(gettimeofday select strdup strtol)
271 AC_CHECK_FUNCS(getaddrinfo getnameinfo)
272 AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen)
273 AC_CHECK_FUNCS(strncasecmp strcasecmp)
274 AC_CHECK_FUNCS(openlog syslog closelog)
276 socket_needs_socket="no"
277 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
278 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
280 nanosleep_needs_rt="no"
281 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
282 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
285 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
288 AC_CHECK_FUNCS(statfs statvfs)
291 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
293 # For the `processes' plugin
294 AC_CHECK_FUNCS(thread_info)
297 AC_CHECK_FUNCS(getutent getutxent)
300 AC_CHECK_FUNCS(quotactl)
301 AC_CHECK_FUNCS(getgrgid getpwuid)
304 AC_CHECK_FUNCS(getifaddrs)
306 # For mount interface
307 AC_CHECK_FUNCS(getfsent getvfsent listmntent)
308 AC_CHECK_FUNCS(getfsstat)
310 # Check for different versions of `getmntent' here..
312 if test "x$ac_cv_lib_sun_getmntent" = "xyes"
314 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
315 [Define if the function getmntent exists. It's the version from libsun.])
317 if test "x$ac_cv_lib_seq_getmntent" = "xyes"
319 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
320 [Define if the function getmntent exists. It's the version from libseq.])
322 if test "x$ac_cv_lib_gen_getmntent" = "xyes"
324 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
325 [Define if the function getmntent exists. It's the version from libgen.])
328 if test "x$ac_cv_func_getmntent" = "xyes"; then
330 CFLAGS="-Wall -Werror $CFLAGS"
331 AC_CACHE_CHECK([whether getmntent takes one argument],
334 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
335 #include "$srcdir/src/utils_mount.h"]],
336 [[(void)getmntent((FILE *)NULL);]]
338 [fu_cv_getmntent1=yes],
339 [fu_cv_getmntent1=no]
342 if test "x$fu_cv_getmntent1" = "xno"; then
343 AC_CACHE_CHECK([whether getmntent takes two arguments],
346 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
347 #include "$srcdir/src/utils_mount.h"]],
348 [[(void)getmntent((FILE *)NULL,
349 (struct mnttab *)NULL);]]
351 [fu_cv_getmntent2=yes],
352 [fu_cv_getmntent2=no]
358 if test "x$fu_cv_getmntent1" = "xyes"; then
359 AC_DEFINE(HAVE_GETMNTENT1,
361 [Define if there is a function named getmntent
362 for reading the list of mounted filesystems, and
363 that function takes a single argument. (4.3BSD,
364 SunOS, HP-UX, Dynix, Irix, Linux)]
367 if test "x$fu_cv_getmntent2" = "xyes"; then
368 AC_DEFINE(HAVE_GETMNTENT2,
370 [Define if there is a function named getmntent
371 for reading the list of mounted filesystems, and
372 that function takes two arguments. (SVR4)]
376 # Check for structures
377 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
378 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
381 #include <sys/types.h>
382 #include <sys/socket.h>
385 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
386 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
389 #include <sys/types.h>
390 #include <sys/socket.h>
391 #include <linux/if.h>
392 #include <linux/netdevice.h>
395 AC_MSG_CHECKING([for kernel type ($host_os)])
398 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
402 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
408 AC_MSG_RESULT([$ac_system])
411 AC_CHECK_LIB(resolv, res_search,
413 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
415 [with_libresolv="no"])
416 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
419 m4_divert_once([HELP_WITH], [
420 collectd additional packages:])
422 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
423 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
424 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
426 LDFLAGS="$LDFLAGS -L$withval/lib"
427 CPPFLAGS="$CPPFLAGS -I$withval/include"
430 ], [with_rrdtool="yes"])
431 if test "x$with_rrdtool" = "xyes"
433 AC_CHECK_LIB(rrd, rrd_update,
435 AC_DEFINE(HAVE_LIBRRD, 1, [Define to 1 if you have the rrd library (-lrrd).])
437 [with_rrdtool="no (librrd not found)"], [-lm])
439 if test "x$with_rrdtool" = "xyes"
441 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
443 if test "x$with_rrdtool" = "xyes"
449 AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
450 [Wether or not to use rrdtool library])
451 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
453 #AC_ARG_WITH(pth, [AS_HELP_STRING([--with-pth=@<:@=PREFIX@:>@], [Path to pth (experimental).]),
454 #[ if test "x$withval" != "xno" && test "x$withval" != "xyes"
456 # LDFLAGS="$LDFLAGS -L$withval/lib"
457 # CPPFLAGS="$CPPFLAGS -I$withval/include"
461 #if test "x$with_pth" = "xyes"
463 # AC_CHECK_LIB(pth, pth_init,, [with_pth="no (libpth not found)"], [])
465 #if test "x$with_pth" = "xyes"
467 # AC_CHECK_HEADERS(pth.h,, [with_pth="no (pth.h not found)"])
469 #if test "x$with_pth" = "xyes"
475 #AC_DEFINE_UNQUOTED(COLLECT_PTH, [$collect_pth],
476 # [Wether or not to use pth (portable threads) library])
477 #AM_CONDITIONAL(BUILD_WITH_PTH, test "x$with_pth" = "xyes")
479 if test "$ac_system" = "Solaris"
484 with_kstat="no (Solaris only)"
485 with_devinfo="no (Solaris only)"
488 if test "x$with_kstat" = "xyes"
490 AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
492 if test "x$with_kstat" = "xyes"
494 AC_CHECK_LIB(devinfo, di_init,, [with_devinfo="no (not found)"])
495 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
497 if test "x$with_kstat" = "xyes"
503 AC_DEFINE_UNQUOTED(COLLECT_KSTAT, [$collect_kstat],
504 [Wether or not to use kstat library (Solaris)])
505 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
506 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
508 ### BEGIN of check for libcurl ###
509 with_curl_config="curl-config"
512 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
514 if test "x$withval" != "xno" -a "x$withval" != "xyes"
516 if test -x "$withval/bin/curl-config"
518 with_curl_config="$withval/bin/curl-config"
522 if test "x$withval" = "xno"
532 if test "x$with_libcurl" = "xyes"
534 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
535 curl_config_status=$?
537 if test $curl_config_status -ne 0
541 AC_CHECK_LIB(curl, curl_easy_init,
543 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
544 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
552 if test "x$with_libcurl" = "xyes" -a $with_curl_prefix -ne 0
554 with_curl_prefix=`$with_curl_config --libs 2>/dev/null`
555 curl_config_status=$?
557 if test $curl_config_status -ne 0
561 if test -d "$with_curl_prefix/include"
563 CPPFLAGS="$CPPFLAGS -I$with_curl_prefix/include"
568 with_libcurl_numeric=0
569 if test "x$with_libcurl" = "xyes"
571 with_libcurl_numeric=1
573 AC_DEFINE_UNQUOTED(HAVE_LIBCURL, [$with_libcurl_numeric], [Define to 1 if you have the 'curl' library (-lcurl).])
574 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
575 ### END of check for libcurl ###
579 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
588 AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
589 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
591 with_libstatgrab="yes"
594 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
596 if test "x$withval" != "xno" -a "x$withval" != "xyes"
598 LDFLAGS="$LDFLAGS -L$withval/lib"
599 CPPFLAGS="$CPPFLAGS -I$withval/include"
600 with_libstatgrab="yes"
604 if test "x$ac_system" == "xunknown"
606 with_libstatgrab="yes"
608 with_libstatgrab="no"
611 if test "x$with_libstatgrab" = "xyes"
613 AC_CHECK_LIB(statgrab, sg_init, [with_libstatgrab="yes"], [with_libstatgrab="no (libstatgrab not found)"])
615 if test "x$with_libstatgrab" = "xyes"
617 AC_CHECK_HEADERS(statgrab.h,, [with_libstatgrab="no (statgrab.h not found)"])
619 if test "x$with_libstatgrab" = "xyes"
621 AC_CHECK_LIB(devstat, getdevs, [with_libdevstat="yes"], [with_libdevstat="no"])
622 AC_CHECK_LIB(kvm, kvm_getargv, [with_libkvm="yes"], [with_libkvm="no"])
624 if test "x$with_libstatgrab" = "xyes"
626 collect_libstatgrab=1
628 collect_libstatgrab=0
630 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
631 [Wether or not to use statgrab library])
632 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
633 AM_CONDITIONAL(BUILD_WITH_LIBDEVSTAT, test "x$with_libdevstat" = "xyes")
634 AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes")
636 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
638 if test "x$withval" != "xno" && test "x$withval" != "xyes"
640 LDFLAGS="$LDFLAGS -L$withval/lib"
641 CPPFLAGS="$CPPFLAGS -I$withval/include"
642 with_lm_sensors="yes"
646 if test "x$ac_system" = "xLinux"
648 with_lm_sensors="yes"
653 if test "x$with_lm_sensors" = "xyes"
655 AC_CHECK_LIB(sensors, sensors_init,
657 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
659 [with_lm_sensors="no (libsensors not found)"])
661 if test "x$with_lm_sensors" = "xyes"
663 AC_CHECK_HEADERS(sensors/sensors.h,
665 AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
667 [with_lm_sensors="no (sensors/sensors.h not found)"])
669 if test "x$with_lm_sensors" = "xyes"
675 AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors],
676 [Wether or not to use sensors library])
677 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
679 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
681 if test "x$withval" != "xno" && test "x$withval" != "xyes"
683 LDFLAGS="$LDFLAGS -L$withval/lib"
684 CPPFLAGS="$CPPFLAGS -I$withval/include"
691 if test "x$with_libmysql" = "xyes"
693 AC_CHECK_LIB(mysqlclient, mysql_init,
695 AC_DEFINE(HAVE_LIBMYSQLCLIENT, 1, [Define to 1 if you have the mysqlclient library (-lmysqlclient).])
696 ], [with_libmysql="no (libmysql not found)"])
698 if test "x$with_libmysql" = "xyes"
700 AC_CHECK_HEADERS(mysql/mysql.h,
702 AC_DEFINE(HAVE_MYSQL_MYSQL_H, 1, [Define to 1 if you have the <mysql/mysql.h> header file.])
703 ], [with_libmysql="no (mysql/mysql.h not found)"])
705 if test "x$with_libmysql" = "xyes"
711 AC_DEFINE_UNQUOTED(COLLECT_LIBMYSQL, [$collect_libmysql],
712 [Wether or not to use mysql library])
713 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
715 # Define `step' and `hearbeat' values..
716 declare -i collectd_step=10
717 declare -i collectd_heartbeat=25
718 AC_ARG_WITH(step, [AS_HELP_STRING([--with-step=SECONDS], [Interval in which plugins are queried.])],
720 if test "x$withval" != "xno" -a "x$withval" != "xyes"
722 declare -i tmp_collectd_step="$withval"
723 if test $tmp_collectd_step -gt 0
725 collectd_step=$tmp_collectd_step
726 let "collectd_heartbeat=$collectd_step*2"
730 AC_ARG_WITH(heartbeat, [AS_HELP_STRING([--with-heartbeat=SECONDS], [Heartbeat of the DS in generated RRD files.])],
732 if test "x$withval" != "xno" -a "x$withval" != "xyes"
734 declare -i tmp_collectd_heartbeat="$withval"
735 if test $tmp_collectd_heartbeat -gt 0
737 collectd_heartbeat=$tmp_collectd_heartbeat
742 if test $collectd_step -ne 10
744 AC_DEFINE_UNQUOTED(COLLECTD_STEP, "$collectd_step", [Interval in which plugins are queried.])
746 if test $collectd_heartbeat -ne 25
748 AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.])
752 # Check for enabled/disabled features
755 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
756 # ------------------------------------------------------------
758 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
763 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
768 m4_define([EnDis],[disabled])dnl
769 m4_define([YesNo],[no])dnl
775 m4_define([EnDis],[enabled])dnl
776 m4_define([YesNo],[yes])dnl
779 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
783 m4_if([$3], [feature], [],
787 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
793 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
795 enable_$1='[YesNo]'dnl
797 if test "x$enable_$1" = "xno"
801 if test "x$enable_$1" = "xyes"
805 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
810 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
811 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
813 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
815 m4_divert_once([HELP_ENABLE], [
817 AC_COLLECTD([debug], [enable], [feature], [debugging])
818 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
819 AC_COLLECTD([getifaddrs],[enable], [feature], [getifaddrs under Linux])
821 m4_divert_once([HELP_ENABLE], [
823 AC_COLLECTD([apache], [disable], [module], [Apache httpd statistics])
824 AC_COLLECTD([apcups], [disable], [module], [Statistics of UPSes by APC])
825 AC_COLLECTD([apple_sensors], [disable], [module], [Apple's hardware sensors])
826 AC_COLLECTD([battery], [disable], [module], [battery statistics])
827 AC_COLLECTD([cpu], [disable], [module], [cpu usage statistics])
828 AC_COLLECTD([cpufreq], [disable], [module], [system cpu frequency statistics])
829 AC_COLLECTD([disk], [disable], [module], [disk/partition statistics])
830 AC_COLLECTD([df], [disable], [module], [df statistics])
831 AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)])
832 AC_COLLECTD([hddtemp], [disable], [module], [hdd temperature statistics])
833 AC_COLLECTD([load], [disable], [module], [system load statistics])
834 AC_COLLECTD([memory], [disable], [module], [memory statistics])
835 AC_COLLECTD([mysql], [disable], [module], [mysql statistics])
836 AC_COLLECTD([nfs], [disable], [module], [nfs statistics])
837 AC_COLLECTD([ntpd], [disable], [module], [nfs statistics])
838 AC_COLLECTD([ping], [disable], [module], [ping statistics])
839 AC_COLLECTD([processes], [disable], [module], [processes statistics])
840 AC_COLLECTD([sensors], [disable], [module], [lm_sensors statistics])
841 AC_COLLECTD([serial], [disable], [module], [serial statistics])
842 AC_COLLECTD([swap], [disable], [module], [swap statistics])
843 AC_COLLECTD([tape], [disable], [module], [tape statistics])
844 AC_COLLECTD([traffic], [disable], [module], [system traffic statistics])
845 AC_COLLECTD([users], [disable], [module], [user count statistics])
846 AC_COLLECTD([vserver], [disable], [module], [vserver statistics])
847 AC_COLLECTD([wireless], [disable], [module], [wireless link statistics])
849 AC_OUTPUT(Makefile src/libconfig/Makefile src/liboping/Makefile src/Makefile)
855 libcurl . . . . . . $with_libcurl
856 libiokit . . . . . $with_libiokit
857 librrd . . . . . . $with_rrdtool
858 lm_sensors . . . . $with_lm_sensors
859 libstatgrab . . . . $with_libstatgrab
860 libkstat . . . . . $with_kstat
861 libmysql . . . . . $with_libmysql
864 debug . . . . . . . $enable_debug
865 daemon mode . . . . $enable_daemon
866 step . . . . . . . $collectd_step seconds
867 heartbeat . . . . . $collectd_heartbeat seconds
870 apache . . . . . . $enable_apache
871 apcups . . . . . . $enable_apcups
872 apple_sensors . . . $enable_apple_sensors
873 battery . . . . . . $enable_battery
874 cpu . . . . . . . . $enable_cpu
875 cpufreq . . . . . . $enable_cpufreq
876 df . . . . . . . . $enable_df
877 disk . . . . . . . $enable_disk
878 hddtemp . . . . . . $enable_hddtemp
879 load . . . . . . . $enable_load
880 memory . . . . . . $enable_memory
881 mysql . . . . . . . $enable_mysql
882 nfs . . . . . . . . $enable_nfs
883 ntpd . . . . . . . $enable_ntpd
884 ping . . . . . . . $enable_ping
885 processes . . . . . $enable_processes
886 sensors . . . . . . $enable_sensors
887 serial . . . . . . $enable_serial
888 swap . . . . . . . $enable_swap
889 tape . . . . . . . $enable_tape
890 traffic . . . . . . $enable_traffic
891 users . . . . . . . $enable_users
892 vserver . . . . . . $enable_vserver
893 wireless . . . . . $enable_wireless