+if BUILD_MODULE_APACHE
+pkglib_LTLIBRARIES += apache.la
+apache_la_SOURCES = apache.c
+apache_la_LDFLAGS = -module -avoid-version
+if BUILD_WITH_LIBCURL
+apache_la_LDFLAGS += $(BUILD_WITH_LIBCURL_LIBS)
+endif
+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
+