Merge branch 'collectd-3.11'
[collectd.git] / configure.in
1 dnl Process this file with autoconf to produce a configure script.
2 AC_INIT(collectd, 3.11.4)
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 AC_SYS_LARGEFILE
11
12 #
13 # Checks for programs.
14 #
15 AC_PROG_CC
16 AC_PROG_CPP
17 AC_PROG_INSTALL
18 AC_PROG_LN_S
19 AC_PROG_MAKE_SET
20 AM_CONDITIONAL(COMPILER_IS_GCC, test "x$GCC" = "xyes")
21
22 dnl configure libtool
23 AC_DISABLE_STATIC
24 AC_LIBLTDL_CONVENIENCE
25 AC_SUBST(LTDLINCL)
26 AC_SUBST(LIBLTDL)
27 AC_LIBTOOL_DLOPEN
28 AC_PROG_LIBTOOL
29 #AC_PROG_RANLIB
30 AC_CONFIG_SUBDIRS(libltdl)
31
32 #
33 # Checks for header files.
34 #
35 AC_HEADER_STDC
36 AC_HEADER_SYS_WAIT
37 AC_HEADER_DIRENT
38 AC_CHECK_HEADERS(stdint.h)
39 AC_CHECK_HEADERS(stdio.h)
40 AC_CHECK_HEADERS(errno.h)
41 AC_CHECK_HEADERS(math.h)
42 AC_CHECK_HEADERS(syslog.h)
43 AC_CHECK_HEADERS(fcntl.h)
44 AC_CHECK_HEADERS(signal.h)
45 AC_CHECK_HEADERS(assert.h)
46 AC_CHECK_HEADERS(sys/types.h)
47 AC_CHECK_HEADERS(sys/socket.h)
48 AC_CHECK_HEADERS(sys/select.h)
49 AC_CHECK_HEADERS(sys/poll.h)
50 AC_CHECK_HEADERS(netdb.h)
51 AC_CHECK_HEADERS(arpa/inet.h)
52 AC_CHECK_HEADERS(sys/resource.h)
53 AC_CHECK_HEADERS(sys/param.h)
54
55 # For ping library
56 AC_CHECK_HEADERS(netinet/in_systm.h, [], [],
57 [#if HAVE_STDINT_H
58 # include <stdint.h>
59 #endif
60 #if HAVE_SYS_TYPES_H
61 # include <sys/types.h>
62 #endif
63 ])
64 AC_CHECK_HEADERS(netinet/in.h, [], [],
65 [#if HAVE_STDINT_H
66 # include <stdint.h>
67 #endif
68 #if HAVE_SYS_TYPES_H
69 # include <sys/types.h>
70 #endif
71 #if HAVE_NETINET_IN_SYSTM_H
72 # include <netinet/in_systm.h>
73 #endif
74 ])
75 AC_CHECK_HEADERS(netinet/ip.h, [], [],
76 [#if HAVE_STDINT_H
77 # include <stdint.h>
78 #endif
79 #if HAVE_SYS_TYPES_H
80 # include <sys/types.h>
81 #endif
82 #if HAVE_NETINET_IN_SYSTM_H
83 # include <netinet/in_systm.h>
84 #endif
85 #if HAVE_NETINET_IN_H
86 # include <netinet/in.h>
87 #endif
88 ])
89 AC_CHECK_HEADERS(netinet/ip_icmp.h, [], [],
90 [#if HAVE_STDINT_H
91 # include <stdint.h>
92 #endif
93 #if HAVE_SYS_TYPES_H
94 # include <sys/types.h>
95 #endif
96 #if HAVE_NETINET_IN_SYSTM_H
97 # include <netinet/in_systm.h>
98 #endif
99 #if HAVE_NETINET_IN_H
100 # include <netinet/in.h>
101 #endif
102 #if HAVE_NETINET_IP_H
103 # include <netinet/ip.h>
104 #endif
105 ])
106 AC_CHECK_HEADERS(netinet/ip_var.h, [], [],
107 [#if HAVE_STDINT_H
108 # include <stdint.h>
109 #endif
110 #if HAVE_SYS_TYPES_H
111 # include <sys/types.h>
112 #endif
113 #if HAVE_NETINET_IN_SYSTM_H
114 # include <netinet/in_systm.h>
115 #endif
116 #if HAVE_NETINET_IN_H
117 # include <netinet/in.h>
118 #endif
119 #if HAVE_NETINET_IP_H
120 # include <netinet/ip.h>
121 #endif
122 ])
123 AC_CHECK_HEADERS(netinet/ip6.h, [], [],
124 [#if HAVE_STDINT_H
125 # include <stdint.h>
126 #endif
127 #if HAVE_SYS_TYPES_H
128 # include <sys/types.h>
129 #endif
130 #if HAVE_NETINET_IN_SYSTM_H
131 # include <netinet/in_systm.h>
132 #endif
133 #if HAVE_NETINET_IN_H
134 # include <netinet/in.h>
135 #endif
136 ])
137 AC_CHECK_HEADERS(netinet/icmp6.h, [], [],
138 [#if HAVE_STDINT_H
139 # include <stdint.h>
140 #endif
141 #if HAVE_SYS_TYPES_H
142 # include <sys/types.h>
143 #endif
144 #if HAVE_NETINET_IN_SYSTM_H
145 # include <netinet/in_systm.h>
146 #endif
147 #if HAVE_NETINET_IN_H
148 # include <netinet/in.h>
149 #endif
150 #if HAVE_NETINET_IP6_H
151 # include <netinet/ip6.h>
152 #endif
153 ])
154 AC_CHECK_HEADERS(netinet/udp.h, [], [],
155 [#if HAVE_STDINT_H
156 # include <stdint.h>
157 #endif
158 #if HAVE_SYS_TYPES_H
159 # include <sys/types.h>
160 #endif
161 #if HAVE_NETINET_IN_SYSTM_H
162 # include <netinet/in_systm.h>
163 #endif
164 #if HAVE_NETINET_IN_H
165 # include <netinet/in.h>
166 #endif
167 #if HAVE_NETINET_IP_H
168 # include <netinet/ip.h>
169 #endif
170 ])
171
172 # For cpu modules
173 AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
174 AC_CHECK_HEADERS(mach/mach_init.h)
175 AC_CHECK_HEADERS(mach/host_priv.h)
176 AC_CHECK_HEADERS(mach/mach_error.h)
177 AC_CHECK_HEADERS(mach/mach_host.h)
178 AC_CHECK_HEADERS(mach/mach_port.h)
179 AC_CHECK_HEADERS(mach/mach_types.h)
180 AC_CHECK_HEADERS(mach/message.h)
181 AC_CHECK_HEADERS(mach/processor_set.h)
182 AC_CHECK_HEADERS(mach/processor.h)
183 AC_CHECK_HEADERS(mach/processor_info.h)
184 AC_CHECK_HEADERS(mach/task.h)
185 AC_CHECK_HEADERS(mach/thread_act.h)
186 AC_CHECK_HEADERS(mach/vm_region.h)
187 AC_CHECK_HEADERS(mach/vm_map.h)
188 AC_CHECK_HEADERS(mach/vm_prot.h)
189 AC_CHECK_HEADERS(mach/vm_statistics.h)
190 AC_CHECK_HEADERS(mach/kern_return.h)
191
192 # For hddtemp module
193 AC_CHECK_HEADERS(linux/major.h)
194
195 # For the apple_sensors module
196 AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h)
197 AC_CHECK_HEADERS(IOKit/IOKitLib.h)
198 AC_CHECK_HEADERS(IOKit/IOTypes.h)
199
200 # For the battery plugin
201 AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
202 [
203 #if HAVE_IOKIT_IOKITLIB_H
204 #  include <IOKit/IOKitLib.h>
205 #endif
206 #if HAVE_IOKIT_IOTYPES_H
207 #  include <IOKit/IOTypes.h>
208 #endif
209 ])
210 AC_CHECK_HEADERS(IOKit/ps/IOPSKeys.h)
211
212 # For the `disk' plugin
213 AC_CHECK_HEADERS(IOKit/IOBSD.h)
214 AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDriver.h)
215
216 # For load module
217 AC_CHECK_HEADERS(sys/loadavg.h)
218
219 # For the processes plugin
220 AC_CHECK_HEADERS(linux/config.h)
221
222 # For the swap module
223 AC_CHECK_HEADERS(sys/swap.h)
224
225 # For users module
226 AC_CHECK_HEADERS(utmp.h)
227 AC_CHECK_HEADERS(utmpx.h)
228
229 # For traffic plugin
230 AC_CHECK_HEADERS(ifaddrs.h)
231 AC_CHECK_HEADERS(net/if.h, [], [],
232 [
233 #if HAVE_SYS_TYPES_H
234 #  include <sys/types.h>
235 #endif
236 #if HAVE_SYS_SOCKET_H
237 #  include <sys/socket.h>
238 #endif
239 ])
240 AC_CHECK_HEADERS(linux/if.h, [], [],
241 [
242 #if HAVE_SYS_TYPES_H
243 #  include <sys/types.h>
244 #endif
245 #if HAVE_SYS_SOCKET_H
246 #  include <sys/socket.h>
247 #endif
248 ])
249 AC_CHECK_HEADERS(linux/netdevice.h, [], [],
250 [
251 #if HAVE_SYS_TYPES_H
252 #  include <sys/types.h>
253 #endif
254 #if HAVE_SYS_SOCKET_H
255 #  include <sys/socket.h>
256 #endif
257 #if HAVE_LINUX_IF_H
258 # include <linux/if.h>
259 #endif
260 ])
261
262 # For apache plugin
263 AC_CHECK_HEADERS(curl/curl.h)
264
265 # For quota module
266 AC_CHECK_HEADERS(grp.h pwd.h sys/ucred.h)
267 AC_CHECK_HEADERS(ctype.h)
268 AC_CHECK_HEADERS(limits.h)
269 AC_CHECK_HEADERS(sys/quota.h)
270 AC_CHECK_HEADERS(xfs/xqm.h)
271
272 # For mount interface
273 AC_CHECK_HEADERS(fs_info.h)
274 AC_CHECK_HEADERS(fshelp.h)
275 AC_CHECK_HEADERS(paths.h)
276 AC_CHECK_HEADERS(mntent.h)
277 AC_CHECK_HEADERS(mnttab.h)
278 AC_CHECK_HEADERS(sys/fstyp.h)
279 AC_CHECK_HEADERS(sys/fs_types.h)
280 AC_CHECK_HEADERS(sys/mntent.h)
281 AC_CHECK_HEADERS(sys/mnttab.h)
282 AC_CHECK_HEADERS(sys/mount.h)
283 AC_CHECK_HEADERS(sys/statfs.h)
284 AC_CHECK_HEADERS(sys/statvfs.h)
285 AC_CHECK_HEADERS(sys/vfs.h)
286 AC_CHECK_HEADERS(sys/vfstab.h)
287
288 # For the swap plugin, FreeBSD
289 AC_CHECK_HEADERS(kvm.h)
290
291 # For the email plugin
292 AC_CHECK_HEADERS(linux/un.h, [], [],
293 [
294 #if HAVE_SYS_SOCKET_H
295 #       include <sys/socket.h>
296 #endif
297 ])
298 AC_CHECK_HEADERS(sys/un.h)
299 AC_CHECK_HEADERS(grp.h)
300
301 # For debugging interface (variable number of arguments)
302 AC_CHECK_HEADERS(stdarg.h)
303
304 # Regular expressions for the ignorelist.
305 AC_CHECK_HEADERS(regex.h)
306
307 # For the dns plugin
308 AC_CHECK_HEADERS(arpa/nameser.h arpa/nameser_compat.h)
309
310 AC_CHECK_HEADERS(net/if_arp.h, [], [],
311 [#if HAVE_SYS_SOCKET_H
312 # include <sys/socket.h>
313 #endif
314 ])
315 AC_CHECK_HEADERS(net/if_ppp.h)
316 AC_CHECK_HEADERS(netinet/if_ether.h, [], [],
317 [#if HAVE_STDINT_H
318 # include <stdint.h>
319 #endif
320 #if HAVE_SYS_TYPES_H
321 # include <sys/types.h>
322 #endif
323 #if HAVE_SYS_SOCKET_H
324 # include <sys/socket.h>
325 #endif
326 #if HAVE_NET_IF_H
327 # include <net/if.h>
328 #endif
329 #if HAVE_NETINET_IN_H
330 # include <netinet/in.h>
331 #endif
332 ])
333
334 #
335 # Checking for libraries
336 #
337 AC_CHECK_LIB(m, ext)
338
339 #
340 # Checks for typedefs, structures, and compiler characteristics.
341 #
342 AC_C_CONST
343 AC_TYPE_PID_T
344 AC_TYPE_SIZE_T
345 AC_TYPE_UID_T
346 AC_HEADER_TIME
347
348 #
349 # Checks for library functions.
350 #
351 AC_PROG_GCC_TRADITIONAL
352 AC_CHECK_FUNCS(gettimeofday select strdup strtol)
353 AC_CHECK_FUNCS(getaddrinfo getnameinfo)
354 AC_CHECK_FUNCS(strchr memcpy strstr strcmp strncmp strncpy strlen)
355 AC_CHECK_FUNCS(strncasecmp strcasecmp)
356 AC_CHECK_FUNCS(openlog syslog closelog)
357
358 socket_needs_socket="no"
359 AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="yes"], AC_MSG_ERROR(cannot find socket)))
360 AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
361
362 nanosleep_needs_rt="no"
363 AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
364 AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
365
366 # Regular expressions for the ignorelist.
367 AC_CHECK_FUNCS(regcomp regerror regexec regfree)
368
369 # For cpu module
370 AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
371
372 # For df module
373 AC_CHECK_FUNCS(statfs statvfs)
374
375 # For load module
376 AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
377
378 # For the `processes' plugin
379 AC_CHECK_FUNCS(thread_info)
380
381 # For users module
382 AC_CHECK_FUNCS(getutent getutxent)
383
384 # For quota module
385 AC_CHECK_FUNCS(quotactl)
386 AC_CHECK_FUNCS(getgrgid getpwuid)
387
388 # For traffic module
389 AC_CHECK_FUNCS(getifaddrs)
390
391 # For mount interface
392 #AC_CHECK_FUNCS(getfsent getvfsent)
393
394 have_getfsstat="no"
395 AC_CHECK_FUNCS(getfsstat, [have_getfsstat="yes"])
396 have_getvfsstat="no"
397 AC_CHECK_FUNCS(getvfsstat, [have_getvfsstat="yes"])
398 have_listmntent="no"
399 AC_CHECK_FUNCS(listmntent, [have_listmntent="yes"])
400
401 have_getmntent="no"
402 AC_CHECK_FUNCS(getmntent, [have_getmntent="c"])
403 if test "x$have_getmntent" = "xno"; then
404         AC_CHECK_LIB(sun, getmntent, [have_getmntent="sun"])
405 fi
406 if test "x$have_getmntent" = "xno"; then
407         AC_CHECK_LIB(seq, getmntent, [have_getmntent="seq"])
408 fi
409 if test "x$have_getmntent" = "xno"; then
410         AC_CHECK_LIB(gen, getmntent, [have_getmntent="gen"])
411 fi
412
413 if test "x$have_getmntent" = "xc"; then
414         AC_CACHE_CHECK([whether getmntent takes one argument],
415                 [have_one_getmntent],
416                 AC_COMPILE_IFELSE(
417                         AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
418 #include <mntent.h>
419 #include "$srcdir/src/utils_mount.h"]],
420                                 [[
421                                  FILE *fh;
422                                  struct mntent *me;
423                                  fh = setmntent ("/etc/mtab", "r");
424                                  me = getmntent (fh);
425                                 ]]
426                         ),
427                         [have_one_getmntent="yes"],
428                         [have_one_getmntent="no"]
429                 )
430         )
431         AC_CACHE_CHECK([whether getmntent takes two arguments],
432                 [have_two_getmntent],
433                 AC_COMPILE_IFELSE(
434                         AC_LANG_PROGRAM([[AC_INCLUDES_DEFAULT
435 #include <sys/mnttab.h>
436 #include "$srcdir/src/utils_mount.h"]],
437                                 [[
438                                  FILE *fh;
439                                  struct mnttab mt;
440                                  int status;
441                                  fh = fopen ("/etc/mnttab", "r");
442                                  status = getmntent (fh, &mt);
443                                 ]]
444                         ),
445                         [have_two_getmntent="yes"],
446                         [have_two_getmntent="no"]
447                 )
448         )
449 fi
450
451 # Check for different versions of `getmntent' here..
452
453 if test "x$have_getmntent" = "xc"; then
454         if test "x$have_one_getmntent" = "xyes"; then
455                 AC_DEFINE(HAVE_ONE_GETMNTENT, 1,
456                           [Define if the function getmntent exists and takes one argument.])
457         fi
458         if test "x$have_two_getmntent" = "xyes"; then
459                 AC_DEFINE(HAVE_TWO_GETMNTENT, 1,
460                           [Define if the function getmntent exists and takes two arguments.])
461         fi
462 fi
463 if test "x$have_getmntent" = "xsun"; then
464         AC_DEFINE(HAVE_SUN_GETMNTENT, 1,
465                   [Define if the function getmntent exists. It's the version from libsun.])
466 fi
467 if test "x$have_getmntent" = "xseq"; then
468         AC_DEFINE(HAVE_SEQ_GETMNTENT, 1,
469                   [Define if the function getmntent exists. It's the version from libseq.])
470 fi
471 if test "x$have_getmntent" = "xgen"; then
472         AC_DEFINE(HAVE_GEN_GETMNTENT, 1,
473                   [Define if the function getmntent exists. It's the version from libgen.])
474 fi
475
476 # Check for structures
477 AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_opackets, struct if_data.ifi_ierrors],
478         [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
479         [],
480         [
481         #include <sys/types.h>
482         #include <sys/socket.h>
483         #include <net/if.h>
484         ])
485 AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_packets, struct net_device_stats.rx_errors],
486         [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
487         [],
488         [
489         #include <sys/types.h>
490         #include <sys/socket.h>
491         #include <linux/if.h>
492         #include <linux/netdevice.h>
493         ])
494
495 AC_CHECK_MEMBERS([struct udphdr.uh_dport, struct udphdr.uh_sport], [], [],
496 [#if HAVE_STDINT_H
497 # include <stdint.h>
498 #endif
499 #if HAVE_SYS_TYPES_H
500 # include <sys/types.h>
501 #endif
502 #if HAVE_NETINET_IN_SYSTM_H
503 # include <netinet/in_systm.h>
504 #endif
505 #if HAVE_NETINET_IN_H
506 # include <netinet/in.h>
507 #endif
508 #if HAVE_NETINET_IP_H
509 # include <netinet/ip.h>
510 #endif
511 #if HAVE_NETINET_UDP_H
512 # include <netinet/udp.h>
513 #endif
514 ])
515 AC_CHECK_MEMBERS([struct udphdr.dest, struct udphdr.source], [], [],
516 [#if HAVE_STDINT_H
517 # include <stdint.h>
518 #endif
519 #if HAVE_SYS_TYPES_H
520 # include <sys/types.h>
521 #endif
522 #if HAVE_NETINET_IN_SYSTM_H
523 # include <netinet/in_systm.h>
524 #endif
525 #if HAVE_NETINET_IN_H
526 # include <netinet/in.h>
527 #endif
528 #if HAVE_NETINET_IP_H
529 # include <netinet/ip.h>
530 #endif
531 #if HAVE_NETINET_UDP_H
532 # include <netinet/udp.h>
533 #endif
534 ])
535
536 AC_MSG_CHECKING([for kernel type ($host_os)])
537 case $host_os in
538         *linux*)
539         AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
540         ac_system="Linux"
541         ;;
542         *solaris*)
543         AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
544         ac_system="Solaris"
545         ;;
546         *)
547         ac_system="unknown"
548 esac
549 AC_MSG_RESULT([$ac_system])
550
551 with_libresolv="yes"
552 AC_CHECK_LIB(resolv, res_search,
553 [
554         AC_DEFINE(HAVE_LIBRESOLV, 1, [Define to 1 if you have the 'resolv' library (-lresolv).])
555 ],
556 [with_libresolv="no"])
557 AM_CONDITIONAL(BUILD_WITH_LIBRESOLV, test "x$with_libresolv" = "xyes")
558
559
560 m4_divert_once([HELP_WITH], [
561 collectd additional packages:])
562
563 # AC_ARG_WITH (package, help-string, [action-if-given], [action-if-not-given])
564 AC_ARG_WITH(rrdtool, [AS_HELP_STRING([--with-rrdtool@<:@=PREFIX@:>@], [Path to rrdtool.])],
565 [       if test "x$withval" != "xno" && test "x$withval" != "xyes"
566         then
567                 LDFLAGS="$LDFLAGS -L$withval/lib"
568                 CPPFLAGS="$CPPFLAGS -I$withval/include"
569                 with_rrdtool="yes"
570         fi
571 ], [with_rrdtool="yes"])
572 if test "x$with_rrdtool" = "xyes"
573 then
574         AC_CHECK_LIB(rrd, rrd_update,
575         [
576                 AC_DEFINE(HAVE_LIBRRD, 1, [Define to 1 if you have the rrd library (-lrrd).])
577         ],
578         [with_rrdtool="no (librrd not found)"], [-lm])
579 fi
580 if test "x$with_rrdtool" = "xyes"
581 then
582         AC_CHECK_HEADERS(rrd.h,, [with_rrdtool="no (rrd.h not found)"])
583 fi
584 if test "x$with_rrdtool" = "xyes"
585 then
586         collect_rrdtool=1
587 else
588         collect_rrdtool=0
589 fi
590 AC_DEFINE_UNQUOTED(COLLECT_RRDTOOL, [$collect_rrdtool],
591         [Wether or not to use rrdtool library])
592 AM_CONDITIONAL(BUILD_WITH_RRDTOOL, test "x$with_rrdtool" = "xyes")
593
594 AC_ARG_WITH(libpthread, [AS_HELP_STRING([--with-libpthread=@<:@=PREFIX@:>@], [Path to libpthread.])],
595 [       if test "x$withval" != "xno" -a "x$withval" != "xyes"
596         then
597                 LDFLAGS="$LDFLAGS -L$withval/lib"
598                 CPPFLAGS="$CPPFLAGS -I$withval/include"
599                 with_libpthread="yes"
600         else
601                 if test "x$withval" = "xno"
602                 then
603                         with_libpthread="no (disabled)"
604                 fi
605         fi
606 ], [with_libpthread="yes"])
607 if test "x$with_libpthread" = "xyes"
608 then
609         AC_CHECK_LIB(pthread, pthread_create, [with_libpthread="yes"], [with_libpthread="no (libpthread not found)"], [])
610 fi
611 if test "x$with_libpthread" = "xyes"
612 then
613         AC_CHECK_HEADERS(pthread.h,, [with_libpthread="no (pthread.h not found)"])
614 fi
615 if test "x$with_libpthread" = "xyes"
616 then
617         collect_pthread=1
618 else
619         collect_pthread=0
620 fi
621 AC_DEFINE_UNQUOTED(HAVE_LIBPTHREAD, [$collect_pthread],
622         [Wether or not to use pthread (POSIX threads) library])
623 AM_CONDITIONAL(BUILD_WITH_LIBPTHREAD, test "x$with_libpthread" = "xyes")
624
625 if test "$ac_system" = "Solaris"
626 then
627         with_kstat="yes"
628         with_devinfo="yes"
629 else
630         with_kstat="no (Solaris only)"
631         with_devinfo="no (Solaris only)"
632 fi
633
634 if test "x$with_kstat" = "xyes"
635 then
636         AC_CHECK_LIB(kstat, kstat_open, [with_kstat="yes"], [with_kstat="no (libkstat not found)"], [])
637 fi
638 if test "x$with_kstat" = "xyes"
639 then
640         AC_CHECK_LIB(devinfo, di_init, [with_devinfo="yes"], [with_devinfo="no (not found)"], [])
641         AC_CHECK_HEADERS(kstat.h,, [with_kstat="no (kstat.h not found)"])
642 fi
643 if test "x$with_kstat" = "xyes"
644 then
645         AC_DEFINE(HAVE_LIBKSTAT, 1,
646                   [Define to 1 if you have the 'kstat' library (-lkstat)])
647 fi
648 AM_CONDITIONAL(BUILD_WITH_LIBKSTAT, test "x$with_kstat" = "xyes")
649 AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
650
651 ### BEGIN of check for libcurl ###
652 with_curl_config="curl-config"
653 with_curl_prefix=0
654 with_curl_libs=""
655 AC_ARG_WITH(libcurl, [AS_HELP_STRING([--with-libcurl@<:@=PREFIX@:>@], [Path to libcurl.])],
656 [
657         if test "x$withval" != "xno" -a "x$withval" != "xyes"
658         then
659                 if test -x "$withval/bin/curl-config"
660                 then
661                         with_curl_config="$withval/bin/curl-config"
662                         with_curl_prefix=1
663                 fi
664         fi
665         if test "x$withval" = "xno"
666         then
667                 with_libcurl="no"
668         else
669                 with_libcurl="yes"
670         fi
671 ],
672 [
673         with_libcurl="yes"
674 ])
675 if test "x$with_libcurl" = "xyes"
676 then
677         with_curl_libs=`$with_curl_config --libs 2>/dev/null`
678         curl_config_status=$?
679
680         if test $curl_config_status -ne 0
681         then
682                 with_libcurl="no"
683         else
684                 AC_CHECK_LIB(curl, curl_easy_init,
685                 [
686                         BUILD_WITH_LIBCURL_LIBS="$with_curl_libs"
687                         AC_SUBST(BUILD_WITH_LIBCURL_LIBS)
688                 ],
689                 [
690                         with_libcurl="no"
691                 ],
692                 [$with_curl_libs])
693         fi
694 fi
695 if test "x$with_libcurl" = "xyes" -a $with_curl_prefix -ne 0
696 then
697         with_curl_prefix=`$with_curl_config --libs 2>/dev/null`
698         curl_config_status=$?
699
700         if test $curl_config_status -ne 0
701         then
702                 with_libcurl="no"
703         else
704                 if test -d "$with_curl_prefix/include"
705                 then
706                         CPPFLAGS="$CPPFLAGS -I$with_curl_prefix/include"
707                 fi
708         fi
709 fi
710
711 with_libcurl_numeric=0
712 if test "x$with_libcurl" = "xyes"
713 then
714         with_libcurl_numeric=1
715 fi
716 AC_DEFINE_UNQUOTED(HAVE_LIBCURL, [$with_libcurl_numeric], [Define to 1 if you have the 'curl' library (-lcurl).])
717 AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
718 ### END of check for libcurl ###
719
720 with_libiokit="no"
721 collectd_libiokit=0
722 AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
723 [
724         with_libiokit="yes"
725         collectd_libiokit=1
726 ], 
727 [
728         with_libiokit="no"
729         collectd_libiokit=0
730 ])
731 AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
732 AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
733
734 with_libstatgrab="yes"
735 with_libdevstat="no"
736 AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
737 [
738         if test "x$withval" != "xno" -a "x$withval" != "xyes"
739         then
740                 LDFLAGS="$LDFLAGS -L$withval/lib"
741                 CPPFLAGS="$CPPFLAGS -I$withval/include"
742                 with_libstatgrab="yes"
743         fi
744 ],
745 [
746         if test "x$ac_system" == "xunknown"
747         then
748                 with_libstatgrab="yes"
749         else
750                 with_libstatgrab="no"
751         fi
752 ])
753 if test "x$with_libstatgrab" = "xyes"
754 then
755         AC_CHECK_LIB(statgrab, sg_init, [with_libstatgrab="yes"], [with_libstatgrab="no (libstatgrab not found)"])
756 fi
757 if test "x$with_libstatgrab" = "xyes"
758 then
759         AC_CHECK_HEADERS(statgrab.h,,    [with_libstatgrab="no (statgrab.h not found)"])
760 fi
761 if test "x$with_libstatgrab" = "xyes"
762 then
763         AC_CHECK_LIB(devstat, getdevs, [with_libdevstat="yes"], [with_libdevstat="no"])
764 fi
765 if test "x$with_libstatgrab" = "xyes"
766 then
767         collect_libstatgrab=1
768 else
769         collect_libstatgrab=0
770 fi
771 AC_DEFINE_UNQUOTED(COLLECT_LIBSTATGRAB, [$collect_libstatgrab],
772         [Wether or not to use statgrab library])
773 AM_CONDITIONAL(BUILD_WITH_LIBSTATGRAB, test "x$with_libstatgrab" = "xyes")
774 AM_CONDITIONAL(BUILD_WITH_LIBDEVSTAT,  test "x$with_libdevstat"  = "xyes")
775
776 AC_CHECK_LIB(kvm, kvm_getswapinfo, [with_libkvm="yes"], [with_libkvm="no"])
777 if test "x$with_libkvm" = "xyes"
778 then
779         AC_DEFINE(HAVE_LIBKVM, 1, [Define to 1 if you have the 'kvm' library (-lkvm)])
780 fi
781 AM_CONDITIONAL(BUILD_WITH_LIBKVM, test "x$with_libkvm" = "xyes")
782
783 AC_ARG_WITH(lm-sensors, [AS_HELP_STRING([--with-lm-sensors@<:@=PREFIX@:>@], [Path to lm_sensors.])],
784 [
785         if test "x$withval" != "xno" && test "x$withval" != "xyes"
786         then
787                 LDFLAGS="$LDFLAGS -L$withval/lib"
788                 CPPFLAGS="$CPPFLAGS -I$withval/include"
789                 with_lm_sensors="yes"
790         fi
791 ],
792 [
793         if test "x$ac_system" = "xLinux"
794         then
795                 with_lm_sensors="yes"
796         else
797                 with_lm_sensors="no"
798         fi
799 ])
800 if test "x$with_lm_sensors" = "xyes"
801 then
802         AC_CHECK_LIB(sensors, sensors_init,
803         [
804                 AC_DEFINE(HAVE_LIBSENSORS, 1, [Define to 1 if you have the sensors library (-lsensors).])
805         ],
806         [with_lm_sensors="no (libsensors not found)"])
807 fi
808 if test "x$with_lm_sensors" = "xyes"
809 then
810         AC_CHECK_HEADERS(sensors/sensors.h,
811         [
812                 AC_DEFINE(HAVE_SENSORS_SENSORS_H, 1, [Define to 1 if you have the <sensors/sensors.h> header file.])
813         ],
814         [with_lm_sensors="no (sensors/sensors.h not found)"])
815 fi
816 if test "x$with_lm_sensors" = "xyes"
817 then
818         collect_lm_sensors=1
819 else
820         collect_lm_sensors=0
821 fi
822 AC_DEFINE_UNQUOTED(COLLECT_LM_SENSORS, [$collect_lm_sensors],
823         [Wether or not to use sensors library])
824 AM_CONDITIONAL(BUILD_WITH_LM_SENSORS, test "x$with_lm_sensors" = "xyes")
825
826 AC_ARG_WITH(libmysql, [AS_HELP_STRING([--with-libmysql@<:@=PREFIX@:>@], [Path to libmysql.])],
827 [
828         if test "x$withval" != "xno" && test "x$withval" != "xyes"
829         then
830                 LDFLAGS="$LDFLAGS -L$withval/lib"
831                 CPPFLAGS="$CPPFLAGS -I$withval/include"
832                 with_libmysql="yes"
833         fi
834 ],
835 [
836         with_libmysql="yes"
837 ])
838 if test "x$with_libmysql" = "xyes"
839 then
840         AC_CHECK_LIB(mysqlclient, mysql_init,
841         [
842                 AC_DEFINE(HAVE_LIBMYSQLCLIENT, 1, [Define to 1 if you have the mysqlclient library (-lmysqlclient).])
843         ], [with_libmysql="no (libmysql not found)"])
844 fi
845 if test "x$with_libmysql" = "xyes"
846 then
847         AC_CHECK_HEADERS(mysql/mysql.h,
848         [
849                 AC_DEFINE(HAVE_MYSQL_MYSQL_H, 1, [Define to 1 if you have the <mysql/mysql.h> header file.])
850         ], [with_libmysql="no (mysql/mysql.h not found)"])
851 fi
852 if test "x$with_libmysql" = "xyes"
853 then
854         collect_libmysql=1
855 else
856         collect_libmysql=0
857 fi
858 AC_DEFINE_UNQUOTED(COLLECT_LIBMYSQL, [$collect_libmysql],
859         [Wether or not to use mysql library])
860 AM_CONDITIONAL(BUILD_WITH_LIBMYSQL, test "x$with_libmysql" = "xyes")
861
862 #with_liboping="yes"
863 with_own_liboping="no"
864 liboping_LDFLAGS="$LDFLAGS"
865 liboping_CPPFLAGS="$CPPFLAGS"
866 AC_ARG_WITH(liboping, [AS_HELP_STRING([--with-liboping@<:@=PREFIX@:>@], [Path to liboping.])],
867 [
868         if test "x$withval" != "xno" && test "x$withval" != "xyes"
869         then
870                 if test -d "$withval/lib"
871                 then
872                         liboping_LDFLAGS="$LDFLAGS -L$withval/lib"
873                 fi
874                 if test -d "$withval/include"
875                 then
876                         liboping_CPPFLAGS="$CPPFLAGS -I$withval/include"
877                 fi
878         fi
879         if test "x$withval" = "xno"
880         then
881                 with_liboping="no"
882                 with_own_liboping="no"
883         fi
884 ],
885 [
886         #753
887         with_liboping="yes"
888 ])
889
890 if test "x$with_liboping" = "xyes"
891 then
892         save_LDFLAGS="$LDFLAGS"
893         save_CPPFLAGS="$CPPFLAGS"
894         LDFLAGS="$liboping_LDFLAGS"
895         CPPFLAGS="$liboping_CPPFLAGS"
896         AC_CHECK_LIB(oping, ping_construct,
897         [
898                 with_liboping="yes"
899                 with_own_liboping="no"
900         ],
901         [
902                 with_liboping="yes"
903                 with_own_liboping="yes"
904                 LDFLAGS="$save_LDFLAGS"
905                 CPPFLAGS="$save_CPPFLAGS"
906         ])
907 fi
908 AM_CONDITIONAL(BUILD_WITH_LIBOPING, test "x$with_liboping" = "xyes")
909 AM_CONDITIONAL(BUILD_WITH_OWN_LIBOPING, test "x$with_own_liboping" = "xyes")
910 if test "x$with_liboping" = "xyes" -a "x$with_own_liboping" = "xyes"
911 then
912         with_liboping="yes (shipped version)"
913 fi
914
915 AC_ARG_WITH(libpcap, [AS_HELP_STRING([--with-libpcap@<:@=PREFIX@:>@], [Path to libpcap.])],
916 [
917         if test "x$withval" != "xno" && test "x$withval" != "xyes"
918         then
919                 LDFLAGS="$LDFLAGS -L$withval/lib"
920                 CPPFLAGS="$CPPFLAGS -I$withval/include"
921                 with_libpcap="yes"
922         fi
923 ],
924 [
925         with_libpcap="yes"
926 ])
927 if test "x$with_libpcap" = "xyes"
928 then
929         AC_CHECK_LIB(pcap, pcap_open_live,
930         [
931                 AC_DEFINE(HAVE_LIBPCAP, 1, [Define to 1 if you have the pcap library (-lpcap).])
932         ], [with_libpcap="no (libpcap not found)"])
933 fi
934 if test "x$with_libpcap" = "xyes"
935 then
936         AC_CHECK_HEADERS(pcap.h,
937         [
938                 AC_DEFINE(HAVE_PCAP_H, 1, [Define to 1 if you have the <pcap.h> header file.])
939         ], [with_libpcap="no (pcap.h not found)"])
940 fi
941 if test "x$with_libpcap" = "xyes"
942 then
943         collect_libpcap=1
944 else
945         collect_libpcap=0
946 fi
947 AC_DEFINE_UNQUOTED(COLLECT_LIBPCAP, [$collect_libpcap],
948         [Wether or not to use the pcap library])
949 AM_CONDITIONAL(BUILD_WITH_LIBPCAP, test "x$with_libpcap" = "xyes")
950
951 AC_ARG_WITH(libiptc, [AS_HELP_STRING([--with-libiptc@<:@=PREFIX@:>@], [Path to libiptc.])],
952 [
953         if test "x$withval" != "xno" && test "x$withval" != "xyes"
954         then
955                 LDFLAGS="$LDFLAGS -L$withval/lib"
956                 CPPFLAGS="$CPPFLAGS -I$withval/include"
957                 with_libiptc="yes"
958         fi
959 ],
960 [
961         if test "x$ac_system" = "xLinux"
962         then
963                 with_libiptc="yes"
964         else
965                 with_libiptc="no (Linux only)"
966         fi
967 ])
968 if test "x$with_libiptc" = "xyes"
969 then
970         AC_CHECK_LIB(iptc, iptc_init,
971         [
972                 AC_DEFINE(HAVE_LIBIPTC, 1, [Define to 1 if you have the iptc library (-liptc).])
973         ], [with_libiptc="no (libiptc not found)"])
974 fi
975 if test "x$with_libiptc" = "xyes"
976 then
977         AC_CHECK_HEADERS(libiptc/libiptc.h,
978         [
979                 AC_DEFINE(HAVE_LIBIPTC_LIBIPTC_H, 1, [Define to 1 if you have the <libiptc/libiptc.h> header file.])
980         ], [with_libiptc="no (libiptc/libiptc.h not found)"])
981 fi
982 if test "x$with_libiptc" = "xyes"
983 then
984         collect_libiptc=1
985 else
986         collect_libiptc=0
987 fi
988 AM_CONDITIONAL(BUILD_WITH_LIBIPTC, test "x$with_libiptc" = "xyes")
989
990 # Define `step' and `hearbeat' values..
991 declare -i collectd_step=10
992 declare -i collectd_heartbeat=25
993 AC_ARG_WITH(step, [AS_HELP_STRING([--with-step=SECONDS], [Interval in which plugins are queried.])],
994 [
995         if test "x$withval" != "xno" -a "x$withval" != "xyes"
996         then
997                 declare -i tmp_collectd_step="$withval"
998                 if test $tmp_collectd_step -gt 0
999                 then
1000                         collectd_step=$tmp_collectd_step
1001                         let "collectd_heartbeat=$collectd_step*2"
1002                 fi
1003         fi
1004 ], [])
1005 AC_ARG_WITH(heartbeat, [AS_HELP_STRING([--with-heartbeat=SECONDS], [Heartbeat of the DS in generated RRD files.])],
1006 [
1007         if test "x$withval" != "xno" -a "x$withval" != "xyes"
1008         then
1009                 declare -i tmp_collectd_heartbeat="$withval"
1010                 if test $tmp_collectd_heartbeat -gt 0
1011                 then
1012                         collectd_heartbeat=$tmp_collectd_heartbeat
1013                 fi
1014         fi
1015 ], [])
1016
1017 if test $collectd_step -ne 10
1018 then
1019         AC_DEFINE_UNQUOTED(COLLECTD_STEP, "$collectd_step", [Interval in which plugins are queried.])
1020 fi
1021 if test $collectd_heartbeat -ne 25
1022 then
1023         AC_DEFINE_UNQUOTED(COLLECTD_HEARTBEAT, "$collectd_heartbeat", [Interval in which plugins are queried.])
1024 fi
1025
1026 # Check for enabled/disabled features
1027 #
1028
1029 # AC_COLLECTD(name, enable/disable, info-text, feature/module)
1030 # ------------------------------------------------------------
1031 dnl
1032 m4_define([my_toupper], [m4_translit([$1], m4_defn([m4_cr_letters]), m4_defn([m4_cr_LETTERS]))])
1033 dnl
1034 AC_DEFUN(
1035         [AC_COLLECTD],
1036         [
1037         m4_if([$1], [], [AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 1st argument must not be empty])])dnl
1038         m4_if(
1039                 [$2],
1040                 [enable],
1041                 [dnl
1042                 m4_define([EnDis],[disabled])dnl
1043                 m4_define([YesNo],[no])dnl
1044                 ],dnl
1045                 [m4_if(
1046                         [$2],
1047                         [disable],
1048                         [dnl
1049                         m4_define([EnDis],[enabled])dnl
1050                         m4_define([YesNo],[yes])dnl
1051                         ],
1052                         [dnl
1053                         AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 2nd argument must be either enable or disable])dnl
1054                         ]dnl
1055                 )]dnl
1056         )dnl
1057         m4_if([$3], [feature], [],
1058                 [m4_if(
1059                         [$3], [module], [],
1060                         [dnl
1061                         AC_FATAL([AC_COLLECTD([$1], [$2], [$3], [$4]): 3rd argument must be either feature or disable])dnl
1062                         ]dnl
1063                 )]dnl
1064         )dnl
1065         AC_ARG_ENABLE(
1066                 [$1],
1067                 AS_HELP_STRING([--$2-$1], [$2 $4 (EnDis by def)]),
1068                 [],
1069                 enable_$1='[YesNo]'dnl
1070         )# AC_ARG_ENABLE
1071 if test "x$enable_$1" = "xno"
1072 then
1073         collectd_$1=0
1074 else
1075         if test "x$enable_$1" = "xyes"
1076         then
1077                 collectd_$1=1
1078         else
1079                 AC_MSG_NOTICE([please specify either --enable-$1 or --disable-$1; enabling $1.])
1080                 collectd_$1=1
1081                 enable_$1='yes'
1082         fi
1083 fi
1084         AC_DEFINE_UNQUOTED([COLLECT_]my_toupper([$1]), [$collectd_$1], [wether or not to enable $3 $4])
1085         AM_CONDITIONAL([BUILD_]my_toupper([$3])[_]my_toupper([$1]), [test "x$enable_$1" = "xyes"])dnl
1086         ]dnl
1087 )# AC_COLLECTD(name, enable/disable, info-text, feature/module)
1088
1089 m4_divert_once([HELP_ENABLE], [
1090 collectd features:])
1091 AC_COLLECTD([debug],     [enable],  [feature], [debugging])
1092 AC_COLLECTD([daemon],    [disable], [feature], [daemon mode])
1093 AC_COLLECTD([getifaddrs],[enable],  [feature], [getifaddrs under Linux])
1094
1095 m4_divert_once([HELP_ENABLE], [
1096 collectd modules:])
1097 AC_COLLECTD([apache],    [disable], [module], [Apache httpd statistics])
1098 AC_COLLECTD([apcups],    [disable], [module], [Statistics of UPSes by APC])
1099 AC_COLLECTD([apple_sensors], [disable], [module], [Apple's hardware sensors])
1100 AC_COLLECTD([battery],   [disable], [module], [battery statistics])
1101 AC_COLLECTD([cpu],       [disable], [module], [cpu usage statistics])
1102 AC_COLLECTD([cpufreq],   [disable], [module], [system cpu frequency statistics])
1103 AC_COLLECTD([disk],      [disable], [module], [disk/partition statistics])
1104 AC_COLLECTD([df],        [disable], [module], [df statistics])
1105 AC_COLLECTD([dns],       [disable], [module], [dns statistics])
1106 AC_COLLECTD([email],     [disable], [module], [email statistics])
1107 AC_COLLECTD([quota],     [enable],  [module], [quota statistics (experimental)])
1108 AC_COLLECTD([hddtemp],   [disable], [module], [hdd temperature statistics])
1109 AC_COLLECTD([iptables],  [disable], [module], [IPtables statistics])
1110 AC_COLLECTD([irq],       [disable], [module], [irq statistics])
1111 AC_COLLECTD([load],      [disable], [module], [system load statistics])
1112 AC_COLLECTD([mbmon],     [disable], [module], [motherboard monitor statistics])
1113 AC_COLLECTD([memory],    [disable], [module], [memory statistics])
1114 AC_COLLECTD([multimeter],[disable], [module], [multimeter statistics])
1115 AC_COLLECTD([mysql],     [disable], [module], [mysql statistics])
1116 AC_COLLECTD([nfs],       [disable], [module], [nfs statistics])
1117 AC_COLLECTD([ntpd],      [disable], [module], [ntpd statistics])
1118 AC_COLLECTD([ping],      [disable], [module], [ping statistics])
1119 AC_COLLECTD([processes], [disable], [module], [processes statistics])
1120 AC_COLLECTD([sensors],   [disable], [module], [lm_sensors statistics])
1121 AC_COLLECTD([serial],    [disable], [module], [serial statistics])
1122 AC_COLLECTD([swap],      [disable], [module], [swap statistics])
1123 AC_COLLECTD([tape],      [disable], [module], [tape statistics])
1124 AC_COLLECTD([traffic],   [disable], [module], [system traffic statistics])
1125 AC_COLLECTD([users],     [disable], [module], [user count statistics])
1126 AC_COLLECTD([vserver],   [disable], [module], [vserver statistics])
1127 AC_COLLECTD([wireless],  [disable], [module], [wireless link statistics])
1128
1129 AC_OUTPUT(Makefile src/Makefile src/collectd.conf src/libconfig/Makefile src/liboping/Makefile)
1130
1131 cat <<EOF;
1132
1133 Configuration:
1134   Libraries:
1135     libcurl . . . . . . $with_libcurl
1136     libiokit  . . . . . $with_libiokit
1137     liboping  . . . . . $with_liboping
1138     librrd  . . . . . . $with_rrdtool
1139     lm_sensors  . . . . $with_lm_sensors
1140     libstatgrab . . . . $with_libstatgrab
1141     libkstat  . . . . . $with_kstat
1142     libmysql  . . . . . $with_libmysql
1143     libpcap . . . . . . $with_libpcap
1144     libiptc . . . . . . $with_libiptc
1145     libpthread  . . . . $with_libpthread
1146
1147   Features:
1148     debug . . . . . . . $enable_debug
1149     daemon mode . . . . $enable_daemon
1150     step  . . . . . . . $collectd_step seconds
1151     heartbeat . . . . . $collectd_heartbeat seconds
1152
1153   Modules:
1154     apache  . . . . . . $enable_apache
1155     apcups  . . . . . . $enable_apcups
1156     apple_sensors . . . $enable_apple_sensors
1157     battery . . . . . . $enable_battery
1158     cpu . . . . . . . . $enable_cpu
1159     cpufreq . . . . . . $enable_cpufreq
1160     df  . . . . . . . . $enable_df
1161     disk  . . . . . . . $enable_disk
1162     dns . . . . . . . . $enable_dns
1163     email . . . . . . . $enable_email
1164     hddtemp . . . . . . $enable_hddtemp
1165     irq . . . . . . . . $enable_irq
1166     iptables  . . . . . $enable_iptables
1167     load  . . . . . . . $enable_load
1168     mbmon . . . . . . . $enable_mbmon
1169     memory  . . . . . . $enable_memory
1170     multimeter  . . . . $enable_multimeter
1171     mysql . . . . . . . $enable_mysql
1172     nfs . . . . . . . . $enable_nfs
1173     ntpd  . . . . . . . $enable_ntpd
1174     ping  . . . . . . . $enable_ping
1175     processes . . . . . $enable_processes
1176     sensors . . . . . . $enable_sensors
1177     serial  . . . . . . $enable_serial
1178     swap  . . . . . . . $enable_swap
1179     tape  . . . . . . . $enable_tape
1180     traffic . . . . . . $enable_traffic
1181     users . . . . . . . $enable_users
1182     vserver . . . . . . $enable_vserver
1183     wireless  . . . . . $enable_wireless
1184
1185 EOF