Link the `disk' plugin against `IOKitLib' when available..
[collectd.git] / configure.in
index 5b62025..f2573a3 100644 (file)
@@ -1,5 +1,5 @@
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(collectd, 3.9.0-alpha1)
+AC_INIT(collectd, 3.9.0)
 AC_CONFIG_SRCDIR(src/collectd.c)
 AC_CONFIG_HEADERS(src/config.h)
 AM_INIT_AUTOMAKE(dist-bzip2)
@@ -157,11 +157,27 @@ AC_CHECK_HEADERS(mach/kern_return.h)
 # For hddtemp module
 AC_CHECK_HEADERS(linux/major.h)
 
-# For the iokit module
+# 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 the `disk' plugin
+AC_CHECK_HEADERS(IOKit/IOBSD.h)
+AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDriver.h)
+
 # For load module
 AC_CHECK_HEADERS(sys/loadavg.h)
 
@@ -789,6 +805,7 @@ AC_COLLECTD([daemon],    [disable], [feature], [daemon mode])
 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])
@@ -796,7 +813,6 @@ AC_COLLECTD([disk],      [disable], [module], [disk/partition statistics])
 AC_COLLECTD([df],        [disable], [module], [df statistics])
 AC_COLLECTD([quota],     [enable],  [module], [quota statistics (experimental)])
 AC_COLLECTD([hddtemp],   [disable], [module], [hdd temperature statistics])
-AC_COLLECTD([iokit],     [disable], [module], [Apple's iokit hardware sensors])
 AC_COLLECTD([load],      [disable], [module], [system load statistics])
 AC_COLLECTD([memory],    [disable], [module], [memory statistics])
 AC_COLLECTD([mysql],     [disable], [module], [mysql statistics])
@@ -1049,13 +1065,14 @@ Configuration:
     heartbeat . . . . . $collectd_heartbeat seconds
 
   Modules:
+    apache  . . . . . . $enable_apache
+    apple_sensors . . . $enable_apple_sensors
     battery . . . . . . $enable_battery
     cpu . . . . . . . . $enable_cpu
     cpufreq . . . . . . $enable_cpufreq
     df  . . . . . . . . $enable_df
     disk  . . . . . . . $enable_disk
     hddtemp . . . . . . $enable_hddtemp
-    iokit . . . . . . . $enable_iokit
     load  . . . . . . . $enable_load
     memory  . . . . . . $enable_memory
     mysql . . . . . . . $enable_mysql