aboutsummaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authordavilla <davilla@svn>2010-06-20 23:51:46 +0000
committerdavilla <davilla@svn>2010-06-20 23:51:46 +0000
commit0ac19e4318751fef642587d68e593cc49ac022fb (patch)
treec42fa7537b8006a669674f2e5412eab5453b86b1 /configure.in
parent5f259cad977e59dab369886e3d5852471f49048e (diff)
[chd] add new/old detection for libcrystalhd
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@31262 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure.in b/configure.in
index 85caa15da5..8d714b5908 100644
--- a/configure.in
+++ b/configure.in
@@ -898,8 +898,7 @@ fi
# CrystalHD
if test "x$use_crystalhd" != "xno"; then
- AC_CHECK_HEADER([libcrystalhd/libcrystalhd_if.h],AC_DEFINE([HAVE_LIBCRYSTALHD], [1],
- [Define to 1 if you have the 'Broadcom Crystal HD' library.]),
+ AC_CHECK_HEADER([libcrystalhd/libcrystalhd_if.h], [],
[ if test "x$use_crystalhd" = "xyes"; then
AC_MSG_ERROR($crystalhd_not_found)
else
@@ -907,6 +906,19 @@ if test "x$use_crystalhd" != "xno"; then
AC_MSG_RESULT($crystalhd_not_found)
fi],
[#define __LINUX_USER__])
+ # check for new crystalhd lib
+ if test "x$use_crystalhd" != "xno"; then
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="-llibcrystalhd"
+ AC_COMPILE_IFELSE(
+ [ #define __LINUX_USER__
+ #include <libcrystalhd/bc_dts_types.h>
+ #include <libcrystalhd/bc_dts_defs.h>
+ PBC_INFO_CRYSTAL bCrystalInfo;],
+ [ AC_DEFINE([HAVE_LIBCRYSTALHD], [2], [Define to 2 if you have the 'New Broadcom Crystal HD' library.]) ],
+ [ AC_DEFINE([HAVE_LIBCRYSTALHD], [1], [Define to 1 if you have the 'Old Broadcom Crystal HD' library.]) ])
+ CFLAGS="$SAVE_CFLAGS"
+ fi
else
AC_MSG_NOTICE($crystalhd_disabled)
fi