3b179106c37477577e1d8ac2507866defd6995b0
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)
6 AC_LANG(C)
8 AC_PREFIX_DEFAULT("/opt/collectd")
10 #
11 # Checks for programs.
12 #
13 AC_PROG_CC
14 AC_PROG_CPP
15 AC_PROG_INSTALL
16 AC_PROG_LN_S
17 AC_PROG_MAKE_SET
18 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
20 dnl configure libtool
21 AC_DISABLE_STATIC
22 AC_LIBLTDL_CONVENIENCE
23 AC_SUBST(LTDLINCL)
24 AC_SUBST(LIBLTDL)
25 AC_LIBTOOL_DLOPEN
26 AC_PROG_LIBTOOL
27 #AC_PROG_RANLIB
28 AC_CONFIG_SUBDIRS(libltdl src/libconfig)
30 #
31 # Checks for header files.
32 #
33 AC_HEADER_STDC
34 AC_HEADER_SYS_WAIT
35 AC_HEADER_DIRENT
36 AC_CHECK_HEADERS(stdint.h)
37 AC_CHECK_HEADERS(errno.h)
38 AC_CHECK_HEADERS(syslog.h)
39 AC_CHECK_HEADERS(fcntl.h)
40 AC_CHECK_HEADERS(signal.h)
41 AC_CHECK_HEADERS(assert.h)
42 AC_CHECK_HEADERS(sys/types.h)
43 AC_CHECK_HEADERS(sys/socket.h)
44 AC_CHECK_HEADERS(sys/select.h)
45 AC_CHECK_HEADERS(netdb.h)
46 AC_CHECK_HEADERS(arpa/inet.h)
47 AC_CHECK_HEADERS(sys/resource.h)
48 AC_CHECK_HEADERS(sys/param.h)
50 # For ping library
51 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
52 [#if HAVE_STDINT_H
53 # include <stdint.h>
54 #endif
55 ])
56 AC_CHECK_HEADERS(netinet/in.h, [], [],
57 [#if HAVE_STDINT_H
58 # include <stdint.h>
59 #endif
60 #if HAVE_NETINET_IN_SYSTM_H
61 # include <netinet/in_systm.h>
62 #endif
63 ])
64 AC_CHECK_HEADERS(netinet/ip.h, [], [],
65 [#if HAVE_STDINT_H
66 # include <stdint.h>
67 #endif
68 #if HAVE_NETINET_IN_SYSTM_H
69 # include <netinet/in_systm.h>
70 #endif
71 #if HAVE_NETINET_IN_H
72 # include <netinet/in.h>
73 #endif
74 ])
75 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
76 [#if HAVE_STDINT_H
77 # include <stdint.h>
78 #endif
79 #if HAVE_NETINET_IN_SYSTM_H
80 # include <netinet/in_systm.h>
81 #endif
82 #if HAVE_NETINET_IN_H
83 # include <netinet/in.h>
84 #endif
85 #if HAVE_NETINET_IP_H
86 # include <netinet/ip.h>
87 #endif
88 ])
89 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
90 [#if HAVE_STDINT_H
91 # include <stdint.h>
92 #endif
93 #if HAVE_NETINET_IN_SYSTM_H
94 # include <netinet/in_systm.h>
95 #endif
96 #if HAVE_NETINET_IN_H
97 # include <netinet/in.h>
98 #endif
99 #if HAVE_NETINET_IP_H
100 # include <netinet/ip.h>
101 #endif
102 ])
103 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
104 [#if HAVE_STDINT_H
105 # include <stdint.h>
106 #endif
107 #if HAVE_SYS_TYPES_H
108 # include <sys/types.h>
109 #endif
110 #if HAVE_NETINET_IN_SYSTM_H
111 # include <netinet/in_systm.h>
112 #endif
113 #if HAVE_NETINET_IN_H
114 # include <netinet/in.h>
115 #endif
116 ])
117 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
118 [#if HAVE_STDINT_H
119 # include <stdint.h>
120 #endif
121 #if HAVE_SYS_TYPES_H
122 # include <sys/types.h>
123 #endif
124 #if HAVE_NETINET_IN_SYSTM_H
125 # include <netinet/in_systm.h>
126 #endif
127 #if HAVE_NETINET_IN_H
128 # include <netinet/in.h>
129 #endif
130 #if HAVE_NETINET_IP6_H
131 # include <netinet/ip6.h>
132 #endif
133 ])
135 # For cpu modules
136 AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
138 # For load module
139 AC_CHECK_HEADERS(sys/loadavg.h)
141 # For users module
142 AC_CHECK_HEADERS(utmp.h)
143 AC_CHECK_HEADERS(utmpx.h)
145 # For apache plugin
146 AC_CHECK_HEADERS(curl/curl.h)
148 # For quota module
149 AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h)
150 AC_CHECK_HEADERS(ctype.h)
151 AC_CHECK_HEADERS(limits.h)
152 AC_CHECK_HEADERS(sys/quota.h)
153 AC_CHECK_HEADERS(xfs/xqm.h)
155 # For mount interface
156 AC_CHECK_HEADERS(fs_info.h)
157 AC_CHECK_HEADERS(fshelp.h)
158 AC_CHECK_HEADERS(paths.h)
159 AC_CHECK_HEADERS(mntent.h)
160 AC_CHECK_HEADERS(mnttab.h)
161 AC_CHECK_HEADERS(sys/fstyp.h)
162 AC_CHECK_HEADERS(sys/fs_types.h)
163 AC_CHECK_HEADERS(sys/mntent.h)
164 AC_CHECK_HEADERS(sys/mnttab.h)
165 AC_CHECK_HEADERS(sys/mount.h)
166 AC_CHECK_HEADERS(sys/statfs.h)
167 AC_CHECK_HEADERS(sys/statvfs.h)
168 AC_CHECK_HEADERS(sys/vfs.h)
169 AC_CHECK_HEADERS(sys/vfstab.h)
171 # For debugging interface (variable number of arguments)
172 AC_CHECK_HEADERS(stdarg.h)
174 dnl Checking for libraries
175 AC_CHECK_LIB(m, ext)
177 #
178 # Checks for typedefs, structures, and compiler characteristics.
179 #
180 AC_C_CONST
181 AC_TYPE_PID_T
182 AC_TYPE_SIZE_T
183 AC_TYPE_UID_T
184 AC_HEADER_TIME
186 #
187 # Checks for library functions.
188 #
189 AC_PROG_GCC_TRADITIONAL
190 AC_CHECK_FUNCS(gettimeofday select strdup strtol)
191 AC_CHECK_FUNCS(socket, , AC_CHECK_LIB(socket, socket))
192 AC_CHECK_FUNCS(getaddrinfo getnameinfo)
193 AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen)
194 AC_CHECK_FUNCS(strncasecmp strcasecmp)
195 AC_CHECK_FUNCS(openlog syslog closelog)
197 # For cpu module
198 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
200 # For df module
201 AC_CHECK_FUNCS(statfs statvfs)
203 # For load module
204 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
206 # For users module
207 AC_CHECK_FUNCS(getutent getutxent)
209 # For quota module
210 AC_CHECK_FUNCS(quotactl)
211 AC_CHECK_FUNCS(getgrgid getpwuid)
213 # For mount interface
214 AC_CHECK_FUNCS(getfsent getvfsent listmntent)
215 AC_CHECK_FUNCS(getfsstat)
217 # Check for different versions of `getmntent' here..
218 AC_FUNC_GETMNTENT
219 if test "x$ac_cv_lib_sun_getmntent" = "xyes"
220 then
221 AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
222 [Define if the function getmntent exists. It's the version from libsun.])
223 fi
224 if test "x$ac_cv_lib_seq_getmntent" = "xyes"
225 then
226 AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
227 [Define if the function getmntent exists. It's the version from libseq.])
228 fi
229 if test "x$ac_cv_lib_gen_getmntent" = "xyes"
230 then
231 AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
232 [Define if the function getmntent exists. It's the version from libgen.])
233 fi
235 if test "x$ac_cv_func_getmntent" = "xyes"; then
236 saveCFLAGS="$CFLAGS"
237 CFLAGS="-Wall -Werror $CFLAGS"
238 AC_CACHE_CHECK([whether getmntent takes one argument],
239 [fu_cv_getmntent1],
240 AC_COMPILE_IFELSE(
241 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
242 #include "$srcdir/src/utils_mount.h"]],
243 [[(void)getmntent((FILE *)NULL);]]
244 ),
245 [fu_cv_getmntent1=yes],
246 [fu_cv_getmntent1=no]
247 )
248 )
249 if test "x$fu_cv_getmntent1" = "xno"; then
250 AC_CACHE_CHECK([whether getmntent takes two arguments],
251 [fu_cv_getmntent2],
252 AC_COMPILE_IFELSE(
253 AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
254 #include "$srcdir/src/utils_mount.h"]],
255 [[(void)getmntent((FILE *)NULL,
256 (struct mnttab *)NULL);]]
257 ),
258 [fu_cv_getmntent2=yes],
259 [fu_cv_getmntent2=no]
260 )
261 )
262 fi
263 CFLAGS="$saveCFLAGS"
264 fi
265 if test "x$fu_cv_getmntent1" = "xyes"; then
266 AC_DEFINE(HAVE_GETMNTENT1,
267 1,
268 [Define if there is a function named getmntent
269 for reading the list of mounted filesystems, and
270 that function takes a single argument. (4.3BSD,
271 SunOS, HP-UX, Dynix, Irix, Linux)]
272 )
273 fi
274 if test "x$fu_cv_getmntent2" = "xyes"; then
275 AC_DEFINE(HAVE_GETMNTENT2,
276 1,
277 [Define if there is a function named getmntent
278 for reading the list of mounted filesystems, and
279 that function takes two arguments. (SVR4)]
280 )
281 fi
283 AC_MSG_CHECKING([for kernel type ($host_os)])
284 case $host_os in
285 *linux*)
286 AC_DEFINE([KERNEL_LINUX], [], [True if program is to be compiled for a Linux kernel])
287 ac_system="Linux"
288 ;;
289 *solaris*)
290 AC_DEFINE([KERNEL_SOLARIS], [], [True if program is to be compiled for a Solaris kernel])
291 ac_system="Solaris"
292 ;;
293 *)
294 ac_system="unknown"
295 esac
296 AC_MSG_RESULT([$ac_system])
298 with_libsocket="yes"
299 AC_CHECK_LIB(socket, socket,
300 [
301 AC_DEFINE(HAVE_LIBSOCKET, 1, [Define to 1 if you have the 'socket' library (-lsocket).])
302 ],
303 [with_libsocket="no"])
304 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$with_libsocket" = "xyes")
306 with_libresolv="yes"
307 AC_CHECK_LIB(resolv, res_search,
308 [
309 AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
310 ],
311 [with_libresolv="no"])
312 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
314 with_libcurl="yes"
315 AC_CHECK_LIB(curl, curl_easy_init,
316 [
317 AC_DEFINE(HAVE_LIBCURL, 1, [Define to 1 if you have the 'curl' library (-lcurl).])
318 ],
319 [with_libcurl="no"])
320 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
322 m4_divert_once([HELP_WITH], [
323 collectd additional packages:])
325 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
326 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
327 [ if test "x$withval" != "xno" && test "x$withval" != "xyes"
328 then
329 LDFLAGS="$LDFLAGS -L$withval/lib"
330 CPPFLAGS="$CPPFLAGS -I$withval/include"
331 with_rrdtool="yes"
332 fi
333 ], [with_rrdtool="yes"])
334 if test "x$with_rrdtool" = "xyes"
335 then
336 AC_CHECK_LIB(rrd, rrd_update,
337 [
338 AC_DEFINE(HAVE_LIBRRD, 1, [Define to 1 if you have the rrd library (-lrrd).])
339 ],
340 [with_rrdtool="no (librrd not found)"], [-lm])
341 fi
342 if test "x$with_rrdtool" = "xyes"
343 then
344 AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
345 fi
346 if test "x$with_rrdtool" = "xyes"
347 then
348 collect_rrdtool=1
349 else
350 collect_rrdtool=0
351 fi
352 AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
353 [Wether or not to use rrdtool library])
354 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
356 #AC_ARG_WITH(pth, [AS_HELP_STRING([--with-pth=@<:@=PREFIX@:>@], [Path to pth (experimental).]),
357 #[ if test "x$withval" != "xno" && test "x$withval" != "xyes"
358 # then
359 # LDFLAGS="$LDFLAGS -L$withval/lib"
360 # CPPFLAGS="$CPPFLAGS -I$withval/include"
361 # with_pth="yes"
362 # fi
363 #], [with_pth="no"])
364 #if test "x$with_pth" = "xyes"
365 #then
366 # AC_CHECK_LIB(pth, pth_init,, [with_pth="no (libpth not found)"], [])
367 #fi
368 #if test "x$with_pth" = "xyes"
369 #then
370 # AC_CHECK_HEADERS(pth.h,, [with_pth="no (pth.h not found)"])
371 #fi
372 #if test "x$with_pth" = "xyes"
373 #then
374 # collect_pth=1
375 #else
376 # collect_pth=0
377 #fi
378 #AC_DEFINE_UNQUOTED(COLLECT_PTH, [$collect_pth],
379 # [Wether or not to use pth (portable threads) library])
380 #AM_CONDITIONAL(BUILD_WITH_PTH, test "x$with_pth" = "xyes")
382 if test "$ac_system" = "Solaris"
383 then
384 with_kstat="yes"
385 else
386 with_kstat="no (Solaris only)"
387 fi
388 if test "x$with_kstat" = "xyes"
389 then
390 AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
391 fi
392 if test "x$with_kstat" = "xyes"
393 then
394 AC_CHECK_LIB(devinfo, di_init)
395 AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
396 fi
397 if test "x$with_kstat" = "xyes"
398 then
399 collect_kstat=1
400 else
401 collect_kstat=0
402 fi
403 AC_DEFINE_UNQUOTED(COLLECT_KSTAT, [$collect_kstat],
404 [Wether or not to use kstat library (Solaris)])
405 AM_CONDITIONAL(BUILD_WITH_KSTAT, test "x$with_kstat" = "xyes")
407 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
408 [
409 if test "x$withval" != "xno" && test "x$withval" != "xyes"
410 then
411 LDFLAGS="$LDFLAGS -L$withval/lib"
412 CPPFLAGS="$CPPFLAGS -I$withval/include"
413 with_libstatgrab="yes"
414 fi
415 ],
416 [
417 if test "x$ac_system" == "xunknown"
418 then
419 with_libstatgrab="yes"
420 else
421 with_libstatgrab="no"
422 fi
423 ])
424 if test "x$with_libstatgrab" = "xyes"
425 then
426 AC_CHECK_LIB(devstat, getdevs)
427 AC_CHECK_LIB(kvm, kvm_getargv)
428 AC_CHECK_LIB(statgrab, sg_init,, [with_libstatgrab="no (libstatgrab not found)"])
429 fi
430 if test "x$with_libstatgrab" = "xyes"
431 then
432 AC_CHECK_HEADERS(statgrab.h,, [with_libstatgrab="no (statgrab.h not found)"])
433 fi
434 if test "x$with_libstatgrab" = "xyes"
435 then
436 collect_libstatgrab=1
437 else
438 collect_libstatgrab=0
439 fi
440 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
441 [Wether or not to use statgrab library])
442 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
444 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
445 [
446 if test "x$withval" != "xno" && test "x$withval" != "xyes"
447 then
448 LDFLAGS="$LDFLAGS -L$withval/lib"
449 CPPFLAGS="$CPPFLAGS -I$withval/include"
450 with_lm_sensors="yes"
451 fi
452 ],
453 [
454 if test "x$ac_system" = "xLinux"
455 then
456 with_lm_sensors="yes"
457 else
458 with_lm_sensors="no"
459 fi
460 ])
461 if test "x$with_lm_sensors" = "xyes"
462 then
463 AC_CHECK_LIB(sensors, sensors_init,
464 [
465 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
466 ],
467 [with_lm_sensors="no (libsensors not found)"])
468 fi
469 if test "x$with_lm_sensors" = "xyes"
470 then
471 AC_CHECK_HEADERS(sensors/sensors.h,
472 [
473 AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
474 ],
475 [with_lm_sensors="no (sensors/sensors.h not found)"])
476 fi
477 if test "x$with_lm_sensors" = "xyes"
478 then
479 collect_lm_sensors=1
480 else
481 collect_lm_sensors=0
482 fi
483 AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors],
484 [Wether or not to use sensors library])
485 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
487 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
488 [
489 if test "x$withval" != "xno" && test "x$withval" != "xyes"
490 then
491 LDFLAGS="$LDFLAGS -L$withval/lib"
492 CPPFLAGS="$CPPFLAGS -I$withval/include"
493 with_libmysql="yes"
494 fi
495 ],
496 [
497 with_libmysql="yes"
498 ])
499 if test "x$with_libmysql" = "xyes"
500 then
501 AC_CHECK_LIB(mysqlclient, mysql_init,
502 [
503 AC_DEFINE(HAVE_LIBMYSQLCLIENT, 1, [Define to 1 if you have the mysqlclient library (-lmysqlclient).])
504 ], [with_libmysql="no (libmysql not found)"])
505 fi
506 if test "x$with_libmysql" = "xyes"
507 then
508 AC_CHECK_HEADERS(mysql/mysql.h,
509 [
510 AC_DEFINE(HAVE_MYSQL_MYSQL_H, 1, [Define to 1 if you have the <mysql/mysql.h> header file.])
511 ], [with_libmysql="no (mysql/mysql.h not found)"])
512 fi
513 if test "x$with_libmysql" = "xyes"
514 then
515 collect_libmysql=1
516 else
517 collect_libmysql=0
518 fi
519 AC_DEFINE_UNQUOTED(COLLECT_LIBMYSQL, [$collect_libmysql],
520 [Wether or not to use mysql library])
521 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
523 #
524 # Check for enabled/disabled features
525 #
527 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
528 # ------------------------------------------------------------
529 dnl
530 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
531 dnl
532 AC_DEFUN(
533 [AC_COLLECTD],
534 [
535 m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
536 m4_if(
537 [$2],
538 [enable],
539 [dnl
540 m4_define([EnDis],[disabled])dnl
541 m4_define([YesNo],[no])dnl
542 ],dnl
543 [m4_if(
544 [$2],
545 [disable],
546 [dnl
547 m4_define([EnDis],[enabled])dnl
548 m4_define([YesNo],[yes])dnl
549 ],
550 [dnl
551 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
552 ]dnl
553 )]dnl
554 )dnl
555 m4_if([$3], [feature], [],
556 [m4_if(
557 [$3], [module], [],
558 [dnl
559 AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
560 ]dnl
561 )]dnl
562 )dnl
563 AC_ARG_ENABLE(
564 [$1],
565 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
566 [],
567 enable_$1='[YesNo]'dnl
568 )# AC_ARG_ENABLE
569 if test "x$enable_$1" = "xno"
570 then
571 collectd_$1=0
572 else
573 if test "x$enable_$1" = "xyes"
574 then
575 collectd_$1=1
576 else
577 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
578 collectd_$1=1
579 enable_$1='yes'
580 fi
581 fi
582 AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
583 AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
584 ]dnl
585 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
587 m4_divert_once([HELP_ENABLE], [
588 collectd features:])
589 AC_COLLECTD([debug], [enable], [feature], [debugging])
590 AC_COLLECTD([daemon], [disable], [feature], [daemon mode])
592 m4_divert_once([HELP_ENABLE], [
593 collectd modules:])
594 AC_COLLECTD([apache], [disable], [module], [Apache httpd statistics])
595 AC_COLLECTD([battery], [disable], [module], [battery statistics])
596 AC_COLLECTD([cpu], [disable], [module], [cpu usage statistics])
597 AC_COLLECTD([cpufreq], [disable], [module], [system cpu frequency statistics])
598 AC_COLLECTD([disk], [disable], [module], [disk/partition statistics])
599 AC_COLLECTD([df], [disable], [module], [df statistics])
600 AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)])
601 AC_COLLECTD([hddtemp], [disable], [module], [hdd temperature statistics])
602 AC_COLLECTD([load], [disable], [module], [system load statistics])
603 AC_COLLECTD([memory], [disable], [module], [memory statistics])
604 AC_COLLECTD([mysql], [disable], [module], [mysql statistics])
605 AC_COLLECTD([nfs], [disable], [module], [nfs statistics])
606 AC_COLLECTD([ping], [disable], [module], [ping statistics])
607 AC_COLLECTD([processes], [disable], [module], [processes statistics])
608 AC_COLLECTD([sensors], [disable], [module], [lm_sensors statistics])
609 AC_COLLECTD([serial], [disable], [module], [serial statistics])
610 AC_COLLECTD([swap], [disable], [module], [swap statistics])
611 AC_COLLECTD([tape], [disable], [module], [tape statistics])
612 AC_COLLECTD([traffic], [disable], [module], [system traffic statistics])
613 AC_COLLECTD([users], [disable], [module], [user count statistics])
614 AC_COLLECTD([vserver], [disable], [module], [vserver statistics])
615 AC_COLLECTD([wireless], [disable], [module], [wireless link statistics])
617 #m4_divert_once([HELP_ENABLE], [
618 #collectd modules:])
619 #AC_ARG_ENABLE(cpu, AC_HELP_STRING([--disable-cpu], [Disable CPU usage statistics]),, [enable_cpu="yes"])
620 #if test "x$enable_cpu" != "xno"
621 #then
622 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$have_sysctlbyname" = "xyes"
623 # then
624 # enable_cpu="yes"
625 # else
626 # enable_cpu="no"
627 # fi
628 #fi
629 #if test "x$enable_cpu" = "xno"
630 #then
631 # AC_DEFINE(COLLECT_CPU, 0, [Wether or not to collect CPU usage statistics])
632 #fi
633 #AM_CONDITIONAL(BUILD_MODULE_CPU, test "x$enable_cpu" = "xyes")
635 #AC_ARG_ENABLE(cpufreq, AC_HELP_STRING([--disable-cpufreq], [Disable system cpu frequency statistics]),, [enable_cpufreq="yes"])
636 #if test "x$enable_cpufreq" != "xno"
637 #then
638 # if test "x$ac_system" = "xLinux"
639 # then
640 # enable_cpufreq="yes"
641 # else
642 # enable_cpufreq="no"
643 # fi
644 #fi
645 #if test "x$enable_cpufreq" = "xno"
646 #then
647 # AC_DEFINE(COLLECT_CPUFREQ, 0, [Wether or not to collect cpu frequency statistics])
648 #fi
649 #AM_CONDITIONAL(BUILD_MODULE_CPUFREQ, test "x$enable_cpufreq" = "xyes")
651 #AC_ARG_ENABLE(disk, AC_HELP_STRING([--disable-disk], [Disable disk/partition statistics]),, [enable_disk="yes"])
652 #if test "x$enable_disk" != "xno"
653 #then
654 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes"
655 # then
656 # enable_disk="yes"
657 # else
658 # enable_disk="no"
659 # fi
660 #fi
661 #if test "x$enable_disk" = "xno"
662 #then
663 # AC_DEFINE(COLLECT_DISK, 0, [Wether or not to collect diskstats])
664 #fi
665 #AM_CONDITIONAL(BUILD_MODULE_DISK, test "x$enable_disk" = "xyes")
667 #AC_ARG_ENABLE(hddtemp, AC_HELP_STRING([--disable-hddtemp], [Disable hdd temperature statistics]),, [enable_hddtemp="yes"])
668 #if test "x$enable_hddtemp" = "xno"
669 #then
670 # AC_DEFINE(COLLECT_HDDTEMP, 0, [Wether or not to collect hdd temperature statistics])
671 #fi
672 #AM_CONDITIONAL(BUILD_MODULE_HDDTEMP, test "x$enable_hddtemp" = "xyes")
674 #AC_ARG_ENABLE(load, AC_HELP_STRING([--disable-load], [Disable system load statistics]),, [enable_load="yes"])
675 #if test "x$enable_load" != "xno"
676 #then
677 # if test "x$have_getloadavg" = "xyes" -o "x$ac_system" = "xLinux" -o "x$with_libstatgrab" = "xyes"
678 # then
679 # enable_load="yes"
680 # else
681 # enable_load="no"
682 # fi
683 #fi
684 #if test "x$enable_load" = "xno"
685 #then
686 # AC_DEFINE(COLLECT_LOAD, 0, [Wether or not to collect system load statistics])
687 #fi
688 #AM_CONDITIONAL(BUILD_MODULE_LOAD, test "x$enable_load" = "xyes")
690 #AC_ARG_ENABLE(memory, AC_HELP_STRING([--disable-memory], [Disable memory statistics]),, [enable_memory="yes"])
691 #if test "x$enable_memory" != "xno"
692 #then
693 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
694 # then
695 # enable_memory="yes"
696 # else
697 # enable_memory="no"
698 # fi
699 #fi
700 #if test "x$enable_memory" = "xno"
701 #then
702 # AC_DEFINE(COLLECT_MEMORY, 0, [Wether or not to collect memory statistics])
703 #fi
704 #AM_CONDITIONAL(BUILD_MODULE_MEMORY, test "x$enable_memory" = "xyes")
706 #AC_ARG_ENABLE(nfs, AC_HELP_STRING([--disable-nfs], [Disable nfs statistics]),, [enable_nfs="yes"])
707 #if test "x$enable_nfs" != "xno"
708 #then
709 # if test "x$ac_system" = "xLinux"
710 # then
711 # enable_nfs="yes"
712 # else
713 # enable_nfs="no"
714 # fi
715 #fi
716 #if test "x$enable_nfs" = "xno"
717 #then
718 # AC_DEFINE(COLLECT_NFS, 0, [Wether or not to collect nfs statistics])
719 #fi
720 #AM_CONDITIONAL(BUILD_MODULE_NFS, test "x$enable_nfs" = "xyes")
722 #AC_ARG_ENABLE(ping, AC_HELP_STRING([--disable-ping], [Disable ping statistics]),, [enable_ping="yes"])
723 #if test "x$enable_ping" != "xno"
724 #then
725 # enable_ping="yes"
726 #fi
727 #if test "x$enable_ping" = "xno"
728 #then
729 # AC_DEFINE(COLLECT_PING, 0, [Wether or not to collect ping statistics])
730 #fi
731 #AM_CONDITIONAL(BUILD_MODULE_PING, test "x$enable_ping" = "xyes")
733 #AC_ARG_ENABLE(processes, AC_HELP_STRING([--disable-processes], [Disable processes statistics]),, [enable_processes="yes"])
734 #if test "x$enable_processes" != "xno"
735 #then
736 # if test "x$ac_system" = "xLinux"
737 # then
738 # enable_processes="yes"
739 # else
740 # enable_processes="no"
741 # fi
742 #fi
743 #if test "x$enable_processes" = "xno"
744 #then
745 # AC_DEFINE(COLLECT_PROCESSES, 0, [Wether or not to collect processes statistics])
746 #fi
747 #AM_CONDITIONAL(BUILD_MODULE_PROCESSES, test "x$enable_processes" = "xyes")
749 ##AC_COLLECTD([quota], [enable], [module], [quota statistics (experimental)])
751 #AC_ARG_ENABLE(sensors, AC_HELP_STRING([--disable-sensors], [Disable lm_sensors statistics]),, [enable_sensors=$with_lm_sensors])
752 #if test "x$enable_sensors" != "xno"
753 #then
754 # if test "x$with_lm_sensors" = "xyes"
755 # then
756 # enable_sensors="yes"
757 # else
758 # enable_sensors="no"
759 # fi
760 #fi
761 #if test "x$enable_sensors" = "xno"
762 #then
763 # AC_DEFINE(COLLECT_SENSORS, 0, [Wether or not to collect lm_sensors statistics])
764 #fi
765 #AM_CONDITIONAL(BUILD_MODULE_SENSORS, test "x$enable_sensors" = "xyes")
767 #AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [Disable serial statistics]),, [enable_serial="yes"])
768 #if test "x$enable_serial" != "xno"
769 #then
770 # if test "x$ac_system" = "xLinux"
771 # then
772 # enable_serial="yes"
773 # else
774 # enable_serial="no"
775 # fi
776 #fi
777 #if test "x$enable_serial" = "xno"
778 #then
779 # AC_DEFINE(COLLECT_SERIAL, 0, [Wether or not to collect serial statistics])
780 #fi
781 #AM_CONDITIONAL(BUILD_MODULE_SERIAL, test "x$enable_serial" = "xyes")
783 #AC_ARG_ENABLE(swap, AC_HELP_STRING([--disable-swap], [Disable swap statistics]),, [enable_swap="yes"])
784 #if test "x$enable_swap" != "xno"
785 #then
786 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
787 # then
788 # enable_swap="yes"
789 # else
790 # enable_swap="no"
791 # fi
792 #fi
793 #if test "x$enable_swap" = "xno"
794 #then
795 # AC_DEFINE(COLLECT_SWAP, 0, [Wether or not to collect swap statistics])
796 #fi
797 #AM_CONDITIONAL(BUILD_MODULE_SWAP, test "x$enable_swap" = "xyes")
799 #AC_ARG_ENABLE(tape, AC_HELP_STRING([--disable-tape], [Disable tape statistics]),, [enable_tape="yes"])
800 #if test "x$enable_tape" != "xno"
801 #then
802 # if test "x$with_kstat" = "xyes"
803 # then
804 # enable_tape="yes"
805 # else
806 # enable_tape="no"
807 # fi
808 #fi
809 #if test "x$enable_tape" = "xno"
810 #then
811 # AC_DEFINE(COLLECT_TAPE, 0, [Wether or not to collect tape statistics])
812 #fi
813 #AM_CONDITIONAL(BUILD_MODULE_TAPE, test "x$enable_tape" = "xyes")
815 #AC_ARG_ENABLE(traffic, AC_HELP_STRING([--disable-traffic], [Disable system traffic statistics]),, [enable_traffic="yes"])
816 #if test "x$enable_traffic" != "xno"
817 #then
818 # if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
819 # then
820 # enable_traffic="yes"
821 # else
822 # enable_traffic="no"
823 # fi
824 #fi
825 #if test "x$enable_traffic" = "xno"
826 #then
827 # AC_DEFINE(COLLECT_TRAFFIC, 0, [Wether or not to collect network traffic statistics])
828 #fi
829 #AM_CONDITIONAL(BUILD_MODULE_TRAFFIC, test "x$enable_traffic" = "xyes")
831 #AC_COLLECTD([users], [disable], [module], [user count statistics])
833 AC_OUTPUT(Makefile src/libconfig/Makefile src/liboping/Makefile src/Makefile)
835 cat <<EOF;
837 Configuration:
838 Libraries:
839 libcurl . . . . . . $with_libcurl
840 librrd . . . . . . $with_rrdtool
841 lm_sensors . . . . $with_lm_sensors
842 libstatgrab . . . . $with_libstatgrab
843 libkstat . . . . . $with_kstat
844 libmysql . . . . . $with_libmysql
846 Features:
847 debug . . . . . . . $enable_debug
848 daemon mode . . . . $enable_daemon
850 Modules:
851 battery . . . . . . $enable_battery
852 cpu . . . . . . . . $enable_cpu
853 cpufreq . . . . . . $enable_cpufreq
854 df . . . . . . . . $enable_df
855 disk . . . . . . . $enable_disk
856 hddtemp . . . . . . $enable_hddtemp
857 load . . . . . . . $enable_load
858 memory . . . . . . $enable_memory
859 mysql . . . . . . . $enable_mysql
860 nfs . . . . . . . . $enable_nfs
861 ping . . . . . . . $enable_ping
862 processes . . . . . $enable_processes
863 sensors . . . . . . $enable_sensors
864 serial . . . . . . $enable_serial
865 swap . . . . . . . $enable_swap
866 tape . . . . . . . $enable_tape
867 traffic . . . . . . $enable_traffic
868 users . . . . . . . $enable_users
869 vserver . . . . . . $enable_vserver
870 wireless . . . . . $enable_wireless
872 EOF