search for clock_gettime instead of blindly linking rt
[deb_libcec.git] / configure.ac
index 45d969b7aba2e56e259b53fc90cf468312d9f434..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"
@@ -332,11 +332,11 @@ if test "x$HAVE_UNAME" = "xyes"; then
   LIB_INFO="$LIB_INFO on `uname -s` `uname -r` (`uname -m`)"
 fi
 
-## redefine the LIBS, so cec-client and cec-config aren't linked against things they don't need
+## redefine the LIBS, so cec-client isn't linked against things they don't need
 LIBS_LIBCEC="$LIBS"
 LIBS="$libs_client"
 
-CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra -Werror -Wno-missing-field-initializers"
+CXXFLAGS="$CXXFLAGS -fPIC -Wall -Wextra -Wno-missing-field-initializers"
 
 if test "x$use_debug" = "xyes"; then
   CXXFLAGS="$CXXFLAGS -g"
@@ -357,7 +357,7 @@ AC_SUBST([USE_P8_USB])
 AC_SUBST([USE_P8_USB_DETECT])
 AC_SUBST([USE_RPI_API])
 AC_CONFIG_FILES([src/lib/libcec.pc])
-AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile src/cec-config/Makefile])
+AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile])
 
 cat <<EOB