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