Check for `nanosleep'. If not found, look for `librt'. Abort if `nanosleep' is missing.
[collectd.git] / src / Makefile.am
index c13e950..e3cf843 100644 (file)
@@ -32,6 +32,9 @@ collectd_LDFLAGS = -export-dynamic
 if BUILD_WITH_RRDTOOL
 collectd_LDFLAGS += -lm -lrrd
 endif
+if BUILD_WITH_LIBRT
+collectd_LDFLAGS += -lrt
+endif
 if BUILD_WITH_LIBSOCKET
 collectd_LDFLAGS += -lsocket
 endif
@@ -55,10 +58,24 @@ collectd_LDADD += "-dlopen" apache.la
 collectd_DEPENDENCIES += apache.la
 endif
 
+if BUILD_MODULE_APPLE_SENSORS
+pkglib_LTLIBRARIES += apple_sensors.la
+apple_sensors_la_SOURCES = apple_sensors.c
+apple_sensors_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBIOKIT
+apple_sensors_la_LDFLAGS += -lIOKit
+endif
+collectd_LDADD += "-dlopen" apple_sensors.la
+collectd_DEPENDENCIES += apple_sensors.la
+endif
+
 if BUILD_MODULE_BATTERY
 pkglib_LTLIBRARIES += battery.la
 battery_la_SOURCES = battery.c
 battery_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBIOKIT
+battery_la_LDFLAGS += -lIOKit
+endif
 collectd_LDADD += "-dlopen" battery.la
 collectd_DEPENDENCIES += battery.la
 endif
@@ -91,6 +108,9 @@ if BUILD_MODULE_DISK
 pkglib_LTLIBRARIES += disk.la
 disk_la_SOURCES = disk.c
 disk_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBIOKIT
+disk_la_LDFLAGS += -lIOKit
+endif
 collectd_LDADD += "-dlopen" disk.la
 collectd_DEPENDENCIES += disk.la
 endif
@@ -114,17 +134,6 @@ collectd_LDADD += "-dlopen" hddtemp.la
 collectd_DEPENDENCIES += hddtemp.la
 endif
 
-if BUILD_MODULE_IOKIT
-pkglib_LTLIBRARIES += iokit.la
-iokit_la_SOURCES = iokit.c
-iokit_la_LDFLAGS = -module -avoid-version
-if BUILD_WITH_LIBIOKIT
-iokit_la_LDFLAGS += -lIOKit
-endif
-collectd_LDADD += "-dlopen" iokit.la
-collectd_DEPENDENCIES += iokit.la
-endif
-
 if BUILD_MODULE_LOAD
 pkglib_LTLIBRARIES += load.la
 load_la_SOURCES = load.c