1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, 3.9.0-alpha1)
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(netdb.h)
48 AC_CHECK_HEADERS(arpa/inet.h)
49 AC_CHECK_HEADERS(sys/resource.h)
50 AC_CHECK_HEADERS(sys/param.h)
53 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
58 AC_CHECK_HEADERS(netinet/in.h, [], [],
62 #if HAVE_NETINET_IN_SYSTM_H
63 # include <netinet/in_systm.h>
66 AC_CHECK_HEADERS(netinet/ip.h, [], [],
70 #if HAVE_NETINET_IN_SYSTM_H
71 # include <netinet/in_systm.h>
74 # include <netinet/in.h>
77 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
81 #if HAVE_NETINET_IN_SYSTM_H
82 # include <netinet/in_systm.h>
85 # include <netinet/in.h>
88 # include <netinet/ip.h>
91 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
95 #if HAVE_NETINET_IN_SYSTM_H
96 # include <netinet/in_systm.h>
99 # include <netinet/in.h>
101 #if HAVE_NETINET_IP_H
102 # include <netinet/ip.h>
105 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
110 # include <sys/types.h>
112 #if HAVE_NETINET_IN_SYSTM_H
113 # include <netinet/in_systm.h>
115 #if HAVE_NETINET_IN_H
116 # include <netinet/in.h>
119 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
124 # include <sys/types.h>
126 #if HAVE_NETINET_IN_SYSTM_H
127 # include <netinet/in_systm.h>
129 #if HAVE_NETINET_IN_H
130 # include <netinet/in.h>
132 #if HAVE_NETINET_IP6_H
133 # include <netinet/ip6.h>
138 AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
139 AC_CHECK_HEADERS(mach/mach_init.h)
140 AC_CHECK_HEADERS(mach/host_priv.h)
141 AC_CHECK_HEADERS(mach/mach_error.h)
142 AC_CHECK_HEADERS(mach/mach_host.h)
143 AC_CHECK_HEADERS(mach/mach_port.h)
144 AC_CHECK_HEADERS(mach/mach_types.h)
145 AC_CHECK_HEADERS(mach/message.h)
146 AC_CHECK_HEADERS(mach/processor_set.h)
147 AC_CHECK_HEADERS(mach/processor.h)
148 AC_CHECK_HEADERS(mach/processor_info.h)
149 AC_CHECK_HEADERS(mach/task.h)
150 AC_CHECK_HEADERS(mach/thread_act.h)
151 AC_CHECK_HEADERS(mach/vm_region.h)
152 AC_CHECK_HEADERS(mach/vm_map.h)
153 AC_CHECK_HEADERS(mach/vm_prot.h)
154 AC_CHECK_HEADERS(mach/vm_statistics.h)
155 AC_CHECK_HEADERS(mach/kern_return.h)
158 AC_CHECK_HEADERS(linux/major.h)
161 AC_CHECK_HEADERS(sys/loadavg.h)
164 AC_CHECK_HEADERS(utmp.h)
165 AC_CHECK_HEADERS(utmpx.h)
168 AC_CHECK_HEADERS(ifaddrs.h)
169 AC_CHECK_HEADERS(net/if.h, [], [],
172 # include <sys/types.h>
174 #if HAVE_SYS_SOCKET_H
175 # include <sys/socket.h>
178 AC_CHECK_HEADERS(linux/if.h, [], [],
181 # include <sys/types.h>
183 #if HAVE_SYS_SOCKET_H
184 # include <sys/socket.h>
187 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
190 # include <sys/types.h>
192 #if HAVE_SYS_SOCKET_H
193 # include <sys/socket.h>
196 # include <linux/if.h>
201 AC_CHECK_HEADERS(curl/curl.h)
204 AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h)
205 AC_CHECK_HEADERS(ctype.h)
206 AC_CHECK_HEADERS(limits.h)
207 AC_CHECK_HEADERS(sys/quota.h)
208 AC_CHECK_HEADERS(xfs/xqm.h)
210 # For mount interface
211 AC_CHECK_HEADERS(fs_info.h)
212 AC_CHECK_HEADERS(fshelp.h)
213 AC_CHECK_HEADERS(paths.h)
214 AC_CHECK_HEADERS(mntent.h)
215 AC_CHECK_HEADERS(mnttab.h)
216 AC_CHECK_HEADERS(sys/fstyp.h)
217 AC_CHECK_HEADERS(sys/fs_types.h)
218 AC_CHECK_HEADERS(sys/mntent.h)
219 AC_CHECK_HEADERS(sys/mnttab.h)
220 AC_CHECK_HEADERS(sys/mount.h)
221 AC_CHECK_HEADERS(sys/statfs.h)
222 AC_CHECK_HEADERS(sys/statvfs.h)
223 AC_CHECK_HEADERS(sys/vfs.h)
224 AC_CHECK_HEADERS(sys/vfstab.h)
226 # For debugging interface (variable number of arguments)
227 AC_CHECK_HEADERS(stdarg.h)
229 dnl Checking for libraries
233 # Checks for typedefs, structures, and compiler characteristics.
242 # Checks for library functions.
244 AC_PROG_GCC_TRADITIONAL
245 AC_CHECK_FUNCS(gettimeofday select strdup strtol)
246 AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket))
247 AC_CHECK_FUNCS(getaddrinfo getnameinfo)
248 AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen)
249 AC_CHECK_FUNCS(strncasecmp strcasecmp)
250 AC_CHECK_FUNCS(openlog syslog closelog)
253 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
256 AC_CHECK_FUNCS(statfs statvfs)
259 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
261 # For the `processes' plugin
262 AC_CHECK_FUNCS(thread_info)
265 AC_CHECK_FUNCS(getutent getutxent)
268 AC_CHECK_FUNCS(quotactl)
269 AC_CHECK_FUNCS(getgrgid getpwuid)
272 AC_CHECK_FUNCS(getifaddrs)
274 # For mount interface
275 AC_CHECK_FUNCS(getfsent getvfsent listmntent)
276 AC_CHECK_FUNCS(getfsstat)
278 # Check for different versions of `getmntent' here..
280 if test "x$ac_cv_lib_sun_getmntent" = "xyes"
282 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
283 [Define if the function getmntent exists. It's the version from libsun.])
285 if test "x$ac_cv_lib_seq_getmntent" = "xyes"
287 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
288 [Define if the function getmntent exists. It's the version from libseq.])
290 if test "x$ac_cv_lib_gen_getmntent" = "xyes"
292 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
293 [Define if the function getmntent exists. It's the version from libgen.])
296 if test "x$ac_cv_func_getmntent" = "xyes"; then
298 CFLAGS="-Wall -Werror $CFLAGS"
299 AC_CACHE_CHECK([whether getmntent takes one argument],
302 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
303 #include "$srcdir/src/utils_mount.h"]],
304 [[(void)getmntent((FILE *)NULL);]]
306 [fu_cv_getmntent1=yes],
307 [fu_cv_getmntent1=no]
310 if test "x$fu_cv_getmntent1" = "xno"; then
311 AC_CACHE_CHECK([whether getmntent takes two arguments],
314 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
315 #include "$srcdir/src/utils_mount.h"]],
316 [[(void)getmntent((FILE *)NULL,
317 (struct mnttab *)NULL);]]
319 [fu_cv_getmntent2=yes],
320 [fu_cv_getmntent2=no]
326 if test "x$fu_cv_getmntent1" = "xyes"; then
327 AC_DEFINE(HAVE_GETMNTENT1,
329 [Define if there is a function named getmntent
330 for reading the list of mounted filesystems, and
331 that function takes a single argument. (4.3BSD,
332 SunOS, HP-UX, Dynix, Irix, Linux)]
335 if test "x$fu_cv_getmntent2" = "xyes"; then
336 AC_DEFINE(HAVE_GETMNTENT2,
338 [Define if there is a function named getmntent
339 for reading the list of mounted filesystems, and
340 that function takes two arguments. (SVR4)]
344 # Check for structures
345 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_obytes],
346 [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
349 #include <sys/types.h>
350 #include <sys/socket.h>
353 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_bytes],
354 [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
357 #include <sys/types.h>
358 #include <sys/socket.h>
359 #include <linux/if.h>
360 #include <linux/netdevice.h>
363 AC_MSG_CHECKING([for kernel type ($host_os)])
366 AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
370 AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
376 AC_MSG_RESULT([$ac_system])
379 AC_CHECK_LIB(socket, socket,
381 AC_DEFINE(HAVE_LIBSOCKET, 1, [Define to 1 if you have the 'socket' library (-lsocket).])
383 [with_libsocket="no"])
384 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$with_libsocket" = "xyes")
387 AC_CHECK_LIB(resolv, res_search,
389 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
391 [with_libresolv="no"])
392 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
395 m4_divert_once([HELP_WITH], [
396 collectd additional packages:])
398 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
399 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
400 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
402 LDFLAGS="$LDFLAGS -L$withval/lib"
403 CPPFLAGS="$CPPFLAGS -I$withval/include"
406 ], [with_rrdtool="yes"])
407 if test "x$with_rrdtool" = "xyes"
409 AC_CHECK_LIB(rrd, rrd_update,
411 AC_DEFINE(HAVE_LIBRRD, 1, [Define to 1 if you have the rrd library (-lrrd).])
413 [with_rrdtool="no (librrd not found)"], [-lm])
415 if test "x$with_rrdtool" = "xyes"
417 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
419 if test "x$with_rrdtool" = "xyes"
425 AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
426 [Wether or not to use rrdtool library])
427 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
429 #AC_ARG_WITH(pth, [AS_HELP_STRING([--with-pth=@<:@=PREFIX@:>@], [Path to pth (experimental).]),
430 #[ if test "x$withval" != "xno" && test "x$withval" != "xyes"
432 # LDFLAGS="$LDFLAGS -L$withval/lib"
433 # CPPFLAGS="$CPPFLAGS -I$withval/include"
437 #if test "x$with_pth" = "xyes"
439 # AC_CHECK_LIB(pth, pth_init,, [with_pth="no (libpth not found)"], [])
441 #if test "x$with_pth" = "xyes"
443 # AC_CHECK_HEADERS(pth.h,, [with_pth="no (pth.h not found)"])
445 #if test "x$with_pth" = "xyes"
451 #AC_DEFINE_UNQUOTED(COLLECT_PTH, [$collect_pth],
452 # [Wether or not to use pth (portable threads) library])
453 #AM_CONDITIONAL(BUILD_WITH_PTH, test "x$with_pth" = "xyes")
455 if test "$ac_system" = "Solaris"
459 with_kstat="no (Solaris only)"
461 if test "x$with_kstat" = "xyes"
463 AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
465 if test "x$with_kstat" = "xyes"
467 AC_CHECK_LIB(devinfo, di_init)
468 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
470 if test "x$with_kstat" = "xyes"
476 AC_DEFINE_UNQUOTED(COLLECT_KSTAT, [$collect_kstat],
477 [Wether or not to use kstat library (Solaris)])
478 AM_CONDITIONAL(BUILD_WITH_KSTAT, test "x$with_kstat" = "xyes")
480 ### BEGIN of check for libcurl ###
481 with_curl_config="curl-config"
484 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
486 if test "x$withval" != "xno" -a "x$withval" != "xyes"
488 if test -x "$withval/bin/curl-config"
490 with_curl_config="$withval/bin/curl-config"
494 if test "x$withval" = "xno"
504 if test "x$with_libcurl" = "xyes"
506 with_curl_libs=`$with_curl_config --libs 2>/dev/null`
507 curl_config_status=$?
509 if test $curl_config_status -ne 0
513 AC_CHECK_LIB(curl, curl_easy_init,
515 BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
516 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
524 if test "x$with_libcurl" = "xyes" -a $with_curl_prefix -ne 0
526 with_curl_prefix=`$with_curl_config --libs 2>/dev/null`
527 curl_config_status=$?
529 if test $curl_config_status -ne 0
533 if test -d "$with_curl_prefix/include"
535 CPPFLAGS="$CPPFLAGS -I$with_curl_prefix/include"
540 with_libcurl_numeric=0
541 if test "x$with_libcurl" = "xyes"
543 with_libcurl_numeric=1
545 AC_DEFINE_UNQUOTED(HAVE_LIBCURL, [$with_libcurl_numeric], [Define to 1 if you have the 'curl' library (-lcurl).])
546 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
547 ### END of check for libcurl ###
549 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
551 if test "x$withval" != "xno" -a "x$withval" != "xyes"
553 LDFLAGS="$LDFLAGS -L$withval/lib"
554 CPPFLAGS="$CPPFLAGS -I$withval/include"
555 with_libstatgrab="yes"
559 if test "x$ac_system" == "xunknown"
561 with_libstatgrab="yes"
563 with_libstatgrab="no"
566 if test "x$with_libstatgrab" = "xyes"
568 AC_CHECK_LIB(devstat, getdevs)
569 AC_CHECK_LIB(kvm, kvm_getargv)
570 AC_CHECK_LIB(statgrab, sg_init,, [with_libstatgrab="no (libstatgrab not found)"])
572 if test "x$with_libstatgrab" = "xyes"
574 AC_CHECK_HEADERS(statgrab.h,, [with_libstatgrab="no (statgrab.h not found)"])
576 if test "x$with_libstatgrab" = "xyes"
578 collect_libstatgrab=1
580 collect_libstatgrab=0
582 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
583 [Wether or not to use statgrab library])
584 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
586 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
588 if test "x$withval" != "xno" && test "x$withval" != "xyes"
590 LDFLAGS="$LDFLAGS -L$withval/lib"
591 CPPFLAGS="$CPPFLAGS -I$withval/include"
592 with_lm_sensors="yes"
596 if test "x$ac_system" = "xLinux"
598 with_lm_sensors="yes"
603 if test "x$with_lm_sensors" = "xyes"
605 AC_CHECK_LIB(sensors, sensors_init,
607 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
609 [with_lm_sensors="no (libsensors not found)"])
611 if test "x$with_lm_sensors" = "xyes"
613 AC_CHECK_HEADERS(sensors/sensors.h,
615 AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
617 [with_lm_sensors="no (sensors/sensors.h not found)"])
619 if test "x$with_lm_sensors" = "xyes"
625 AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors],
626 [Wether or not to use sensors library])
627 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
629 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
631 if test "x$withval" != "xno" && test "x$withval" != "xyes"
633 LDFLAGS="$LDFLAGS -L$withval/lib"
634 CPPFLAGS="$CPPFLAGS -I$withval/include"
641 if test "x$with_libmysql" = "xyes"
643 AC_CHECK_LIB(mysqlclient, mysql_init,
645 AC_DEFINE(HAVE_LIBMYSQLCLIENT, 1, [Define to 1 if you have the mysqlclient library (-lmysqlclient).])
646 ], [with_libmysql="no (libmysql not found)"])
648 if test "x$with_libmysql" = "xyes"
650 AC_CHECK_HEADERS(mysql/mysql.h,
652 AC_DEFINE(HAVE_MYSQL_MYSQL_H, 1, [Define to 1 if you have the <mysql/mysql.h> header file.])
653 ], [with_libmysql="no (mysql/mysql.h not found)"])
655 if test "x$with_libmysql" = "xyes"
661 AC_DEFINE_UNQUOTED(COLLECT_LIBMYSQL, [$collect_libmysql],
662 [Wether or not to use mysql library])
663 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
665 # Define `step' and `hearbeat' values..
666 declare -i collectd_step=10
667 declare -i collectd_heartbeat=25
668 AC_ARG_WITH(step, [AS_HELP_STRING([--with-step=SECONDS], [Interval in which plugins are queried.])],
670 if test "x$withval" != "xno" -a "x$withval" != "xyes"
672 declare -i tmp_collectd_step="$withval"
673 if test $tmp_collectd_step -gt 0
675 collectd_step=$tmp_collectd_step
676 let "collectd_heartbeat=$collectd_step*2"
680 AC_ARG_WITH(heartbeat, [AS_HELP_STRING([--with-heartbeat=SECONDS], [Heartbeat of the DS in generated RRD files.])],
682 if test "x$withval" != "xno" -a "x$withval" != "xyes"
684 declare -i tmp_collectd_heartbeat="$withval"
685 if test $tmp_collectd_heartbeat -gt 0
687 collectd_heartbeat=$tmp_collectd_heartbeat
692 if test $collectd_step -ne 10
694 AC_DEFINE_UNQUOTED(COLLECTD_STEP, "$collectd_step", [Interval in which plugins are queried.])
696 if test $collectd_heartbeat -ne 25
698 AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.])
702 # Check for enabled/disabled features
705 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
706 # ------------------------------------------------------------
708 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
713 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
718 m4_define([EnDis],[disabled])dnl
719 m4_define([YesNo],[no])dnl
725 m4_define([EnDis],[enabled])dnl
726 m4_define([YesNo],[yes])dnl
729 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
733 m4_if([$3], [feature], [],
737 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
743 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
745 enable_$1='[YesNo]'dnl
747 if test "x$enable_$1" = "xno"
751 if test "x$enable_$1" = "xyes"
755 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
760 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
761 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
763 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
765 m4_divert_once([HELP_ENABLE], [
767 AC_COLLECTD([debug], [enable], [feature], [debugging])
768 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
770 m4_divert_once([HELP_ENABLE], [
772 AC_COLLECTD([apache], [disable], [module], [Apache httpd statistics])
773 AC_COLLECTD([battery], [disable], [module], [battery statistics])
774 AC_COLLECTD([cpu], [disable], [module], [cpu usage statistics])
775 AC_COLLECTD([cpufreq], [disable], [module], [system cpu frequency statistics])
776 AC_COLLECTD([disk], [disable], [module], [disk/partition statistics])
777 AC_COLLECTD([df], [disable], [module], [df statistics])
778 AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)])
779 AC_COLLECTD([hddtemp], [disable], [module], [hdd temperature statistics])
780 AC_COLLECTD([load], [disable], [module], [system load statistics])
781 AC_COLLECTD([memory], [disable], [module], [memory statistics])
782 AC_COLLECTD([mysql], [disable], [module], [mysql statistics])
783 AC_COLLECTD([nfs], [disable], [module], [nfs statistics])
784 AC_COLLECTD([ping], [disable], [module], [ping statistics])
785 AC_COLLECTD([processes], [disable], [module], [processes statistics])
786 AC_COLLECTD([sensors], [disable], [module], [lm_sensors statistics])
787 AC_COLLECTD([serial], [disable], [module], [serial statistics])
788 AC_COLLECTD([swap], [disable], [module], [swap statistics])
789 AC_COLLECTD([tape], [disable], [module], [tape statistics])
790 AC_COLLECTD([traffic], [disable], [module], [system traffic statistics])
791 AC_COLLECTD([users], [disable], [module], [user count statistics])
792 AC_COLLECTD([vserver], [disable], [module], [vserver statistics])
793 AC_COLLECTD([wireless], [disable], [module], [wireless link statistics])
795 #m4_divert_once([HELP_ENABLE], [
797 #AC_ARG_ENABLE(cpu, AC_HELP_STRING([--disable-cpu], [Disable CPU usage statistics]),, [enable_cpu="yes"])
798 #if test "x$enable_cpu" != "xno"
800 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$have_sysctlbyname" = "xyes"
807 #if test "x$enable_cpu" = "xno"
809 # AC_DEFINE(COLLECT_CPU, 0, [Wether or not to collect CPU usage statistics])
811 #AM_CONDITIONAL(BUILD_MODULE_CPU, test "x$enable_cpu" = "xyes")
813 #AC_ARG_ENABLE(cpufreq, AC_HELP_STRING([--disable-cpufreq], [Disable system cpu frequency statistics]),, [enable_cpufreq="yes"])
814 #if test "x$enable_cpufreq" != "xno"
816 # if test "x$ac_system" = "xLinux"
818 # enable_cpufreq="yes"
820 # enable_cpufreq="no"
823 #if test "x$enable_cpufreq" = "xno"
825 # AC_DEFINE(COLLECT_CPUFREQ, 0, [Wether or not to collect cpu frequency statistics])
827 #AM_CONDITIONAL(BUILD_MODULE_CPUFREQ, test "x$enable_cpufreq" = "xyes")
829 #AC_ARG_ENABLE(disk, AC_HELP_STRING([--disable-disk], [Disable disk/partition statistics]),, [enable_disk="yes"])
830 #if test "x$enable_disk" != "xno"
832 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes"
839 #if test "x$enable_disk" = "xno"
841 # AC_DEFINE(COLLECT_DISK, 0, [Wether or not to collect diskstats])
843 #AM_CONDITIONAL(BUILD_MODULE_DISK, test "x$enable_disk" = "xyes")
845 #AC_ARG_ENABLE(hddtemp, AC_HELP_STRING([--disable-hddtemp], [Disable hdd temperature statistics]),, [enable_hddtemp="yes"])
846 #if test "x$enable_hddtemp" = "xno"
848 # AC_DEFINE(COLLECT_HDDTEMP, 0, [Wether or not to collect hdd temperature statistics])
850 #AM_CONDITIONAL(BUILD_MODULE_HDDTEMP, test "x$enable_hddtemp" = "xyes")
852 #AC_ARG_ENABLE(load, AC_HELP_STRING([--disable-load], [Disable system load statistics]),, [enable_load="yes"])
853 #if test "x$enable_load" != "xno"
855 # if test "x$have_getloadavg" = "xyes" -o "x$ac_system" = "xLinux" -o "x$with_libstatgrab" = "xyes"
862 #if test "x$enable_load" = "xno"
864 # AC_DEFINE(COLLECT_LOAD, 0, [Wether or not to collect system load statistics])
866 #AM_CONDITIONAL(BUILD_MODULE_LOAD, test "x$enable_load" = "xyes")
868 #AC_ARG_ENABLE(memory, AC_HELP_STRING([--disable-memory], [Disable memory statistics]),, [enable_memory="yes"])
869 #if test "x$enable_memory" != "xno"
871 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
873 # enable_memory="yes"
878 #if test "x$enable_memory" = "xno"
880 # AC_DEFINE(COLLECT_MEMORY, 0, [Wether or not to collect memory statistics])
882 #AM_CONDITIONAL(BUILD_MODULE_MEMORY, test "x$enable_memory" = "xyes")
884 #AC_ARG_ENABLE(nfs, AC_HELP_STRING([--disable-nfs], [Disable nfs statistics]),, [enable_nfs="yes"])
885 #if test "x$enable_nfs" != "xno"
887 # if test "x$ac_system" = "xLinux"
894 #if test "x$enable_nfs" = "xno"
896 # AC_DEFINE(COLLECT_NFS, 0, [Wether or not to collect nfs statistics])
898 #AM_CONDITIONAL(BUILD_MODULE_NFS, test "x$enable_nfs" = "xyes")
900 #AC_ARG_ENABLE(ping, AC_HELP_STRING([--disable-ping], [Disable ping statistics]),, [enable_ping="yes"])
901 #if test "x$enable_ping" != "xno"
905 #if test "x$enable_ping" = "xno"
907 # AC_DEFINE(COLLECT_PING, 0, [Wether or not to collect ping statistics])
909 #AM_CONDITIONAL(BUILD_MODULE_PING, test "x$enable_ping" = "xyes")
911 #AC_ARG_ENABLE(processes, AC_HELP_STRING([--disable-processes], [Disable processes statistics]),, [enable_processes="yes"])
912 #if test "x$enable_processes" != "xno"
914 # if test "x$ac_system" = "xLinux"
916 # enable_processes="yes"
918 # enable_processes="no"
921 #if test "x$enable_processes" = "xno"
923 # AC_DEFINE(COLLECT_PROCESSES, 0, [Wether or not to collect processes statistics])
925 #AM_CONDITIONAL(BUILD_MODULE_PROCESSES, test "x$enable_processes" = "xyes")
927 ##AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)])
929 #AC_ARG_ENABLE(sensors, AC_HELP_STRING([--disable-sensors], [Disable lm_sensors statistics]),, [enable_sensors=$with_lm_sensors])
930 #if test "x$enable_sensors" != "xno"
932 # if test "x$with_lm_sensors" = "xyes"
934 # enable_sensors="yes"
936 # enable_sensors="no"
939 #if test "x$enable_sensors" = "xno"
941 # AC_DEFINE(COLLECT_SENSORS, 0, [Wether or not to collect lm_sensors statistics])
943 #AM_CONDITIONAL(BUILD_MODULE_SENSORS, test "x$enable_sensors" = "xyes")
945 #AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [Disable serial statistics]),, [enable_serial="yes"])
946 #if test "x$enable_serial" != "xno"
948 # if test "x$ac_system" = "xLinux"
950 # enable_serial="yes"
955 #if test "x$enable_serial" = "xno"
957 # AC_DEFINE(COLLECT_SERIAL, 0, [Wether or not to collect serial statistics])
959 #AM_CONDITIONAL(BUILD_MODULE_SERIAL, test "x$enable_serial" = "xyes")
961 #AC_ARG_ENABLE(swap, AC_HELP_STRING([--disable-swap], [Disable swap statistics]),, [enable_swap="yes"])
962 #if test "x$enable_swap" != "xno"
964 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
971 #if test "x$enable_swap" = "xno"
973 # AC_DEFINE(COLLECT_SWAP, 0, [Wether or not to collect swap statistics])
975 #AM_CONDITIONAL(BUILD_MODULE_SWAP, test "x$enable_swap" = "xyes")
977 #AC_ARG_ENABLE(tape, AC_HELP_STRING([--disable-tape], [Disable tape statistics]),, [enable_tape="yes"])
978 #if test "x$enable_tape" != "xno"
980 # if test "x$with_kstat" = "xyes"
987 #if test "x$enable_tape" = "xno"
989 # AC_DEFINE(COLLECT_TAPE, 0, [Wether or not to collect tape statistics])
991 #AM_CONDITIONAL(BUILD_MODULE_TAPE, test "x$enable_tape" = "xyes")
993 #AC_ARG_ENABLE(traffic, AC_HELP_STRING([--disable-traffic], [Disable system traffic statistics]),, [enable_traffic="yes"])
994 #if test "x$enable_traffic" != "xno"
996 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
998 # enable_traffic="yes"
1000 # enable_traffic="no"
1003 #if test "x$enable_traffic" = "xno"
1005 # AC_DEFINE(COLLECT_TRAFFIC, 0, [Wether or not to collect network traffic statistics])
1007 #AM_CONDITIONAL(BUILD_MODULE_TRAFFIC, test "x$enable_traffic" = "xyes")
1009 #AC_COLLECTD([users], [disable], [module], [user count statistics])
1011 AC_OUTPUT(Makefile src/libconfig/Makefile src/liboping/Makefile src/Makefile)
1017 libcurl . . . . . . $with_libcurl
1018 librrd . . . . . . $with_rrdtool
1019 lm_sensors . . . . $with_lm_sensors
1020 libstatgrab . . . . $with_libstatgrab
1021 libkstat . . . . . $with_kstat
1022 libmysql . . . . . $with_libmysql
1025 debug . . . . . . . $enable_debug
1026 daemon mode . . . . $enable_daemon
1027 step . . . . . . . $collectd_step seconds
1028 heartbeat . . . . . $collectd_heartbeat seconds
1031 battery . . . . . . $enable_battery
1032 cpu . . . . . . . . $enable_cpu
1033 cpufreq . . . . . . $enable_cpufreq
1034 df . . . . . . . . $enable_df
1035 disk . . . . . . . $enable_disk
1036 hddtemp . . . . . . $enable_hddtemp
1037 load . . . . . . . $enable_load
1038 memory . . . . . . $enable_memory
1039 mysql . . . . . . . $enable_mysql
1040 nfs . . . . . . . . $enable_nfs
1041 ping . . . . . . . $enable_ping
1042 processes . . . . . $enable_processes
1043 sensors . . . . . . $enable_sensors
1044 serial . . . . . . $enable_serial
1045 swap . . . . . . . $enable_swap
1046 tape . . . . . . . $enable_tape
1047 traffic . . . . . . $enable_traffic
1048 users . . . . . . . $enable_users
1049 vserver . . . . . . $enable_vserver
1050 wireless . . . . . $enable_wireless