summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cc26db4)
raw | patch | inline | side by side (parent: cc26db4)
author | Sebastian Harl <sh@tokkee.org> | |
Fri, 26 Mar 2010 12:11:50 +0000 (13:11 +0100) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Fri, 26 Mar 2010 12:11:50 +0000 (13:11 +0100) |
On, e.g., Solaris 2.6, nanosleep() is only available from that library.
Thanks to Vincent McIntyre for reporting this and providing an initial patch.
Thanks to Vincent McIntyre for reporting this and providing an initial patch.
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history |
diff --git a/configure.in b/configure.in
index f46a3624518a9ef95373bc9af4a66fa7c0156c5e..f8bf90cc69308cb85a2ff3a3594a298472becf26 100644 (file)
--- a/configure.in
+++ b/configure.in
@@ -528,8 +528,16 @@ AC_CHECK_FUNCS(socket, [], AC_CHECK_LIB(socket, socket, [socket_needs_socket="ye
AM_CONDITIONAL(BUILD_WITH_LIBSOCKET, test "x$socket_needs_socket" = "xyes")
nanosleep_needs_rt="no"
-AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
+nanosleep_needs_posix4="no"
+AC_CHECK_FUNCS(nanosleep,
+ [],
+ AC_CHECK_LIB(rt, nanosleep,
+ [nanosleep_needs_rt="yes"],
+ AC_CHECK_LIB(posix4, nanosleep,
+ [nanosleep_needs_posix4="yes"],
+ AC_MSG_ERROR(cannot find nanosleep))))
AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
+AM_CONDITIONAL(BUILD_WITH_LIBPOSIX4, test "x$nanosleep_needs_posix4" = "xyes")
AC_CHECK_FUNCS(sysctl, [have_sysctl="yes"], [have_sysctl="no"])
AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
diff --git a/src/Makefile.am b/src/Makefile.am
index 0ed299b5fa48d830eb92cad8e6ddd77c1eed5bed..f533b12cea1744c4c09d5491e61b92027efe96bc 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
if BUILD_WITH_LIBRT
collectd_LDADD += -lrt
endif
+if BUILD_WITH_LIBPOSIX4
+collectd_LDADD += -lposix4
+endif
if BUILD_WITH_LIBSOCKET
collectd_LDADD += -lsocket
endif