X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=configure.ac;h=17947effcd1ec0423095507bd4366ca8eca862d0;hb=ee2304ce39c4a1249967913f61216e2a338bf08c;hp=e1468648632302caee8433777ca8e76c7c69710f;hpb=82b65f18fa44f1f9a673f10d917b2efdf087e565;p=deb_libcec.git diff --git a/configure.ac b/configure.ac index e146864..17947ef 100644 --- a/configure.ac +++ b/configure.ac @@ -1,19 +1,26 @@ -AC_INIT([libcec], 1:0:0) +AC_INIT([libcec], 1:4: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")]) ;; *-apple-darwin*) + has_libudev="no"; LIBS+="-framework CoreVideo -framework IOKit" ;; 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,7 +30,7 @@ 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])