search for clock_gettime instead of blindly linking rt
[deb_libcec.git] / 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"