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