Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[rbp/cec] removed a whole bunch of sanity checks from configure.in fo…

…r libCEC. libCEC already contains these checks for the Pi
  • Loading branch information...
commit 2f7a3762c3ee32c1bd5a1bc2db53215f5f2ce6cc 1 parent 63fb0c5
@opdenkamp opdenkamp authored committed
Showing with 5 additions and 61 deletions.
  1. +5 −61 configure.in
View
66 configure.in
@@ -462,12 +462,6 @@ AC_ARG_ENABLE([libcec],
[use_libcec=$enableval],
[use_libcec=auto])
-AC_ARG_ENABLE([rpi-cec-api],
- [AS_HELP_STRING([--enable-rpi-cec-api],
- [enable support for the Raspberry Pi (default is auto)])],
- [use_rpi_cec_api=$enableval],
- [use_rpi_cec_api=auto])
-
AC_ARG_ENABLE([libmp3lame],
[AS_HELP_STRING([--enable-libmp3lame],
[enable lame mp3 encoder support (default is auto)])],
@@ -1406,10 +1400,12 @@ fi
# libcec
USE_LIBCEC=0
USE_CEC_RPI_API=0
+use_rpi_cec_api="auto"
if test "x$use_libcec" != "xno"; then
case "${host_cpu}" in
arm*)
echo "will check for RPi support"
+ AC_CHECK_HEADER(interface/vmcs_host/vc_cec.h,,use_rpi_cec_api="no")
;;
*)
echo "will not check for RPi support (unsupported cpu: ${host_cpu})"
@@ -1417,51 +1413,6 @@ if test "x$use_libcec" != "xno"; then
;;
esac
- if test "x$use_rpi_cec_api" != "xno"; then
- if test "x$use_rpi_cec_api" = "xyes"; then
- AC_CHECK_HEADER(interface/vmcs_host/vc_cec.h,,
- AC_MSG_ERROR($cec_rpi_api_missing))
- else
- AC_CHECK_HEADER(interface/vmcs_host/vc_cec.h,,
- use_rpi_cec_api="no")
- fi
-
- if test "x$use_rpi_cec_api" != "xno"; then
- # check if the headers contain support for libCEC
- AC_MSG_CHECKING([interface/vmcs_host/vc_cec.h compatibility])
-
- check_rpi_cec_service="yes"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <interface/vmcs_host/vc_cecservice.h>
-#include <interface/vchiq_arm/vchiq_if.h>
-#if !defined(VC_CECSERVICE_VER)
-#error RPi headers doesn't contain libCEC support
-#endif]], [[]])],[AC_MSG_RESULT([yes])],[check_rpi_cec_service="no"; AC_MSG_RESULT([no])])
-
- if test "x$check_rpi_cec_service" != "xyes" && test "x$use_rpi_cec_api" = "xyes"; then
- AC_MSG_ERROR($cec_rpi_api_missing)
- fi
-
- if test "x$check_rpi_cec_service" != "xyes"; then
- use_rpi_cec_api="no"
- fi
- fi
-
- if test "x$use_rpi_cec_api" != "xno"; then
- # check for vc_cec_poll_address, to ensure that we got the correct version of bcm_host that supports libCEC
- if test "x$use_rpi_cec_api" = "xyes"; then
- AC_CHECK_LIB(bcm_host,vc_cec_poll_address,,
- AC_MSG_ERROR($cec_rpi_api_missing),-lvcos -lvchiq_arm)
- else
- AC_CHECK_LIB(bcm_host,vc_cec_poll_address,,
- use_rpi_cec_api="no",-lvcos -lvchiq_arm)
- fi
- fi
-
- if test "x$use_rpi_cec_api" != "xno"; then
- LIBS+=" -lvcos -lvchiq_arm"
- fi
- fi
-
# libcec needs libudev, libusb or the RPi API under linux, or the device will never be detected.
if test "$host_vendor" != "apple" && test "$use_libusb" = "no" && test "$use_libudev" = "no" && test "$use_rpi_cec_api" = "no"; then
if test "x$use_libcec" != "xauto"; then
@@ -1475,23 +1426,16 @@ if test "x$use_libcec" != "xno"; then
# libcec is dyloaded, so we need to check for its headers and link any depends.
if test "x$use_libcec" != "xno"; then
if test "x$use_libcec" != "xauto"; then
- if test "x$use_rpi_cec_api" != "xno"; then
- PKG_CHECK_MODULES([CEC],[libcec >= 1.8.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)])
- else
- PKG_CHECK_MODULES([CEC],[libcec >= 1.7.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)])
- fi
+ PKG_CHECK_MODULES([CEC],[libcec >= 1.8.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)])
else
- if test "x$use_rpi_cec_api" != "xno"; then
- PKG_CHECK_MODULES([CEC],[libcec >= 1.8.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
- else
- PKG_CHECK_MODULES([CEC],[libcec >= 1.7.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
- fi
+ PKG_CHECK_MODULES([CEC],[libcec >= 1.8.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
fi
if test "x$use_libcec" != "xno"; then
INCLUDES="$INCLUDES $CEC_CFLAGS"
USE_LIBCEC=1;AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libcec is installed"])
if test "x$use_rpi_cec_api" != "xno"; then
+ LIBS+=" -lvcos -lvchiq_arm"
AC_DEFINE([HAVE_CEC_RPI_API],[1],["Define to 1 if the CEC RPi API is installed"])
USE_CEC_RPI_API=1
fi
Please sign in to comment.
Something went wrong with that request. Please try again.