1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, 3.8.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(errno.h)
38 AC_CHECK_HEADERS(math.h)
39 AC_CHECK_HEADERS(syslog.h)
40 AC_CHECK_HEADERS(fcntl.h)
41 AC_CHECK_HEADERS(signal.h)
42 AC_CHECK_HEADERS(assert.h)
43 AC_CHECK_HEADERS(sys/types.h)
44 AC_CHECK_HEADERS(sys/socket.h)
45 AC_CHECK_HEADERS(sys/select.h)
46 AC_CHECK_HEADERS(netdb.h)
47 AC_CHECK_HEADERS(arpa/inet.h)
48 AC_CHECK_HEADERS(sys/resource.h)
49 AC_CHECK_HEADERS(sys/param.h)
52 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
57 AC_CHECK_HEADERS(netinet/in.h, [], [],
61 #if HAVE_NETINET_IN_SYSTM_H
62 # include <netinet/in_systm.h>
65 AC_CHECK_HEADERS(netinet/ip.h, [], [],
69 #if HAVE_NETINET_IN_SYSTM_H
70 # include <netinet/in_systm.h>
73 # include <netinet/in.h>
76 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
80 #if HAVE_NETINET_IN_SYSTM_H
81 # include <netinet/in_systm.h>
84 # include <netinet/in.h>
87 # include <netinet/ip.h>
90 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
94 #if HAVE_NETINET_IN_SYSTM_H
95 # include <netinet/in_systm.h>
98 # include <netinet/in.h>
100 #if HAVE_NETINET_IP_H
101 # include <netinet/ip.h>
104 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
109 # include <sys/types.h>
111 #if HAVE_NETINET_IN_SYSTM_H
112 # include <netinet/in_systm.h>
114 #if HAVE_NETINET_IN_H
115 # include <netinet/in.h>
118 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
123 # include <sys/types.h>
125 #if HAVE_NETINET_IN_SYSTM_H
126 # include <netinet/in_systm.h>
128 #if HAVE_NETINET_IN_H
129 # include <netinet/in.h>
131 #if HAVE_NETINET_IP6_H
132 # include <netinet/ip6.h>
137 AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
140 AC_CHECK_HEADERS(sys/loadavg.h)
143 AC_CHECK_HEADERS(utmp.h)
144 AC_CHECK_HEADERS(utmpx.h)
147 AC_CHECK_HEADERS(curl/curl.h)
150 AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h)
151 AC_CHECK_HEADERS(ctype.h)
152 AC_CHECK_HEADERS(limits.h)
153 AC_CHECK_HEADERS(sys/quota.h)
154 AC_CHECK_HEADERS(xfs/xqm.h)
156 # For mount interface
157 AC_CHECK_HEADERS(fs_info.h)
158 AC_CHECK_HEADERS(fshelp.h)
159 AC_CHECK_HEADERS(paths.h)
160 AC_CHECK_HEADERS(mntent.h)
161 AC_CHECK_HEADERS(mnttab.h)
162 AC_CHECK_HEADERS(sys/fstyp.h)
163 AC_CHECK_HEADERS(sys/fs_types.h)
164 AC_CHECK_HEADERS(sys/mntent.h)
165 AC_CHECK_HEADERS(sys/mnttab.h)
166 AC_CHECK_HEADERS(sys/mount.h)
167 AC_CHECK_HEADERS(sys/statfs.h)
168 AC_CHECK_HEADERS(sys/statvfs.h)
169 AC_CHECK_HEADERS(sys/vfs.h)
170 AC_CHECK_HEADERS(sys/vfstab.h)
172 # For debugging interface (variable number of arguments)
173 AC_CHECK_HEADERS(stdarg.h)
175 dnl Checking for libraries
179 # Checks for typedefs, structures, and compiler characteristics.
188 # Checks for library functions.
190 AC_PROG_GCC_TRADITIONAL
191 AC_CHECK_FUNCS(gettimeofday select strdup strtol)
192 AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket))
193 AC_CHECK_FUNCS(getaddrinfo getnameinfo)
194 AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen)
195 AC_CHECK_FUNCS(strncasecmp strcasecmp)
196 AC_CHECK_FUNCS(openlog syslog closelog)
199 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
202 AC_CHECK_FUNCS(statfs statvfs)
205 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
208 AC_CHECK_FUNCS(getutent getutxent)
211 AC_CHECK_FUNCS(quotactl)
212 AC_CHECK_FUNCS(getgrgid getpwuid)
214 # For mount interface
215 AC_CHECK_FUNCS(getfsent getvfsent listmntent)
216 AC_CHECK_FUNCS(getfsstat)
218 # Check for different versions of `getmntent' here..
220 if test "x$ac_cv_lib_sun_getmntent" = "xyes"
222 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
223 [Define if the function getmntent exists. It's the version from libsun.])
225 if test "x$ac_cv_lib_seq_getmntent" = "xyes"
227 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
228 [Define if the function getmntent exists. It's the version from libseq.])
230 if test "x$ac_cv_lib_gen_getmntent" = "xyes"
232 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
233 [Define if the function getmntent exists. It's the version from libgen.])
236 if test "x$ac_cv_func_getmntent" = "xyes"; then
238 CFLAGS="-Wall -Werror $CFLAGS"
239 AC_CACHE_CHECK([whether getmntent takes one argument],
242 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
243 #include "$srcdir/src/utils_mount.h"]],
244 [[(void)getmntent((FILE *)NULL);]]
246 [fu_cv_getmntent1=yes],
247 [fu_cv_getmntent1=no]
250 if test "x$fu_cv_getmntent1" = "xno"; then
251 AC_CACHE_CHECK([whether getmntent takes two arguments],
254 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
255 #include "$srcdir/src/utils_mount.h"]],
256 [[(void)getmntent((FILE *)NULL,
257 (struct mnttab *)NULL);]]
259 [fu_cv_getmntent2=yes],
260 [fu_cv_getmntent2=no]
266 if test "x$fu_cv_getmntent1" = "xyes"; then
267 AC_DEFINE(HAVE_GETMNTENT1,
269 [Define if there is a function named getmntent
270 for reading the list of mounted filesystems, and
271 that function takes a single argument. (4.3BSD,
272 SunOS, HP-UX, Dynix, Irix, Linux)]
275 if test "x$fu_cv_getmntent2" = "xyes"; then
276 AC_DEFINE(HAVE_GETMNTENT2,
278 [Define if there is a function named getmntent
279 for reading the list of mounted filesystems, and
280 that function takes two arguments. (SVR4)]
284 AC_MSG_CHECKING([for kernel type ($host_os)])
287 AC_DEFINE([KERNEL_LINUX], [], [True if program is to be compiled for a Linux kernel])
291 AC_DEFINE([KERNEL_SOLARIS], [], [True if program is to be compiled for a Solaris kernel])
297 AC_MSG_RESULT([$ac_system])
300 AC_CHECK_LIB(socket, socket,
302 AC_DEFINE(HAVE_LIBSOCKET, 1, [Define to 1 if you have the 'socket' library (-lsocket).])
304 [with_libsocket="no"])
305 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$with_libsocket" = "xyes")
308 AC_CHECK_LIB(resolv, res_search,
310 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
312 [with_libresolv="no"])
313 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
316 AC_CHECK_LIB(curl, curl_easy_init,
318 AC_DEFINE(HAVE_LIBCURL, 1, [Define to 1 if you have the 'curl' library (-lcurl).])
321 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
323 if test "x$with_libcurl" = "xyes"
325 with_libcurl_libs=`curl-config --libs`
326 if test "x$with_libcurl_libs" != "x"
328 BUILD_WITH_LIBCURL_LIBS="$with_libcurl_libs";
329 AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
333 m4_divert_once([HELP_WITH], [
334 collectd additional packages:])
336 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
337 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
338 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
340 LDFLAGS="$LDFLAGS -L$withval/lib"
341 CPPFLAGS="$CPPFLAGS -I$withval/include"
344 ], [with_rrdtool="yes"])
345 if test "x$with_rrdtool" = "xyes"
347 AC_CHECK_LIB(rrd, rrd_update,
349 AC_DEFINE(HAVE_LIBRRD, 1, [Define to 1 if you have the rrd library (-lrrd).])
351 [with_rrdtool="no (librrd not found)"], [-lm])
353 if test "x$with_rrdtool" = "xyes"
355 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
357 if test "x$with_rrdtool" = "xyes"
363 AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
364 [Wether or not to use rrdtool library])
365 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
367 #AC_ARG_WITH(pth, [AS_HELP_STRING([--with-pth=@<:@=PREFIX@:>@], [Path to pth (experimental).]),
368 #[ if test "x$withval" != "xno" && test "x$withval" != "xyes"
370 # LDFLAGS="$LDFLAGS -L$withval/lib"
371 # CPPFLAGS="$CPPFLAGS -I$withval/include"
375 #if test "x$with_pth" = "xyes"
377 # AC_CHECK_LIB(pth, pth_init,, [with_pth="no (libpth not found)"], [])
379 #if test "x$with_pth" = "xyes"
381 # AC_CHECK_HEADERS(pth.h,, [with_pth="no (pth.h not found)"])
383 #if test "x$with_pth" = "xyes"
389 #AC_DEFINE_UNQUOTED(COLLECT_PTH, [$collect_pth],
390 # [Wether or not to use pth (portable threads) library])
391 #AM_CONDITIONAL(BUILD_WITH_PTH, test "x$with_pth" = "xyes")
393 if test "$ac_system" = "Solaris"
397 with_kstat="no (Solaris only)"
399 if test "x$with_kstat" = "xyes"
401 AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
403 if test "x$with_kstat" = "xyes"
405 AC_CHECK_LIB(devinfo, di_init)
406 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
408 if test "x$with_kstat" = "xyes"
414 AC_DEFINE_UNQUOTED(COLLECT_KSTAT, [$collect_kstat],
415 [Wether or not to use kstat library (Solaris)])
416 AM_CONDITIONAL(BUILD_WITH_KSTAT, test "x$with_kstat" = "xyes")
418 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
420 if test "x$withval" != "xno" && test "x$withval" != "xyes"
422 LDFLAGS="$LDFLAGS -L$withval/lib"
423 CPPFLAGS="$CPPFLAGS -I$withval/include"
424 with_libstatgrab="yes"
428 if test "x$ac_system" == "xunknown"
430 with_libstatgrab="yes"
432 with_libstatgrab="no"
435 if test "x$with_libstatgrab" = "xyes"
437 AC_CHECK_LIB(devstat, getdevs)
438 AC_CHECK_LIB(kvm, kvm_getargv)
439 AC_CHECK_LIB(statgrab, sg_init,, [with_libstatgrab="no (libstatgrab not found)"])
441 if test "x$with_libstatgrab" = "xyes"
443 AC_CHECK_HEADERS(statgrab.h,, [with_libstatgrab="no (statgrab.h not found)"])
445 if test "x$with_libstatgrab" = "xyes"
447 collect_libstatgrab=1
449 collect_libstatgrab=0
451 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
452 [Wether or not to use statgrab library])
453 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
455 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
457 if test "x$withval" != "xno" && test "x$withval" != "xyes"
459 LDFLAGS="$LDFLAGS -L$withval/lib"
460 CPPFLAGS="$CPPFLAGS -I$withval/include"
461 with_lm_sensors="yes"
465 if test "x$ac_system" = "xLinux"
467 with_lm_sensors="yes"
472 if test "x$with_lm_sensors" = "xyes"
474 AC_CHECK_LIB(sensors, sensors_init,
476 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
478 [with_lm_sensors="no (libsensors not found)"])
480 if test "x$with_lm_sensors" = "xyes"
482 AC_CHECK_HEADERS(sensors/sensors.h,
484 AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
486 [with_lm_sensors="no (sensors/sensors.h not found)"])
488 if test "x$with_lm_sensors" = "xyes"
494 AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors],
495 [Wether or not to use sensors library])
496 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
498 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
500 if test "x$withval" != "xno" && test "x$withval" != "xyes"
502 LDFLAGS="$LDFLAGS -L$withval/lib"
503 CPPFLAGS="$CPPFLAGS -I$withval/include"
510 if test "x$with_libmysql" = "xyes"
512 AC_CHECK_LIB(mysqlclient, mysql_init,
514 AC_DEFINE(HAVE_LIBMYSQLCLIENT, 1, [Define to 1 if you have the mysqlclient library (-lmysqlclient).])
515 ], [with_libmysql="no (libmysql not found)"])
517 if test "x$with_libmysql" = "xyes"
519 AC_CHECK_HEADERS(mysql/mysql.h,
521 AC_DEFINE(HAVE_MYSQL_MYSQL_H, 1, [Define to 1 if you have the <mysql/mysql.h> header file.])
522 ], [with_libmysql="no (mysql/mysql.h not found)"])
524 if test "x$with_libmysql" = "xyes"
530 AC_DEFINE_UNQUOTED(COLLECT_LIBMYSQL, [$collect_libmysql],
531 [Wether or not to use mysql library])
532 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
534 # Define `step' and `hearbeat' values..
535 declare -i collectd_step=10
536 declare -i collectd_heartbeat=25
537 AC_ARG_WITH(step, [AS_HELP_STRING([--with-step=SECONDS], [Interval in which plugins are queried.])],
539 if test "x$withval" != "xno" -a "x$withval" != "xyes"
541 declare -i tmp_collectd_step="$withval"
542 if test $tmp_collectd_step -gt 0
544 collectd_step=$tmp_collectd_step
545 let "collectd_heartbeat=$collectd_step*2"
549 AC_ARG_WITH(heartbeat, [AS_HELP_STRING([--with-heartbeat=SECONDS], [Heartbeat of the DS in generated RRD files.])],
551 if test "x$withval" != "xno" -a "x$withval" != "xyes"
553 declare -i tmp_collectd_heartbeat="$withval"
554 if test $tmp_collectd_heartbeat -gt 0
556 collectd_heartbeat=$tmp_collectd_heartbeat
561 if test $collectd_step -ne 10
563 AC_DEFINE_UNQUOTED(COLLECTD_STEP, "$collectd_step", [Interval in which plugins are queried.])
565 if test $collectd_heartbeat -ne 25
567 AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.])
571 # Check for enabled/disabled features
574 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
575 # ------------------------------------------------------------
577 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
582 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
587 m4_define([EnDis],[disabled])dnl
588 m4_define([YesNo],[no])dnl
594 m4_define([EnDis],[enabled])dnl
595 m4_define([YesNo],[yes])dnl
598 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
602 m4_if([$3], [feature], [],
606 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
612 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
614 enable_$1='[YesNo]'dnl
616 if test "x$enable_$1" = "xno"
620 if test "x$enable_$1" = "xyes"
624 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
629 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
630 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
632 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
634 m4_divert_once([HELP_ENABLE], [
636 AC_COLLECTD([debug], [enable], [feature], [debugging])
637 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
639 m4_divert_once([HELP_ENABLE], [
641 AC_COLLECTD([apache], [disable], [module], [Apache httpd statistics])
642 AC_COLLECTD([battery], [disable], [module], [battery statistics])
643 AC_COLLECTD([cpu], [disable], [module], [cpu usage statistics])
644 AC_COLLECTD([cpufreq], [disable], [module], [system cpu frequency statistics])
645 AC_COLLECTD([disk], [disable], [module], [disk/partition statistics])
646 AC_COLLECTD([df], [disable], [module], [df statistics])
647 AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)])
648 AC_COLLECTD([hddtemp], [disable], [module], [hdd temperature statistics])
649 AC_COLLECTD([load], [disable], [module], [system load statistics])
650 AC_COLLECTD([memory], [disable], [module], [memory statistics])
651 AC_COLLECTD([mysql], [disable], [module], [mysql statistics])
652 AC_COLLECTD([nfs], [disable], [module], [nfs statistics])
653 AC_COLLECTD([ping], [disable], [module], [ping statistics])
654 AC_COLLECTD([processes], [disable], [module], [processes statistics])
655 AC_COLLECTD([sensors], [disable], [module], [lm_sensors statistics])
656 AC_COLLECTD([serial], [disable], [module], [serial statistics])
657 AC_COLLECTD([swap], [disable], [module], [swap statistics])
658 AC_COLLECTD([tape], [disable], [module], [tape statistics])
659 AC_COLLECTD([traffic], [disable], [module], [system traffic statistics])
660 AC_COLLECTD([users], [disable], [module], [user count statistics])
661 AC_COLLECTD([vserver], [disable], [module], [vserver statistics])
662 AC_COLLECTD([wireless], [disable], [module], [wireless link statistics])
664 #m4_divert_once([HELP_ENABLE], [
666 #AC_ARG_ENABLE(cpu, AC_HELP_STRING([--disable-cpu], [Disable CPU usage statistics]),, [enable_cpu="yes"])
667 #if test "x$enable_cpu" != "xno"
669 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$have_sysctlbyname" = "xyes"
676 #if test "x$enable_cpu" = "xno"
678 # AC_DEFINE(COLLECT_CPU, 0, [Wether or not to collect CPU usage statistics])
680 #AM_CONDITIONAL(BUILD_MODULE_CPU, test "x$enable_cpu" = "xyes")
682 #AC_ARG_ENABLE(cpufreq, AC_HELP_STRING([--disable-cpufreq], [Disable system cpu frequency statistics]),, [enable_cpufreq="yes"])
683 #if test "x$enable_cpufreq" != "xno"
685 # if test "x$ac_system" = "xLinux"
687 # enable_cpufreq="yes"
689 # enable_cpufreq="no"
692 #if test "x$enable_cpufreq" = "xno"
694 # AC_DEFINE(COLLECT_CPUFREQ, 0, [Wether or not to collect cpu frequency statistics])
696 #AM_CONDITIONAL(BUILD_MODULE_CPUFREQ, test "x$enable_cpufreq" = "xyes")
698 #AC_ARG_ENABLE(disk, AC_HELP_STRING([--disable-disk], [Disable disk/partition statistics]),, [enable_disk="yes"])
699 #if test "x$enable_disk" != "xno"
701 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes"
708 #if test "x$enable_disk" = "xno"
710 # AC_DEFINE(COLLECT_DISK, 0, [Wether or not to collect diskstats])
712 #AM_CONDITIONAL(BUILD_MODULE_DISK, test "x$enable_disk" = "xyes")
714 #AC_ARG_ENABLE(hddtemp, AC_HELP_STRING([--disable-hddtemp], [Disable hdd temperature statistics]),, [enable_hddtemp="yes"])
715 #if test "x$enable_hddtemp" = "xno"
717 # AC_DEFINE(COLLECT_HDDTEMP, 0, [Wether or not to collect hdd temperature statistics])
719 #AM_CONDITIONAL(BUILD_MODULE_HDDTEMP, test "x$enable_hddtemp" = "xyes")
721 #AC_ARG_ENABLE(load, AC_HELP_STRING([--disable-load], [Disable system load statistics]),, [enable_load="yes"])
722 #if test "x$enable_load" != "xno"
724 # if test "x$have_getloadavg" = "xyes" -o "x$ac_system" = "xLinux" -o "x$with_libstatgrab" = "xyes"
731 #if test "x$enable_load" = "xno"
733 # AC_DEFINE(COLLECT_LOAD, 0, [Wether or not to collect system load statistics])
735 #AM_CONDITIONAL(BUILD_MODULE_LOAD, test "x$enable_load" = "xyes")
737 #AC_ARG_ENABLE(memory, AC_HELP_STRING([--disable-memory], [Disable memory statistics]),, [enable_memory="yes"])
738 #if test "x$enable_memory" != "xno"
740 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
742 # enable_memory="yes"
747 #if test "x$enable_memory" = "xno"
749 # AC_DEFINE(COLLECT_MEMORY, 0, [Wether or not to collect memory statistics])
751 #AM_CONDITIONAL(BUILD_MODULE_MEMORY, test "x$enable_memory" = "xyes")
753 #AC_ARG_ENABLE(nfs, AC_HELP_STRING([--disable-nfs], [Disable nfs statistics]),, [enable_nfs="yes"])
754 #if test "x$enable_nfs" != "xno"
756 # if test "x$ac_system" = "xLinux"
763 #if test "x$enable_nfs" = "xno"
765 # AC_DEFINE(COLLECT_NFS, 0, [Wether or not to collect nfs statistics])
767 #AM_CONDITIONAL(BUILD_MODULE_NFS, test "x$enable_nfs" = "xyes")
769 #AC_ARG_ENABLE(ping, AC_HELP_STRING([--disable-ping], [Disable ping statistics]),, [enable_ping="yes"])
770 #if test "x$enable_ping" != "xno"
774 #if test "x$enable_ping" = "xno"
776 # AC_DEFINE(COLLECT_PING, 0, [Wether or not to collect ping statistics])
778 #AM_CONDITIONAL(BUILD_MODULE_PING, test "x$enable_ping" = "xyes")
780 #AC_ARG_ENABLE(processes, AC_HELP_STRING([--disable-processes], [Disable processes statistics]),, [enable_processes="yes"])
781 #if test "x$enable_processes" != "xno"
783 # if test "x$ac_system" = "xLinux"
785 # enable_processes="yes"
787 # enable_processes="no"
790 #if test "x$enable_processes" = "xno"
792 # AC_DEFINE(COLLECT_PROCESSES, 0, [Wether or not to collect processes statistics])
794 #AM_CONDITIONAL(BUILD_MODULE_PROCESSES, test "x$enable_processes" = "xyes")
796 ##AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)])
798 #AC_ARG_ENABLE(sensors, AC_HELP_STRING([--disable-sensors], [Disable lm_sensors statistics]),, [enable_sensors=$with_lm_sensors])
799 #if test "x$enable_sensors" != "xno"
801 # if test "x$with_lm_sensors" = "xyes"
803 # enable_sensors="yes"
805 # enable_sensors="no"
808 #if test "x$enable_sensors" = "xno"
810 # AC_DEFINE(COLLECT_SENSORS, 0, [Wether or not to collect lm_sensors statistics])
812 #AM_CONDITIONAL(BUILD_MODULE_SENSORS, test "x$enable_sensors" = "xyes")
814 #AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [Disable serial statistics]),, [enable_serial="yes"])
815 #if test "x$enable_serial" != "xno"
817 # if test "x$ac_system" = "xLinux"
819 # enable_serial="yes"
824 #if test "x$enable_serial" = "xno"
826 # AC_DEFINE(COLLECT_SERIAL, 0, [Wether or not to collect serial statistics])
828 #AM_CONDITIONAL(BUILD_MODULE_SERIAL, test "x$enable_serial" = "xyes")
830 #AC_ARG_ENABLE(swap, AC_HELP_STRING([--disable-swap], [Disable swap statistics]),, [enable_swap="yes"])
831 #if test "x$enable_swap" != "xno"
833 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
840 #if test "x$enable_swap" = "xno"
842 # AC_DEFINE(COLLECT_SWAP, 0, [Wether or not to collect swap statistics])
844 #AM_CONDITIONAL(BUILD_MODULE_SWAP, test "x$enable_swap" = "xyes")
846 #AC_ARG_ENABLE(tape, AC_HELP_STRING([--disable-tape], [Disable tape statistics]),, [enable_tape="yes"])
847 #if test "x$enable_tape" != "xno"
849 # if test "x$with_kstat" = "xyes"
856 #if test "x$enable_tape" = "xno"
858 # AC_DEFINE(COLLECT_TAPE, 0, [Wether or not to collect tape statistics])
860 #AM_CONDITIONAL(BUILD_MODULE_TAPE, test "x$enable_tape" = "xyes")
862 #AC_ARG_ENABLE(traffic, AC_HELP_STRING([--disable-traffic], [Disable system traffic statistics]),, [enable_traffic="yes"])
863 #if test "x$enable_traffic" != "xno"
865 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
867 # enable_traffic="yes"
869 # enable_traffic="no"
872 #if test "x$enable_traffic" = "xno"
874 # AC_DEFINE(COLLECT_TRAFFIC, 0, [Wether or not to collect network traffic statistics])
876 #AM_CONDITIONAL(BUILD_MODULE_TRAFFIC, test "x$enable_traffic" = "xyes")
878 #AC_COLLECTD([users], [disable], [module], [user count statistics])
880 AC_OUTPUT(Makefile src/libconfig/Makefile src/liboping/Makefile src/Makefile)
886 libcurl . . . . . . $with_libcurl
887 librrd . . . . . . $with_rrdtool
888 lm_sensors . . . . $with_lm_sensors
889 libstatgrab . . . . $with_libstatgrab
890 libkstat . . . . . $with_kstat
891 libmysql . . . . . $with_libmysql
894 debug . . . . . . . $enable_debug
895 daemon mode . . . . $enable_daemon
896 step . . . . . . . $collectd_step seconds
897 heartbeat . . . . . $collectd_heartbeat seconds
900 battery . . . . . . $enable_battery
901 cpu . . . . . . . . $enable_cpu
902 cpufreq . . . . . . $enable_cpufreq
903 df . . . . . . . . $enable_df
904 disk . . . . . . . $enable_disk
905 hddtemp . . . . . . $enable_hddtemp
906 load . . . . . . . $enable_load
907 memory . . . . . . $enable_memory
908 mysql . . . . . . . $enable_mysql
909 nfs . . . . . . . . $enable_nfs
910 ping . . . . . . . $enable_ping
911 processes . . . . . $enable_processes
912 sensors . . . . . . $enable_sensors
913 serial . . . . . . $enable_serial
914 swap . . . . . . . $enable_swap
915 tape . . . . . . . $enable_tape
916 traffic . . . . . . $enable_traffic
917 users . . . . . . . $enable_users
918 vserver . . . . . . $enable_vserver
919 wireless . . . . . $enable_wireless