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