diff options
author | davilla <davilla@4pi.com> | 2011-10-13 14:53:01 -0400 |
---|---|---|
committer | davilla <davilla@4pi.com> | 2011-10-13 17:44:51 -0400 |
commit | 3a0c3c037de6d02eec47611e5213be815783bfb8 (patch) | |
tree | 9ebbf7ef6efefe31943315f3eea08104d4e61736 /configure.in | |
parent | 86683ca0c0ea6808022222b83897ee2b4fb35c55 (diff) |
changed libcec to be dyloaded like others, also change lib/libcec/Makefile to be pure convenence make and remove the internal/external bits, libcec is a system lib. treat it that way.
Diffstat (limited to 'configure.in')
-rwxr-xr-x | configure.in | 75 |
1 files changed, 23 insertions, 52 deletions
diff --git a/configure.in b/configure.in index 1fb7939335..6a274cf1f1 100755 --- a/configure.in +++ b/configure.in @@ -123,10 +123,8 @@ libudev_not_found="== Could not find libudev. Will use polling to check for devi libudev_disabled="== udev support disabled. Will use polling to check for device changes. ==" libusb_not_found="== Could not find libusb. Plug and play USB device support will not be available. ==" libusb_disabled="== libusb disabled. Plug and play USB device support will not be available. ==" -libcec_enabled="== libCEC enabled. ==" -libcec_disabled="== libCEC disabled. CEC adapter support will not be available. ==" -libcec_internal="== Using internal libCEC. ==" -libcec_external_missing="== libCEC was not found on your system. ==" +libcec_enabled="== libcec enabled. ==" +libcec_disabled="== libcec disabled. CEC adapter support will not be available. ==" # External library message strings external_libraries_enabled="== Use of all supported external libraries enabled. ==" @@ -400,9 +398,9 @@ AC_ARG_ENABLE([libusb], AC_ARG_ENABLE([libcec], [AS_HELP_STRING([--enable-libcec], - [enable libcec support (default is no)])], + [enable libcec support (default is auto)])], [use_libcec=$enableval], - [use_libcec=no]) + [use_libcec=auto]) ### External libraries options AC_ARG_ENABLE([external-libraries], @@ -411,12 +409,6 @@ AC_ARG_ENABLE([external-libraries], [use_external_libraries=$enableval], [use_external_libraries=no]) -AC_ARG_ENABLE([external-libcec], - [AS_HELP_STRING([--enable-external-libcec], - [external libcec support (default is no) 'Linux only'])], - [use_external_libcec=$enableval], - [use_external_libcec=no]) - AC_ARG_ENABLE([external-ffmpeg], [AS_HELP_STRING([--enable-external-ffmpeg], [enable use of external ffmpeg libraries (default is no) 'Linux only'])], @@ -1101,12 +1093,12 @@ USE_LIBUDEV=0 else if test "$use_libudev" = "auto"; then PKG_CHECK_MODULES([UDEV], [libudev], - use_libudev="yes"; use_libusb="no"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \ + use_libudev="yes"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \ AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]), AC_MSG_RESULT($libudev_not_found)) elif test "$use_libudev" = "yes" ; then PKG_CHECK_MODULES([UDEV], [libudev], - use_libudev="yes"; use_libusb="no"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \ + use_libudev="yes"; USE_LIBUDEV=1; [INCLUDES="$INCLUDES $UDEV_CFLAGS"; LIBS="$LIBS $UDEV_LIBS"]; \ AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]), AC_MSG_ERROR($libudev_not_found)) use_libudev="no" @@ -1116,7 +1108,7 @@ fi # libusb USE_LIBUSB=0 -if test "$use_libudev" != "yes"; then +if test "x$use_libusb" != "xno"; then if test "$host_vendor" = "apple" ; then use_libusb="no" AC_MSG_NOTICE($libusb_disabled) @@ -1141,9 +1133,18 @@ fi # libcec USE_LIBCEC=0 -if test "$use_libcec" = "yes"; then - USE_LIBCEC=1; AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libCEC is installed"]) - AC_MSG_NOTICE($libcec_enabled) +if test "x$use_libcec" != "xno" && test "x$use_libusb" != "xno"; then + PKG_CHECK_MODULES([CEC], [libcec], + [INCLUDES="$INCLUDES $CEC_CFLAGS"; LIBS="$LIBS $CEC_LIBS"], + use_libcec=no; AC_MSG_NOTICE($libcec_disabled)) + if test "x$use_libcec" != "xno"; then + if test "x$use_libudev" != "xno"; then + USE_LIBUSB=0; use_libusb=no; + fi + USE_LIBCEC=1; AC_DEFINE([HAVE_LIBCEC],[1],["Define to 1 if libCEC is installed"]) + XB_FIND_SONAME([LIBCEC], [cec], [use_libcec]) + AC_MSG_NOTICE($libcec_enabled) + fi else use_libcec="no" AC_MSG_NOTICE($libcec_disabled) @@ -1151,19 +1152,6 @@ fi ### External libraries checks -# external libcec -USE_EXTERNAL_LIBCEC=0 -if test "$use_libcec" = "yes"; then - if test "$use_external_libcec" = "yes"; then - USE_EXTERNAL_LIBCEC=1; PKG_CHECK_MODULES([CEC], [libcec], - [INCLUDES="$INCLUDES $CEC_CFLAGS"; LIBS="$LIBS $CEC_LIBS"], - AC_MSG_ERROR($libcec_external_missing)) - else - [INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/lib/libcec/include"] - AC_MSG_NOTICE($libcec_internal) - fi -fi - # External FFmpeg if test "$use_external_ffmpeg" = "yes"; then FFMPEG_LIBNAMES="libavcodec libavfilter libavformat libavutil libpostproc libswscale" @@ -1798,18 +1786,13 @@ else final_message="$final_message\n libusb support:\tNo" fi -if test "$use_libcec" = "yes"; then - final_message="$final_message\n libCEC support:\tYes" +if test "x$use_libcec" != "xno"; then + final_message="$final_message\n libcec support:\tYes" else - final_message="$final_message\n libCEC support:\tNo" + final_message="$final_message\n libcec support:\tNo" fi ### External libraries messages -if test "$use_external_libcec" = "yes"; then - final_message="$final_message\n External libCEC:\tYes" -else - final_message="$final_message\n External libCEC:\tNo" -fi if test "$use_external_ffmpeg" = "yes"; then final_message="$final_message\n External FFmpeg:\tYes" @@ -1876,8 +1859,7 @@ OUTPUT_FILES="Makefile \ tools/TexturePacker/Makefile \ tools/EventClients/Clients/OSXRemote/Makefile \ xbmc/peripherals/bus/Makefile \ - xbmc/peripherals/devices/Makefile \ - lib/libcec/Makefile" + xbmc/peripherals/devices/Makefile" if test "$use_skin_touched" = "yes"; then OUTPUT_FILES+=" addons/skin.touched/media/Makefile" @@ -1937,7 +1919,6 @@ AC_SUBST(USE_AIRTUNES) AC_SUBST(USE_LIBUDEV) AC_SUBST(USE_LIBUSB) AC_SUBST(USE_LIBCEC) -AC_SUBST(USE_EXTERNAL_LIBCEC) # pushd and popd are not available in other shells besides bash, so implement @@ -2207,16 +2188,6 @@ XB_CONFIG_MODULE([lib/cpluff], [ #LDFLAGS="$LDFLAGS -Wl,-read_only_relocs,suppress" ], [0]) -XB_CONFIG_MODULE([lib/libcec], [ - if test "$use_libcec" = "yes" && test "$use_external_libcec" = "no" ; then - cd libcec ; ./configure \ - --prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \ - --host=$host_alias \ - --build=$build_alias \ - --target=$target_alias CFLAGS="$CFLAGS" CC="$CC" CXX="$CXX" - fi -], [0]) - AC_OUTPUT final_message="$final_message\n prefix:\t$prefix\n$dashes" |