summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8f85126)
raw | patch | inline | side by side (parent: 8f85126)
author | Rainer Müller <raimue@codingfarm.de> | |
Sun, 10 Nov 2013 02:51:40 +0000 (03:51 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Wed, 13 Nov 2013 19:08:08 +0000 (20:08 +0100) |
The libIOKit.dylib symlink no longer exists in OS X 10.9 Mavericks, we
now have to link using -framework. This should also work in all previous
versions of OS X.
Signed-off-by: Florian Forster <octo@collectd.org>
now have to link using -framework. This should also work in all previous
versions of OS X.
Signed-off-by: Florian Forster <octo@collectd.org>
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.in b/configure.in
index 87a190765836ae05c426f674396c74dbc7fd1ef4..ff791d6cdfd1bd0780e200ac9a87b0dfcfa254eb 100644 (file)
--- a/configure.in
+++ b/configure.in
AM_CONDITIONAL(BUILD_WITH_LIBDEVINFO, test "x$with_devinfo" = "xyes")
with_libiokit="no"
-AC_CHECK_LIB(IOKit, IOServiceGetMatchingServices,
-[
+if test "x$ac_system" = "xDarwin"
+then
with_libiokit="yes"
-],
-[
+else
with_libiokit="no"
-])
+fi
AM_CONDITIONAL(BUILD_WITH_LIBIOKIT, test "x$with_libiokit" = "xyes")
with_libkvm="no"
diff --git a/src/Makefile.am b/src/Makefile.am
index 2bebec55c6d88ff320f94689c4eb795ead97a7cf..71abeca93a71f04bf2a4ca96eb5c22af51def8fa 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
pkglib_LTLIBRARIES += apple_sensors.la
apple_sensors_la_SOURCES = apple_sensors.c
apple_sensors_la_LDFLAGS = -module -avoid-version
-apple_sensors_la_LIBADD = -lIOKit
+apple_sensors_la_LDFLAGS += -framework IOKit
collectd_LDADD += "-dlopen" apple_sensors.la
collectd_DEPENDENCIES += apple_sensors.la
endif
battery_la_LDFLAGS = -module -avoid-version
battery_la_LIBADD =
if BUILD_WITH_LIBIOKIT
-battery_la_LIBADD += -lIOKit
+battery_la_LDFLAGS += -framework IOKit
endif
collectd_LDADD += "-dlopen" battery.la
collectd_DEPENDENCIES += battery.la
disk_la_LIBADD += -ldevinfo
endif
if BUILD_WITH_LIBIOKIT
-disk_la_LIBADD += -lIOKit
+disk_la_LDFLAGS += -framework IOKit
endif
if BUILD_WITH_LIBSTATGRAB
disk_la_CFLAGS += $(BUILD_WITH_LIBSTATGRAB_CFLAGS)