cleanup
[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)
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_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 AC_CHECK_FUNCS(openlog syslog closelog)
104
105 # For cpu module
106 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
107
108 # For load module
109 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
110
111 # For users module
112 AC_CHECK_FUNCS(getutent getutxent)
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 m4_divert_once([HELP_WITH], [
189 collectd additional packages:])
190
191 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
192 AC_ARG_WITH(rrdtool, AC_HELP_STRING([--with-rrdtool=PFX], [Path to rrdtool.]),
193 [       if test "x$withval" != "xno" && test "x$withval" != "xyes"
194         then
195                 LDFLAGS="$LDFLAGS -L$withval/lib"
196                 CPPFLAGS="$CPPFLAGS -I$withval/include"
197                 with_rrdtool="yes"
198         fi
199 ], [with_rrdtool="yes"])
200 if test "x$with_rrdtool" = "xyes"
201 then
202         AC_CHECK_LIB(rrd, rrd_update,, [with_rrdtool="no"], [-lm])
203 fi
204 if test "x$with_rrdtool" = "xyes"
205 then
206         AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no"])
207 fi
208 if test "x$with_rrdtool" = "xyes"
209 then
210         collect_rrdtool=1
211 else
212         collect_rrdtool=0
213 fi
214 AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
215         [Wether or not to use rrdtool library])
216 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
217
218 #AC_ARG_WITH(pth, AC_HELP_STRING([--with-pth=PFX], [Path to pth (experimental).]),
219 #[      if test "x$withval" != "xno" && test "x$withval" != "xyes"
220 #       then
221 #               LDFLAGS="$LDFLAGS -L$withval/lib"
222 #               CPPFLAGS="$CPPFLAGS -I$withval/include"
223 #               with_pth="yes"
224 #       fi
225 #], [with_pth="no"])
226 #if test "x$with_pth" = "xyes"
227 #then
228 #       AC_CHECK_LIB(pth, pth_init,, [with_pth="no"], [])
229 #fi
230 #if test "x$with_pth" = "xyes"
231 #then
232 #       AC_CHECK_HEADERS(pth.h,, [with_pth="no"])
233 #fi
234 #if test "x$with_pth" = "xyes"
235 #then
236 #       collect_pth=1
237 #else
238 #       collect_pth=0
239 #fi
240 #AC_DEFINE_UNQUOTED(COLLECT_PTH, [$collect_pth],
241 #       [Wether or not to use pth (portable threads) library])
242 #AM_CONDITIONAL(BUILD_WITH_PTH, test "x$with_pth" = "xyes")
243
244 if test "$ac_system" = "Solaris"
245 then
246         with_kstat="yes"
247         AC_CHECK_LIB(kstat, kstat_open,, [with_kstat="no (libkstat not found)"])
248         AC_CHECK_LIB(devinfo, di_init)
249         AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
250 else
251         with_kstat="no (Solaris only)"
252 fi
253 if test "x$with_kstat" = "xyes"
254 then
255         collect_kstat=1
256 else
257         collect_kstat=0
258 fi
259 AC_DEFINE_UNQUOTED(COLLECT_KSTAT, [$collect_kstat],
260         [Wether or not to use kstat library (Solaris)])
261 AM_CONDITIONAL(BUILD_WITH_KSTAT, test "x$with_kstat" = "xyes")
262
263 AC_ARG_WITH(libstatgrab, AC_HELP_STRING([--with-libstatgrab@<:@=PFX@:>@], [Path to libstatgrab.]),
264 [
265         # given..
266         if test "x$withval" != "xno" && test "x$withval" != "xyes"
267         then
268                 LDFLAGS="$LDFLAGS -L$withval/lib"
269                 CPPFLAGS="$CPPFLAGS -I$withval/include"
270                 with_libstatgrab="yes"
271         fi
272 ],
273 [
274         # not given..
275         if test "x$ac_system" != "xunknown"
276         then
277                 with_libstatgrab="no"
278         else
279                 with_libstatgrab="yes"
280         fi
281 ])
282 if test "x$with_libstatgrab" = "xyes"
283 then
284         AC_CHECK_LIB(devstat, getdevs)
285         AC_CHECK_LIB(kvm, kvm_getargv)
286         AC_CHECK_LIB(statgrab, sg_init,, [with_libstatgrab="no (not found)"])
287         AC_CHECK_HEADERS(statgrab.h,,    [with_libstatgrab="no (not found)"])
288 fi
289
290 AC_ARG_WITH(lm-sensors, AC_HELP_STRING([--with-lm-sensors@<:@=PFX@:>@], [Path to lm_sensors.]),
291 [
292         # given..
293         if test "x$withval" != "xno"
294         then
295                 if test "x$withval" != "xyes"
296                 then
297                         LDFLAGS="$LDFLAGS -L$withval/lib"
298                         CPPFLAGS="$CPPFLAGS -I$withval/include"
299                         with_lm_sensors="yes"
300                 fi
301         fi
302 ],
303 [
304         # not given..
305         if test "x$ac_system" = "xLinux"
306         then
307                 with_lm_sensors="yes"
308         else
309                 with_lm_sensors="no"
310         fi
311 ])
312 if test "x$with_lm_sensors" = "xyes"
313 then
314         AC_CHECK_LIB(sensors, sensors_init,
315         [
316                 with_lm_sensors="yes"
317                 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
318         ],
319         [with_lm_sensors="no (not found)"])
320         AC_CHECK_HEADERS(sensors/sensors.h,
321         [
322                 with_lm_sensors="yes"
323                 AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
324         ],
325         [with_lm_sensors="no (not found)"])
326 fi
327
328
329
330 #
331 # Check for enabled/disabled features
332 #
333 m4_divert_once([HELP_ENABLE], [
334 collectd features:])
335 AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug],
336         [Enable debugging (disabled by default)]),
337         [], [enable_debug="no"])
338 if test "x$enable_debug" = "xno"
339 then
340         collect_debug=0
341 else
342         if test "x$enable_debug" = "xyes"
343         then
344                 collect_debug=1
345         else
346                 AC_MSG_NOTICE([Please specify either --enable-debug or --disable-debug; Enabling debugging.])
347                 collect_debug=1
348                 enable_debug="yes"
349         fi
350 fi
351 AC_DEFINE_UNQUOTED(COLLECT_DEBUG, [$collect_debug],
352         [Wether or not to enable debugging])
353 AM_CONDITIONAL(BUILD_DEBUG, test "x$enable_debug" = "xyes")
354
355 AC_ARG_ENABLE(daemon, AC_HELP_STRING([--disable-daemon],
356         [Disable daemon mode (enabled by default)]),
357         [], [enable_daemon="yes"])
358 if test "x$enable_daemon" = "xno"
359 then
360         collect_daemon=0
361 else
362         if test "x$enable_daemon" = "xyes"
363         then
364                 collect_daemon=1
365         else
366                 AC_MSG_NOTICE([Please specify either --enable-daemon or --disable-daemon; Enabling daemon mode.])
367                 collect_daemon=1
368                 enable_daemon="yes"
369         fi
370 fi
371 AC_DEFINE_UNQUOTED(COLLECT_DAEMON, [$collect_daemon],
372         [Wether or not to enable daemon mode])
373 AM_CONDITIONAL(BUILD_DAEMON, test "x$enable_daemon" = "xyes")
374
375 m4_divert_once([HELP_ENABLE], [
376 collectd modules:])
377 AC_ARG_ENABLE(cpu, AC_HELP_STRING([--disable-cpu], [Disable CPU usage statistics]),, [enable_cpu="yes"])
378 if test "x$enable_cpu" != "xno"
379 then
380         if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$have_sysctlbyname" = "xyes"
381         then
382                 enable_cpu="yes"
383         else
384                 enable_cpu="no"
385         fi
386 fi
387 if test "x$enable_cpu" = "xno"
388 then
389         AC_DEFINE(COLLECT_CPU, 0, [Wether or not to collect CPU usage statistics])
390 fi
391 AM_CONDITIONAL(BUILD_MODULE_CPU, test "x$enable_cpu" = "xyes")
392
393 AC_ARG_ENABLE(cpufreq, AC_HELP_STRING([--disable-cpufreq], [Disable system cpu frequency statistics]),, [enable_cpufreq="yes"])
394 if test "x$enable_cpufreq" != "xno"
395 then
396         if test "x$ac_system" = "xLinux"
397         then
398                 enable_cpufreq="yes"
399         else
400                 enable_cpufreq="no"
401         fi
402 fi
403 if test "x$enable_cpufreq" = "xno"
404 then
405         AC_DEFINE(COLLECT_CPUFREQ, 0, [Wether or not to collect cpu frequency statistics])
406 fi
407 AM_CONDITIONAL(BUILD_MODULE_CPUFREQ, test "x$enable_cpufreq" = "xyes")
408
409 AC_ARG_ENABLE(disk, AC_HELP_STRING([--disable-disk], [Disable disk/partition statistics]),, [enable_disk="yes"])
410 if test "x$enable_disk" != "xno"
411 then
412         if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes"
413         then
414                 enable_disk="yes"
415         else
416                 enable_disk="no"
417         fi
418 fi
419 if test "x$enable_disk" = "xno"
420 then
421         AC_DEFINE(COLLECT_DISK, 0, [Wether or not to collect diskstats])
422 fi
423 AM_CONDITIONAL(BUILD_MODULE_DISK, test "x$enable_disk" = "xyes")
424
425 AC_ARG_ENABLE(hddtemp, AC_HELP_STRING([--disable-hddtemp], [Disable hdd temperature statistics]),, [enable_hddtemp="yes"])
426 if test "x$enable_hddtemp" = "xno"
427 then
428         AC_DEFINE(COLLECT_HDDTEMP, 0, [Wether or not to collect hdd temperature statistics])
429 fi
430 AM_CONDITIONAL(BUILD_MODULE_HDDTEMP, test "x$enable_hddtemp" = "xyes")
431
432 AC_ARG_ENABLE(load, AC_HELP_STRING([--disable-load], [Disable system load statistics]),, [enable_load="yes"])
433 if test "x$enable_load" != "xno"
434 then
435         if test "x$have_getloadavg" = "xyes" -o "x$ac_system" = "xLinux" -o "x$with_libstatgrab" = "xyes"
436         then
437                 enable_load="yes"
438         else
439                 enable_load="no"
440         fi
441 fi
442 if test "x$enable_load" = "xno"
443 then
444         AC_DEFINE(COLLECT_LOAD, 0, [Wether or not to collect system load statistics])
445 fi
446 AM_CONDITIONAL(BUILD_MODULE_LOAD, test "x$enable_load" = "xyes")
447
448 AC_ARG_ENABLE(memory, AC_HELP_STRING([--disable-memory], [Disable memory statistics]),, [enable_memory="yes"])
449 if test "x$enable_memory" != "xno"
450 then
451         if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
452         then
453                 enable_memory="yes"
454         else
455                 enable_memory="no"
456         fi
457 fi
458 if test "x$enable_memory" = "xno"
459 then
460         AC_DEFINE(COLLECT_MEMORY, 0, [Wether or not to collect memory statistics])
461 fi
462 AM_CONDITIONAL(BUILD_MODULE_MEMORY, test "x$enable_memory" = "xyes")
463
464 AC_ARG_ENABLE(nfs, AC_HELP_STRING([--disable-nfs], [Disable nfs statistics]),, [enable_nfs="yes"])
465 if test "x$enable_nfs" != "xno"
466 then
467         if test "x$ac_system" = "xLinux"
468         then
469                 enable_nfs="yes"
470         else
471                 enable_nfs="no"
472         fi
473 fi
474 if test "x$enable_nfs" = "xno"
475 then
476         AC_DEFINE(COLLECT_NFS, 0, [Wether or not to collect nfs statistics])
477 fi
478 AM_CONDITIONAL(BUILD_MODULE_NFS, test "x$enable_nfs" = "xyes")
479
480 AC_ARG_ENABLE(ping, AC_HELP_STRING([--disable-ping], [Disable ping statistics]),, [enable_ping="yes"])
481 if test "x$enable_ping" != "xno"
482 then
483         enable_ping="yes"
484 fi
485 if test "x$enable_ping" = "xno"
486 then
487         AC_DEFINE(COLLECT_PING, 0, [Wether or not to collect ping statistics])
488 fi
489 AM_CONDITIONAL(BUILD_MODULE_PING, test "x$enable_ping" = "xyes")
490
491 AC_ARG_ENABLE(processes, AC_HELP_STRING([--disable-processes], [Disable processes statistics]),, [enable_processes="yes"])
492 if test "x$enable_processes" != "xno"
493 then
494         if test "x$ac_system" = "xLinux" 
495         then
496                 enable_processes="yes"
497         else
498                 enable_processes="no"
499         fi
500 fi
501 if test "x$enable_processes" = "xno"
502 then
503         AC_DEFINE(COLLECT_PROCESSES, 0, [Wether or not to collect processes statistics])
504 fi
505 AM_CONDITIONAL(BUILD_MODULE_PROCESSES, test "x$enable_processes" = "xyes")
506
507 #AC_ARG_ENABLE(quota, AC_HELP_STRING([--enable-quota],
508 #       [Enable quota statistics (experimental, disabled by default)]),
509 #       [], [enable_quota="no"])
510 #if test "x$enable_quota" = "xno"
511 #then
512 #       collect_quota=0
513 #else
514 #       if test "x$enable_quota" = "xyes"
515 #       then
516 #               collect_quota=1
517 #       else
518 #               AC_MSG_NOTICE([Please specify either --enable-quota or --disable-quota; Enabling quota statistics.])
519 #               collect_quota=1
520 #               enable_quota="yes"
521 #       fi
522 #fi
523 #AC_DEFINE_UNQUOTED(COLLECT_QUOTA, [$collect_quota],
524 #       [Wether or not to collect quota statistics])
525 #AM_CONDITIONAL(BUILD_MODULE_QUOTA, test "x$enable_quota" = "xyes")
526
527 AC_ARG_ENABLE(sensors, AC_HELP_STRING([--disable-sensors], [Disable lm_sensors statistics]),, [enable_sensors=$with_lm_sensors])
528 if test "x$enable_sensors" != "xno"
529 then
530         if test "x$with_lm_sensors" = "xyes"
531         then
532                 enable_sensors="yes"
533         else
534                 enable_sensors="no"
535         fi
536 fi
537 if test "x$enable_sensors" = "xno"
538 then
539         AC_DEFINE(COLLECT_SENSORS, 0, [Wether or not to collect lm_sensors statistics])
540 fi
541 AM_CONDITIONAL(BUILD_MODULE_SENSORS, test "x$enable_sensors" = "xyes")
542
543 AC_ARG_ENABLE(serial, AC_HELP_STRING([--disable-serial], [Disable serial statistics]),, [enable_serial="yes"])
544 if test "x$enable_serial" != "xno"
545 then
546         if test "x$ac_system" = "xLinux"
547         then
548                 enable_serial="yes"
549         else
550                 enable_serial="no"
551         fi
552 fi
553 if test "x$enable_serial" = "xno"
554 then
555         AC_DEFINE(COLLECT_SERIAL, 0, [Wether or not to collect serial statistics])
556 fi
557 AM_CONDITIONAL(BUILD_MODULE_SERIAL, test "x$enable_serial" = "xyes")
558
559 AC_ARG_ENABLE(swap, AC_HELP_STRING([--disable-swap], [Disable swap statistics]),, [enable_swap="yes"])
560 if test "x$enable_swap" != "xno"
561 then
562         if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
563         then
564                 enable_swap="yes"
565         else
566                 enable_swap="no"
567         fi
568 fi
569 if test "x$enable_swap" = "xno"
570 then
571         AC_DEFINE(COLLECT_SWAP, 0, [Wether or not to collect swap statistics])
572 fi
573 AM_CONDITIONAL(BUILD_MODULE_SWAP, test "x$enable_swap" = "xyes")
574
575 AC_ARG_ENABLE(tape, AC_HELP_STRING([--disable-tape], [Disable tape statistics]),, [enable_tape="yes"])
576 if test "x$enable_tape" != "xno"
577 then
578         if test "x$with_kstat" = "xyes"
579         then
580                 enable_tape="yes"
581         else
582                 enable_tape="no"
583         fi
584 fi
585 if test "x$enable_tape" = "xno"
586 then
587         AC_DEFINE(COLLECT_TAPE, 0, [Wether or not to collect tape statistics])
588 fi
589 AM_CONDITIONAL(BUILD_MODULE_TAPE, test "x$enable_tape" = "xyes")
590
591 AC_ARG_ENABLE(traffic, AC_HELP_STRING([--disable-traffic], [Disable system traffic statistics]),, [enable_traffic="yes"])
592 if test "x$enable_traffic" != "xno"
593 then
594         if test "x$ac_system" = "xLinux" -o "x$with_kstat" = "xyes" -o "x$with_libstatgrab" = "xyes"
595         then
596                 enable_traffic="yes"
597         else
598                 enable_traffic="no"
599         fi
600 fi
601 if test "x$enable_traffic" = "xno"
602 then
603         AC_DEFINE(COLLECT_TRAFFIC, 0, [Wether or not to collect network traffic statistics])
604 fi
605 AM_CONDITIONAL(BUILD_MODULE_TRAFFIC, test "x$enable_traffic" = "xyes")
606
607 AC_ARG_ENABLE(users, AC_HELP_STRING([--disable-users], [Disable user count statistics]),, [enable_users="yes"])
608 if test "x$enable_users" != "xno"
609 then
610        if test "x$have_getutent" = "xyes"
611        then
612                enable_users="yes"
613        else
614                enable_users="no"
615        fi
616 fi
617 if test "x$enable_users" = "xno"
618 then
619        AC_DEFINE(COLLECT_USERS, 0, [Wether or not to collect user count statistics])
620 fi
621 AM_CONDITIONAL(BUILD_MODULE_USERS, test "x$enable_users" = "xyes")
622
623 AC_OUTPUT(Makefile src/libping/Makefile src/Makefile)
624
625 cat <<EOF;
626
627 Configuration:
628   Libraries:
629     librrd  . . . . . . $with_rrdtool
630     lm_sensors  . . . . $with_lm_sensors
631     libstatgrab . . . . $with_libstatgrab
632     libkstat  . . . . . $with_kstat
633
634   Features:
635     debug . . . . . . . $enable_debug
636     daemon mode . . . . $enable_daemon
637
638   Modules:
639     cpu . . . . . . . . $enable_cpu
640     cpufreq . . . . . . $enable_cpufreq
641     disk  . . . . . . . $enable_disk
642     hddtemp . . . . . . $enable_hddtemp
643     load  . . . . . . . $enable_load
644     memory  . . . . . . $enable_memory
645     nfs . . . . . . . . $enable_nfs
646     ping  . . . . . . . $enable_ping
647     processes . . . . . $enable_processes
648     sensors . . . . . . $enable_sensors
649     serial  . . . . . . $enable_serial
650     swap  . . . . . . . $enable_swap
651     tape  . . . . . . . $enable_tape
652     traffic . . . . . . $enable_traffic
653     users . . . . . . . $enable_users
654
655 EOF