X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=configure.ac;h=ba40f03f9443def488fb922592c5ce9e97123da4;hb=75060af4927b7e412634756bb1ec952a25fab772;hp=b350c827cd30ad64b6b2d8483de40d5301788a87;hpb=e9de9629478f63b357b69314d7935c6539c3ad71;p=deb_libcec.git diff --git a/configure.ac b/configure.ac index b350c82..ba40f03 100644 --- a/configure.ac +++ b/configure.ac @@ -1,19 +1,31 @@ -AC_INIT([libcec], 0:8:0) +AC_INIT([libcec], 1:7:0) AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) AC_PROG_CXX AC_PROG_LIBTOOL +has_libudev="yes" case "${host}" in *-*-linux*) - AC_SEARCH_LIBS([udev_new], [udev],, AC_MSG_ERROR("required library 'udev' is missing")) - REQUIRES="udev" + 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 + INCLUDES="$INCLUDES $UDEV_CFLAGS";LIBS="$LIBS $UDEV_LIBS" + AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]) + REQUIRES="udev" +fi + AC_SEARCH_LIBS([pthread_create],[pthread],, AC_MSG_ERROR("required library 'pthread' is missing")) libs_pre_dl=$LIBS @@ -23,8 +35,8 @@ libs_pre_dl=$LIBS AC_SUBST([LIBS_DL]) LIBS=$libs_pre_dl -CXXFLAGS="-fPIC -Wall -Wextra $CXXFLAGS" +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])