Added `collectd2html.pl' by Vincent Stehlé
[collectd.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, 3.7.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)
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 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
19
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)
29
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)
48
49 # For cpu modules
50 AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
51
52 # For load module
53 AC_CHECK_HEADERS(sys/loadavg.h)
54
55 # For users module
56 AC_CHECK_HEADERS(utmp.h)
57 AC_CHECK_HEADERS(utmpx.h)
58
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)
65
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)
81
82 # For debugging interface (variable number of arguments)
83 AC_CHECK_HEADERS(stdarg.h)
84
85 dnl Checking for libraries
86 AC_CHECK_LIB(m, ext)
87
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
96
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)
107
108 # For cpu module
109 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
110
111 # For df module
112 AC_CHECK_FUNCS(statfs statvfs)
113
114 # For load module
115 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
116
117 # For users module
118 AC_CHECK_FUNCS(getutent getutxent)
119
120 # For quota module
121 AC_CHECK_FUNCS(quotactl)
122 AC_CHECK_FUNCS(getgrgid getpwuid)
123
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
174
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])
189
190 with_libsocket="yes"
191 AC_CHECK_LIB(socket, socket,
192 [
193         AC_DEFINE(HAVE_LIBSOCKET, 1, [Define to 1 if you have the 'socket' library (-lsocket).])
194 ],
195 [with_libsocket="no"])
196 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$with_libsocket" = "xyes")
197
198 with_libresolv="yes"
199 AC_CHECK_LIB(resolv, res_search,
200 [
201         AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
202 ],
203 [with_libresolv="no"])
204 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
205
206 m4_divert_once([HELP_WITH], [
207 collectd additional packages:])
208
209 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
210 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
211 [       if test "x$withval" != "xno" && test "x$withval" != "xyes"
212         then
213                 LDFLAGS="$LDFLAGS -L$withval/lib"
214                 CPPFLAGS="$CPPFLAGS -I$withval/include"
215                 with_rrdtool="yes"
216         fi
217 ], [with_rrdtool="yes"])
218 if test "x$with_rrdtool" = "xyes"
219 then
220         AC_CHECK_LIB(rrd, rrd_update,
221         [
222                 AC_DEFINE(HAVE_LIBRRD, 1, [Define to 1 if you have the rrd library (-lrrd).])
223         ],
224         [with_rrdtool="no (librrd not found)"], [-lm])
225 fi
226 if test "x$with_rrdtool" = "xyes"
227 then
228         AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
229 fi
230 if test "x$with_rrdtool" = "xyes"
231 then
232         collect_rrdtool=1
233 else
234         collect_rrdtool=0
235 fi
236 AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
237         [Wether or not to use rrdtool library])
238 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
239
240 #AC_ARG_WITH(pth, [AS_HELP_STRING([--with-pth=@<:@=PREFIX@:>@], [Path to pth (experimental).]),
241 #[      if test "x$withval" != "xno" && test "x$withval" != "xyes"
242 #       then
243 #               LDFLAGS="$LDFLAGS -L$withval/lib"
244 #               CPPFLAGS="$CPPFLAGS -I$withval/include"
245 #               with_pth="yes"
246 #       fi
247 #], [with_pth="no"])
248 #if test "x$with_pth" = "xyes"
249 #then
250 #       AC_CHECK_LIB(pth, pth_init,, [with_pth="no (libpth not found)"], [])
251 #fi
252 #if test "x$with_pth" = "xyes"
253 #then
254 #       AC_CHECK_HEADERS(pth.h,, [with_pth="no (pth.h not found)"])
255 #fi
256 #if test "x$with_pth" = "xyes"
257 #then
258 #       collect_pth=1
259 #else
260 #       collect_pth=0
261 #fi
262 #AC_DEFINE_UNQUOTED(COLLECT_PTH, [$collect_pth],
263 #       [Wether or not to use pth (portable threads) library])
264 #AM_CONDITIONAL(BUILD_WITH_PTH, test "x$with_pth" = "xyes")
265
266 if test "$ac_system" = "Solaris"
267 then
268         with_kstat="yes"
269 else
270         with_kstat="no (Solaris only)"
271 fi
272 if test "x$with_kstat" = "xyes"
273 then
274         AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
275 fi
276 if test "x$with_kstat" = "xyes"
277 then
278         AC_CHECK_LIB(devinfo, di_init)
279         AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
280 fi
281 if test "x$with_kstat" = "xyes"
282 then
283         collect_kstat=1
284 else
285         collect_kstat=0
286 fi
287 AC_DEFINE_UNQUOTED(COLLECT_KSTAT, [$collect_kstat],
288         [Wether or not to use kstat library (Solaris)])
289 AM_CONDITIONAL(BUILD_WITH_KSTAT, test "x$with_kstat" = "xyes")
290
291 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
292 [
293         if test "x$withval" != "xno" && test "x$withval" != "xyes"
294         then
295                 LDFLAGS="$LDFLAGS -L$withval/lib"
296                 CPPFLAGS="$CPPFLAGS -I$withval/include"
297                 with_libstatgrab="yes"
298         fi
299 ],
300 [
301         if test "x$ac_system" == "xunknown"
302         then
303                 with_libstatgrab="yes"
304         else
305                 with_libstatgrab="no"
306         fi
307 ])
308 if test "x$with_libstatgrab" = "xyes"
309 then
310         AC_CHECK_LIB(devstat, getdevs)
311         AC_CHECK_LIB(kvm, kvm_getargv)
312         AC_CHECK_LIB(statgrab, sg_init,, [with_libstatgrab="no (libstatgrab not found)"])
313 fi
314 if test "x$with_libstatgrab" = "xyes"
315 then
316         AC_CHECK_HEADERS(statgrab.h,,    [with_libstatgrab="no (statgrab.h not found)"])
317 fi
318 if test "x$with_libstatgrab" = "xyes"
319 then
320         collect_libstatgrab=1
321 else
322         collect_libstatgrab=0
323 fi
324 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
325         [Wether or not to use statgrab library])
326 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
327
328 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
329 [
330         if test "x$withval" != "xno" && test "x$withval" != "xyes"
331         then
332                 LDFLAGS="$LDFLAGS -L$withval/lib"
333                 CPPFLAGS="$CPPFLAGS -I$withval/include"
334                 with_lm_sensors="yes"
335         fi
336 ],
337 [
338         if test "x$ac_system" = "xLinux"
339         then
340                 with_lm_sensors="yes"
341         else
342                 with_lm_sensors="no"
343         fi
344 ])
345 if test "x$with_lm_sensors" = "xyes"
346 then
347         AC_CHECK_LIB(sensors, sensors_init,
348         [
349                 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
350         ],
351         [with_lm_sensors="no (libsensors not found)"])
352 fi
353 if test "x$with_lm_sensors" = "xyes"
354 then
355         AC_CHECK_HEADERS(sensors/sensors.h,
356         [
357                 AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
358         ],
359         [with_lm_sensors="no (sensors/sensors.h not found)"])
360 fi
361 if test "x$with_lm_sensors" = "xyes"
362 then
363         collect_lm_sensors=1
364 else
365         collect_lm_sensors=0
366 fi
367 AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors],
368         [Wether or not to use sensors library])
369 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
370
371 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
372 [
373         if test "x$withval" != "xno" && test "x$withval" != "xyes"
374         then
375                 LDFLAGS="$LDFLAGS -L$withval/lib"
376                 CPPFLAGS="$CPPFLAGS -I$withval/include"
377                 with_libmysql="yes"
378         fi
379 ],
380 [
381         with_libmysql="yes"
382 ])
383 if test "x$with_libmysql" = "xyes"
384 then
385         AC_CHECK_LIB(mysqlclient, mysql_init,
386         [
387                 AC_DEFINE(HAVE_LIBMYSQLCLIENT, 1, [Define to 1 if you have the mysqlclient library (-lmysqlclient).])
388         ], [with_libmysql="no (libmysql not found)"])
389 fi
390 if test "x$with_libmysql" = "xyes"
391 then
392         AC_CHECK_HEADERS(mysql/mysql.h,
393         [
394                 AC_DEFINE(HAVE_MYSQL_MYSQL_H, 1, [Define to 1 if you have the <mysql/mysql.h> header file.])
395         ], [with_libmysql="no (mysql/mysql.h not found)"])
396 fi
397 if test "x$with_libmysql" = "xyes"
398 then
399         collect_libmysql=1
400 else
401         collect_libmysql=0
402 fi
403 AC_DEFINE_UNQUOTED(COLLECT_LIBMYSQL, [$collect_libmysql],
404         [Wether or not to use mysql library])
405 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
406
407 #
408 # Check for enabled/disabled features
409 #
410
411 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
412 # ------------------------------------------------------------
413 dnl
414 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
415 dnl
416 AC_DEFUN(
417         [AC_COLLECTD],
418         [
419         m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
420         m4_if(
421                 [$2],
422                 [enable],
423                 [dnl
424                 m4_define([EnDis],[disabled])dnl
425                 m4_define([YesNo],[no])dnl
426                 ],dnl
427                 [m4_if(
428                         [$2],
429                         [disable],
430                         [dnl
431                         m4_define([EnDis],[enabled])dnl
432                         m4_define([YesNo],[yes])dnl
433                         ],
434                         [dnl
435                         AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
436                         ]dnl
437                 )]dnl
438         )dnl
439         m4_if([$3], [feature], [],
440                 [m4_if(
441                         [$3], [module], [],
442                         [dnl
443                         AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
444                         ]dnl
445                 )]dnl
446         )dnl
447         AC_ARG_ENABLE(
448                 [$1],
449                 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
450                 [],
451                 enable_$1='[YesNo]'dnl
452         )# AC_ARG_ENABLE
453 if test "x$enable_$1" = "xno"
454 then
455         collectd_$1=0
456 else
457         if test "x$enable_$1" = "xyes"
458         then
459                 collectd_$1=1
460         else
461                 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
462                 collectd_$1=1
463                 enable_$1='yes'
464         fi
465 fi
466         AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
467         AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
468         ]dnl
469 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
470
471 m4_divert_once([HELP_ENABLE], [
472 collectd features:])
473 AC_COLLECTD([debug],     [enable],  [feature], [debugging])
474 AC_COLLECTD([daemon],    [disable], [feature], [daemon mode])
475
476 m4_divert_once([HELP_ENABLE], [
477 collectd modules:])
478 AC_COLLECTD([battery],   [disable], [module], [battery statistics])
479 AC_COLLECTD([cpu],       [disable], [module], [cpu usage statistics])
480 AC_COLLECTD([cpufreq],   [disable], [module], [system cpu frequency statistics])
481 AC_COLLECTD([disk],      [disable], [module], [disk/partition statistics])
482 AC_COLLECTD([df],        [disable], [module], [df statistics])
483 AC_COLLECTD([quota],     [enable],  [module], [quota statistics (experimental)])
484 AC_COLLECTD([hddtemp],   [disable], [module], [hdd temperature statistics])
485 AC_COLLECTD([load],      [disable], [module], [system load statistics])
486 AC_COLLECTD([memory],    [disable], [module], [memory statistics])
487 AC_COLLECTD([mysql],     [disable], [module], [mysql statistics])
488 AC_COLLECTD([nfs],       [disable], [module], [nfs statistics])
489 AC_COLLECTD([ping],      [disable], [module], [ping statistics])
490 AC_COLLECTD([processes], [disable], [module], [processes statistics])
491 AC_COLLECTD([sensors],   [disable], [module], [lm_sensors statistics])
492 AC_COLLECTD([serial],    [disable], [module], [serial statistics])
493 AC_COLLECTD([swap],      [disable], [module], [swap statistics])
494 AC_COLLECTD([tape],      [disable], [module], [tape statistics])
495 AC_COLLECTD([traffic],   [disable], [module], [system traffic statistics])
496 AC_COLLECTD([users],     [disable], [module], [user count statistics])
497 AC_COLLECTD([wireless],  [disable], [module], [wireless link statistics])
498
499 #m4_divert_once([HELP_ENABLE], [
500 #collectd modules:])
501 #AC_ARG_ENABLE(cpu, AC_HELP_STRING([--disable-cpu], [Disable CPU usage statistics]),, [enable_cpu="yes"])
502 #if test "x$enable_cpu" != "xno"
503 #then
504 #       if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$have_sysctlbyname" = "xyes"
505 #       then
506 #               enable_cpu="yes"
507 #       else
508 #               enable_cpu="no"
509 #       fi
510 #fi
511 #if test "x$enable_cpu" = "xno"
512 #then
513 #       AC_DEFINE(COLLECT_CPU, 0, [Wether or not to collect CPU usage statistics])
514 #fi
515 #AM_CONDITIONAL(BUILD_MODULE_CPU, test "x$enable_cpu" = "xyes")
516
517 #AC_ARG_ENABLE(cpufreq, AC_HELP_STRING([--disable-cpufreq], [Disable system cpu frequency statistics]),, [enable_cpufreq="yes"])
518 #if test "x$enable_cpufreq" != "xno"
519 #then
520 #       if test "x$ac_system" = "xLinux"
521 #       then
522 #               enable_cpufreq="yes"
523 #       else
524 #               enable_cpufreq="no"
525 #       fi
526 #fi
527 #if test "x$enable_cpufreq" = "xno"
528 #then
529 #       AC_DEFINE(COLLECT_CPUFREQ, 0, [Wether or not to collect cpu frequency statistics])
530 #fi
531 #AM_CONDITIONAL(BUILD_MODULE_CPUFREQ, test "x$enable_cpufreq" = "xyes")
532
533 #AC_ARG_ENABLE(disk, AC_HELP_STRING([--disable-disk], [Disable disk/partition statistics]),, [enable_disk="yes"])
534 #if test "x$enable_disk" != "xno"
535 #then
536 #       if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes"
537 #       then
538 #               enable_disk="yes"
539 #       else
540 #               enable_disk="no"
541 #       fi
542 #fi
543 #if test "x$enable_disk" = "xno"
544 #then
545 #       AC_DEFINE(COLLECT_DISK, 0, [Wether or not to collect diskstats])
546 #fi
547 #AM_CONDITIONAL(BUILD_MODULE_DISK, test "x$enable_disk" = "xyes")
548
549 #AC_ARG_ENABLE(hddtemp, AC_HELP_STRING([--disable-hddtemp], [Disable hdd temperature statistics]),, [enable_hddtemp="yes"])
550 #if test "x$enable_hddtemp" = "xno"
551 #then
552 #       AC_DEFINE(COLLECT_HDDTEMP, 0, [Wether or not to collect hdd temperature statistics])
553 #fi
554 #AM_CONDITIONAL(BUILD_MODULE_HDDTEMP, test "x$enable_hddtemp" = "xyes")
555
556 #AC_ARG_ENABLE(load, AC_HELP_STRING([--disable-load], [Disable system load statistics]),, [enable_load="yes"])
557 #if test "x$enable_load" != "xno"
558 #then
559 #       if test "x$have_getloadavg" = "xyes" -o "x$ac_system" = "xLinux" -o "x$with_libstatgrab" = "xyes"
560 #       then
561 #               enable_load="yes"
562 #       else
563 #               enable_load="no"
564 #       fi
565 #fi
566 #if test "x$enable_load" = "xno"
567 #then
568 #       AC_DEFINE(COLLECT_LOAD, 0, [Wether or not to collect system load statistics])
569 #fi
570 #AM_CONDITIONAL(BUILD_MODULE_LOAD, test "x$enable_load" = "xyes")
571
572 #AC_ARG_ENABLE(memory, AC_HELP_STRING([--disable-memory], [Disable memory statistics]),, [enable_memory="yes"])
573 #if test "x$enable_memory" != "xno"
574 #then
575 #       if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
576 #       then
577 #               enable_memory="yes"
578 #       else
579 #               enable_memory="no"
580 #       fi
581 #fi
582 #if test "x$enable_memory" = "xno"
583 #then
584 #       AC_DEFINE(COLLECT_MEMORY, 0, [Wether or not to collect memory statistics])
585 #fi
586 #AM_CONDITIONAL(BUILD_MODULE_MEMORY, test "x$enable_memory" = "xyes")
587
588 #AC_ARG_ENABLE(nfs, AC_HELP_STRING([--disable-nfs], [Disable nfs statistics]),, [enable_nfs="yes"])
589 #if test "x$enable_nfs" != "xno"
590 #then
591 #       if test "x$ac_system" = "xLinux"
592 #       then
593 #               enable_nfs="yes"
594 #       else
595 #               enable_nfs="no"
596 #       fi
597 #fi
598 #if test "x$enable_nfs" = "xno"
599 #then
600 #       AC_DEFINE(COLLECT_NFS, 0, [Wether or not to collect nfs statistics])
601 #fi
602 #AM_CONDITIONAL(BUILD_MODULE_NFS, test "x$enable_nfs" = "xyes")
603
604 #AC_ARG_ENABLE(ping, AC_HELP_STRING([--disable-ping], [Disable ping statistics]),, [enable_ping="yes"])
605 #if test "x$enable_ping" != "xno"
606 #then
607 #       enable_ping="yes"
608 #fi
609 #if test "x$enable_ping" = "xno"
610 #then
611 #       AC_DEFINE(COLLECT_PING, 0, [Wether or not to collect ping statistics])
612 #fi
613 #AM_CONDITIONAL(BUILD_MODULE_PING, test "x$enable_ping" = "xyes")
614
615 #AC_ARG_ENABLE(processes, AC_HELP_STRING([--disable-processes], [Disable processes statistics]),, [enable_processes="yes"])
616 #if test "x$enable_processes" != "xno"
617 #then
618 #       if test "x$ac_system" = "xLinux" 
619 #       then
620 #               enable_processes="yes"
621 #       else
622 #               enable_processes="no"
623 #       fi
624 #fi
625 #if test "x$enable_processes" = "xno"
626 #then
627 #       AC_DEFINE(COLLECT_PROCESSES, 0, [Wether or not to collect processes statistics])
628 #fi
629 #AM_CONDITIONAL(BUILD_MODULE_PROCESSES, test "x$enable_processes" = "xyes")
630
631 ##AC_COLLECTD([quota],     [enable],  [module], [quota statistics (experimental)])
632
633 #AC_ARG_ENABLE(sensors, AC_HELP_STRING([--disable-sensors], [Disable lm_sensors statistics]),, [enable_sensors=$with_lm_sensors])
634 #if test "x$enable_sensors" != "xno"
635 #then
636 #       if test "x$with_lm_sensors" = "xyes"
637 #       then
638 #               enable_sensors="yes"
639 #       else
640 #               enable_sensors="no"
641 #       fi
642 #fi
643 #if test "x$enable_sensors" = "xno"
644 #then
645 #       AC_DEFINE(COLLECT_SENSORS, 0, [Wether or not to collect lm_sensors statistics])
646 #fi
647 #AM_CONDITIONAL(BUILD_MODULE_SENSORS, test "x$enable_sensors" = "xyes")
648
649 #AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [Disable serial statistics]),, [enable_serial="yes"])
650 #if test "x$enable_serial" != "xno"
651 #then
652 #       if test "x$ac_system" = "xLinux"
653 #       then
654 #               enable_serial="yes"
655 #       else
656 #               enable_serial="no"
657 #       fi
658 #fi
659 #if test "x$enable_serial" = "xno"
660 #then
661 #       AC_DEFINE(COLLECT_SERIAL, 0, [Wether or not to collect serial statistics])
662 #fi
663 #AM_CONDITIONAL(BUILD_MODULE_SERIAL, test "x$enable_serial" = "xyes")
664
665 #AC_ARG_ENABLE(swap, AC_HELP_STRING([--disable-swap], [Disable swap statistics]),, [enable_swap="yes"])
666 #if test "x$enable_swap" != "xno"
667 #then
668 #       if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
669 #       then
670 #               enable_swap="yes"
671 #       else
672 #               enable_swap="no"
673 #       fi
674 #fi
675 #if test "x$enable_swap" = "xno"
676 #then
677 #       AC_DEFINE(COLLECT_SWAP, 0, [Wether or not to collect swap statistics])
678 #fi
679 #AM_CONDITIONAL(BUILD_MODULE_SWAP, test "x$enable_swap" = "xyes")
680
681 #AC_ARG_ENABLE(tape, AC_HELP_STRING([--disable-tape], [Disable tape statistics]),, [enable_tape="yes"])
682 #if test "x$enable_tape" != "xno"
683 #then
684 #       if test "x$with_kstat" = "xyes"
685 #       then
686 #               enable_tape="yes"
687 #       else
688 #               enable_tape="no"
689 #       fi
690 #fi
691 #if test "x$enable_tape" = "xno"
692 #then
693 #       AC_DEFINE(COLLECT_TAPE, 0, [Wether or not to collect tape statistics])
694 #fi
695 #AM_CONDITIONAL(BUILD_MODULE_TAPE, test "x$enable_tape" = "xyes")
696
697 #AC_ARG_ENABLE(traffic, AC_HELP_STRING([--disable-traffic], [Disable system traffic statistics]),, [enable_traffic="yes"])
698 #if test "x$enable_traffic" != "xno"
699 #then
700 #       if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
701 #       then
702 #               enable_traffic="yes"
703 #       else
704 #               enable_traffic="no"
705 #       fi
706 #fi
707 #if test "x$enable_traffic" = "xno"
708 #then
709 #       AC_DEFINE(COLLECT_TRAFFIC, 0, [Wether or not to collect network traffic statistics])
710 #fi
711 #AM_CONDITIONAL(BUILD_MODULE_TRAFFIC, test "x$enable_traffic" = "xyes")
712
713 #AC_COLLECTD([users],     [disable], [module], [user count statistics])
714
715 AC_OUTPUT(Makefile src/libconfig/Makefile src/liboping/Makefile src/Makefile)
716
717 cat <<EOF;
718
719 Configuration:
720   Libraries:
721     librrd  . . . . . . $with_rrdtool
722     lm_sensors  . . . . $with_lm_sensors
723     libstatgrab . . . . $with_libstatgrab
724     libkstat  . . . . . $with_kstat
725     libmysql  . . . . . $with_libmysql
726
727   Features:
728     debug . . . . . . . $enable_debug
729     daemon mode . . . . $enable_daemon
730
731   Modules:
732     battery . . . . . . $enable_battery
733     cpu . . . . . . . . $enable_cpu
734     cpufreq . . . . . . $enable_cpufreq
735     df  . . . . . . . . $enable_df
736     disk  . . . . . . . $enable_disk
737     hddtemp . . . . . . $enable_hddtemp
738     load  . . . . . . . $enable_load
739     memory  . . . . . . $enable_memory
740     mysql . . . . . . . $enable_mysql
741     nfs . . . . . . . . $enable_nfs
742     ping  . . . . . . . $enable_ping
743     processes . . . . . $enable_processes
744     sensors . . . . . . $enable_sensors
745     serial  . . . . . . $enable_serial
746     swap  . . . . . . . $enable_swap
747     tape  . . . . . . . $enable_tape
748     traffic . . . . . . $enable_traffic
749     users . . . . . . . $enable_users
750     wireless  . . . . . $enable_wireless
751
752 EOF