search for clock_gettime instead of blindly linking rt
authorLars Op den Kamp <lars@opdenkamp.eu>
Thu, 6 Dec 2012 22:49:17 +0000 (23:49 +0100)
committerLars Op den Kamp <lars@opdenkamp.eu>
Thu, 6 Dec 2012 22:49:17 +0000 (23:49 +0100)
configure.ac

index c7b7b1b44c46ad33ae0079a2a4970d20f7d3c8d4..9512a1eb8877ca7a5b4f8ae11ed4268bf1c11c74 100644 (file)
@@ -116,7 +116,7 @@ AC_CHECK_FUNCS([dlopen dlclose dlsym])
 case "${host}" in
   *-*-linux*)
     # for timeutils
-    LIBS="$LIBS -lrt"
+    AC_SEARCH_LIBS([clock_gettime], [rt])
     ;;
   *-apple-darwin*)
     LIBS="$LIBS -framework CoreVideo -framework IOKit"