Merge remote branch 'libcec-public/master'
[deb_libcec.git] / configure.ac
index 17947effcd1ec0423095507bd4366ca8eca862d0..b8d6031a1871832ede4f21f90b1c06b3acff8e62 100644 (file)
@@ -1,4 +1,4 @@
-AC_INIT([libcec], 1:4:0)
+AC_INIT([libcec], 1:6:0)
 AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
 
 AC_PROG_CXX
@@ -7,12 +7,17 @@ AC_PROG_LIBTOOL
 has_libudev="yes"
 case "${host}" in
   *-*-linux*)
-    PKG_CHECK_MODULES([UDEV],[libudev],,[has_libudev="no";AC_MSG_WARN("library 'udev' is missing - adapter detection will not be available")])
+    PKG_CHECK_MODULES([UDEV],[libudev],,[has_libudev="no"]; AC_MSG_WARN("library 'udev' is missing - adapter detection will not be available"))
+    AC_CHECK_HEADER(lockdev.h,, AC_MSG_ERROR("required library 'liblockdev' is missing"))
+    LIBS+=" -lrt -llockdev"
     ;;
   *-apple-darwin*)
     has_libudev="no";
     LIBS+="-framework CoreVideo -framework IOKit"
     ;;
+  *-freebsd*)
+    has_libudev="no"
+    ;;
 esac
 
 if test "x$has_libudev" != "xno"; then
@@ -34,4 +39,4 @@ CXXFLAGS="-fPIC -Wall -Wextra -Wno-missing-field-initializers $CXXFLAGS"
 
 AC_SUBST(REQUIRES)
 AC_CONFIG_FILES([src/lib/libcec.pc])
-AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile])
+AC_OUTPUT([Makefile src/lib/Makefile src/testclient/Makefile src/cec-config/Makefile])