dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 3.9.0)
+AC_INIT(collectd, 3.9.0-alpha1)
AC_CONFIG_SRCDIR(src/collectd.c)
AC_CONFIG_HEADERS(src/config.h)
AM_INIT_AUTOMAKE(dist-bzip2)
# For cpu modules
AC_CHECK_HEADERS(sys/sysctl.h sys/dkstat.h)
-AC_CHECK_HEADERS(mach/kern_return.h)
AC_CHECK_HEADERS(mach/mach_init.h)
-AC_CHECK_HEADERS(mach/mach_host.h)
AC_CHECK_HEADERS(mach/host_priv.h)
-AC_CHECK_HEADERS(mach/processor_info.h)
+AC_CHECK_HEADERS(mach/mach_error.h)
+AC_CHECK_HEADERS(mach/mach_host.h)
+AC_CHECK_HEADERS(mach/mach_port.h)
+AC_CHECK_HEADERS(mach/mach_types.h)
+AC_CHECK_HEADERS(mach/message.h)
+AC_CHECK_HEADERS(mach/processor_set.h)
AC_CHECK_HEADERS(mach/processor.h)
+AC_CHECK_HEADERS(mach/processor_info.h)
+AC_CHECK_HEADERS(mach/task.h)
+AC_CHECK_HEADERS(mach/thread_act.h)
+AC_CHECK_HEADERS(mach/vm_region.h)
+AC_CHECK_HEADERS(mach/vm_map.h)
+AC_CHECK_HEADERS(mach/vm_prot.h)
AC_CHECK_HEADERS(mach/vm_statistics.h)
+AC_CHECK_HEADERS(mach/kern_return.h)
+
+# For hddtemp module
+AC_CHECK_HEADERS(linux/major.h)
+
+# For the apple_sensors module
+AC_CHECK_HEADERS(CoreFoundation/CoreFoundation.h)
+AC_CHECK_HEADERS(IOKit/IOKitLib.h)
+AC_CHECK_HEADERS(IOKit/IOTypes.h)
+
+# For the battery plugin
+AC_CHECK_HEADERS(IOKit/ps/IOPowerSources.h, [], [],
+[
+#if HAVE_IOKIT_IOKITLIB_H
+# include <IOKit/IOKitLib.h>
+#endif
+#if HAVE_IOKIT_IOTYPES_H
+# include <IOKit/IOTypes.h>
+#endif
+])
+AC_CHECK_HEADERS(IOKit/ps/IOPSKeys.h)
# For load module
AC_CHECK_HEADERS(sys/loadavg.h)
AC_CHECK_HEADERS(utmp.h)
AC_CHECK_HEADERS(utmpx.h)
+# For traffic plugin
+AC_CHECK_HEADERS(ifaddrs.h)
+AC_CHECK_HEADERS(net/if.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+])
+AC_CHECK_HEADERS(linux/if.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+])
+AC_CHECK_HEADERS(linux/netdevice.h, [], [],
+[
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#if HAVE_LINUX_IF_H
+# include <linux/if.h>
+#endif
+])
+
# For apache plugin
AC_CHECK_HEADERS(curl/curl.h)
# For load module
AC_CHECK_FUNCS(getloadavg, [have_getloadavg="yes"], [have_getloadavg="no"])
+# For the `processes' plugin
+AC_CHECK_FUNCS(thread_info)
+
# For users module
AC_CHECK_FUNCS(getutent getutxent)
AC_CHECK_FUNCS(quotactl)
AC_CHECK_FUNCS(getgrgid getpwuid)
+# For traffic module
+AC_CHECK_FUNCS(getifaddrs)
+
# For mount interface
AC_CHECK_FUNCS(getfsent getvfsent listmntent)
AC_CHECK_FUNCS(getfsstat)
)
fi
+# Check for structures
+AC_CHECK_MEMBERS([struct if_data.ifi_ibytes, struct if_data.ifi_obytes],
+ [AC_DEFINE(HAVE_STRUCT_IF_DATA, 1, [Define if struct if_data exists and is usable.])],
+ [],
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <net/if.h>
+ ])
+AC_CHECK_MEMBERS([struct net_device_stats.rx_bytes, struct net_device_stats.tx_bytes],
+ [AC_DEFINE(HAVE_STRUCT_NET_DEVICE_STATS, 1, [Define if struct net_device_stats exists and is usable.])],
+ [],
+ [
+ #include <sys/types.h>
+ #include <sys/socket.h>
+ #include <linux/if.h>
+ #include <linux/netdevice.h>
+ ])
+
AC_MSG_CHECKING([for kernel type ($host_os)])
case $host_os in
*linux*)
- AC_DEFINE([KERNEL_LINUX], [], [True if program is to be compiled for a Linux kernel])
+ AC_DEFINE([KERNEL_LINUX], 1, [True if program is to be compiled for a Linux kernel])
ac_system="Linux"
;;
*solaris*)
- AC_DEFINE([KERNEL_SOLARIS], [], [True if program is to be compiled for a Solaris kernel])
+ AC_DEFINE([KERNEL_SOLARIS], 1, [True if program is to be compiled for a Solaris kernel])
ac_system="Solaris"
;;
*)
AM_CONDITIONAL(BUILD_WITH_LIBCURL, test "x$with_libcurl" = "xyes")
### END of check for libcurl ###
+with_libiokit="no"
+collectd_libiokit=0
+AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
+[
+ with_libiokit="yes"
+ collectd_libiokit=1
+],
+[
+ with_libiokit="no"
+ collectd_libiokit=0
+])
+AC_DEFINE_UNQUOTED(COLLECT_LIBIOKIT, [$collect_libiokit], [Wether or not to use the IOKit library])
+AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
+
AC_ARG_WITH(libstatgrab, [AS_HELP_STRING([--with-libstatgrab@<:@=PREFIX@:>@], [Path to libstatgrab.])],
[
if test "x$withval" != "xno" -a "x$withval" != "xyes"
m4_divert_once([HELP_ENABLE], [
collectd modules:])
AC_COLLECTD([apache], [disable], [module], [Apache httpd statistics])
+AC_COLLECTD([apple_sensors], [disable], [module], [Apple's hardware sensors])
AC_COLLECTD([battery], [disable], [module], [battery statistics])
AC_COLLECTD([cpu], [disable], [module], [cpu usage statistics])
AC_COLLECTD([cpufreq], [disable], [module], [system cpu frequency statistics])
Configuration:
Libraries:
libcurl . . . . . . $with_libcurl
+ libiokit . . . . . $with_libiokit
librrd . . . . . . $with_rrdtool
lm_sensors . . . . $with_lm_sensors
libstatgrab . . . . $with_libstatgrab
heartbeat . . . . . $collectd_heartbeat seconds
Modules:
+ apache . . . . . . $enable_apache
+ apple_sensors . . . $enable_apple_sensors
battery . . . . . . $enable_battery
cpu . . . . . . . . $enable_cpu
cpufreq . . . . . . $enable_cpufreq