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