aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorLars Op den Kamp <lars@opdenkamp.eu>2012-08-31 00:53:54 +0200
committergimli <ebsi4711@gmail.com>2012-09-04 23:00:55 +0200
commit2f7a3762c3ee32c1bd5a1bc2db53215f5f2ce6cc (patch)
tree236f9077d1ee69a4c90c5109bd49be5dba6dac44 /configure.in
parent63fb0c58d62286a6a19ce00aaf8ff62486466d58 (diff)
[rbp/cec] removed a whole bunch of sanity checks from configure.in for libCEC. libCEC already contains these checks for the Pi
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in66
1 files changed, 5 insertions, 61 deletions
diff --git a/configure.in b/configure.in
index 654c38c33c..39e4fe3ada 100644
--- a/configure.in
+++ b/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