Fix linking on OpenBSD
authorPavel Labath <pavelo@centrum.sk>
Tue, 8 Dec 2009 19:53:03 +0000 (20:53 +0100)
committerPavel Labath <pavelo@centrum.sk>
Tue, 8 Dec 2009 20:03:14 +0000 (21:03 +0100)
OpenBSD doesn't need librt for clock_gettime, but configure was adding it to LIBS unconditionally.
Bug reported by dovim.

configure.ac.in

index 23c7723..6e12868 100644 (file)
@@ -782,7 +782,7 @@ dnl Some functions
 dnl
 
 AC_CHECK_FUNCS([calloc malloc free popen sysinfo getloadavg memrchr strndup gethostbyname_r])
-AC_SEARCH_LIBS(clock_gettime, [rt], conky_LIBS="$conky_LIBS -lrt"
+AC_SEARCH_LIBS(clock_gettime, [rt], conky_LIBS="$conky_LIBS $LIBS"
                [AC_DEFINE(HAVE_CLOCK_GETTIME, 1, [Define if you have clock_gettime()])],
                [AC_CHECK_FUNCS([gettimeofday], [], [AC_MSG_ERROR([gettimeofday() not available!])])], [])