X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=configure.ac;h=510d851ccdac9d91d6bb6363944ff7e828ec39b4;hb=4f5046734389cc554448da5cee93970f3091348b;hp=acfe18b7123c5769c7cc98350f0594f096e927f5;hpb=cf34f9fd4c28854152a995bdc9243b8a7bb893a1;p=deb_libcec.git diff --git a/configure.ac b/configure.ac index acfe18b..510d851 100644 --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,5 @@ AC_PREREQ(2.59) -AC_INIT([libcec], [2:0:0], [http://libcec.pulse-eight.com/]) +AC_INIT([libcec], [2:1:0], [http://libcec.pulse-eight.com/]) AC_CONFIG_HEADERS([config.h]) AH_TOP([#pragma once]) @@ -23,7 +23,7 @@ msg_pthread_missing="required library 'pthread' is missing" msg_dl_missing="required library 'dl' is missing" msg_udev_missing="library 'udev' is missing - adapter detection will not be available" msg_dirent_missing="dirent.h header is missing - adapter detection will not be available" -msg_lockdev_missing="required library 'liblockdev' is missing" +msg_lockdev_missing="library 'liblockdev' is missing" msg_rpi_api_missing="Raspberry Pi API not found or incompatible with libCEC" msg_rpi_will_check="will check for RPi support" msg_rpi_unsupported_target="will not check for RPi support (unsupported cpu: ${host_cpu})" @@ -68,7 +68,7 @@ AC_ARG_ENABLE([rpi], AC_ARG_WITH([rpi-include-path], [AS_HELP_STRING([--with-rpi-include-path], [location of the Raspberry Pi headers (location of /opt/vc/include, default is auto)])], - [RPI_CFLAGS="-I$withval -I$withval/interface/vcos/pthreads"]) + [RPI_CFLAGS="-I$withval -I$withval/interface/vcos/pthreads -I$withval/interface/vmcs_host/linux"]) ## Optional path to libbcm_host.so AC_ARG_WITH([rpi-lib-path], @@ -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" @@ -129,6 +129,8 @@ libs_client="$LIBS" ## search for udev, lockdev and the RPi API, only required by libCEC use_udev="no" use_adapter_detection="yes" +use_lockdev="no" +SUPPRESS_MANGLING_WARNINGS=" -Wno-psabi" case "${host}" in *-*-linux*) ## search for udev if pkg-config was found @@ -146,8 +148,9 @@ case "${host}" in fi ## search for lockdev - AC_CHECK_HEADER(lockdev.h,,AC_MSG_ERROR($msg_lockdev_missing)) - AC_CHECK_LIB(lockdev,dev_unlock,,AC_MSG_ERROR($msg_lockdev_missing)) + use_lockdev="yes" + AC_CHECK_HEADER(lockdev.h,,[use_lockdev="no";AC_MSG_WARN($msg_lockdev_missing)]) + AC_CHECK_LIB(lockdev,dev_unlock,,[use_lockdev="no";AC_MSG_WARN($msg_lockdev_missing)]) AC_CHECK_HEADER(time.h,,AC_MSG_ERROR($msg_required_header_missing)) AC_CHECK_HEADER(sys/prctl.h,,AC_MSG_ERROR($msg_required_header_missing)) @@ -208,6 +211,7 @@ case "${host}" in AC_CHECK_HEADER(mach/mach_time.h,,AC_MSG_ERROR($msg_required_header_missing)) AC_CHECK_HEADER(CoreVideo/CVHostTime.h,,AC_MSG_ERROR($msg_required_header_missing)) AC_DEFINE([TARGET_DARWIN], [1], [Darwin target]) + SUPPRESS_MANGLING_WARNINGS="" ;; esac @@ -219,6 +223,10 @@ LIB_INFO="$LIB_INFO 'P8 USB'" AC_DEFINE([HAVE_P8_USB],[1],[Define to 1 to include support for the Pulse-Eight USB-CEC Adapter]) AM_CONDITIONAL(USE_P8_USB, true) +if test "x$use_lockdev" = "xyes"; then + AC_DEFINE([HAVE_LOCKDEV],[1],[Define to 1 if liblockdev is installed]) +fi + ## mark adapter detection as available if the required deps were found if test "x$use_adapter_detection" = "xyes"; then ## mark udev as available if it was found @@ -336,7 +344,7 @@ fi 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 $SUPPRESS_MANGLING_WARNINGS" if test "x$use_debug" = "xyes"; then CXXFLAGS="$CXXFLAGS -g"