diff options
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 107 |
1 files changed, 98 insertions, 9 deletions
diff --git a/configure.in b/configure.in index 4c4b1252d1..41d3633ee8 100644 --- a/configure.in +++ b/configure.in @@ -154,7 +154,8 @@ libusb_disabled="== libusb disabled. Plug and play USB device support will not b libusb_disabled_udev_found="== libusb disabled. ==" libcec_enabled="== libcec enabled. ==" libcec_disabled="== libcec disabled. CEC adapter support will not be available. ==" -libcec_disabled_missing_libs="== libcec disabled because both libudev and libusb are not available. CEC adapter support will not be available. ==" +libcec_disabled_missing_libs="== libcec disabled because it either needs libudev, or libusb a compatible version of the RPi API. CEC adapter support will not be available. ==" +cec_rpi_api_missing="== no compatible RPi API found ==" # External library message strings external_libraries_enabled="== Use of all supported external libraries enabled. ==" @@ -184,6 +185,12 @@ AC_ARG_WITH([arch], [use_arch=$withval], [use_arch=no]) +AC_ARG_WITH([platform], + [AS_HELP_STRING([--with-platform], + [use a pre-configured config for common arm boards])], + [use_platform=$withval], + [use_platform=none]) + AC_ARG_WITH([cpu], [AS_HELP_STRING([--with-cpu], [build with given cpu passing to ffmpeg (default is no)])], @@ -475,7 +482,7 @@ AC_ARG_ENABLE([libcap], AC_ARG_ENABLE([player], [AS_HELP_STRING([--enable-player], - [enable additional players from a list of comma separated names, (default is none, choices are amlplayer)])], + [enable additional players from a list of comma separated names, (default is none, choices are amlplayer, omxplayer)])], [add_players=$enableval], [add_players=no]) @@ -639,11 +646,37 @@ if test "$target_platform" = "target_android" ; then AC_DEFINE(HAS_EGLGLES, [1], [Define if supporting EGL based GLES Framebuffer]) fi +case $use_platform in + raspberry-pi) + target_platform=target_raspberry_pi + use_neon=no + use_texturepacker=yes + use_texturepacker_native=yes + use_arch="arm" + use_cpu=arm1176jzf-s + use_armv5te="yes" + use_armv6t2="no" + use_armv6="yes" + use_armvfp="yes" + use_hardcoded_tables="yes" + use_alsa="no" + USE_TEXTUREPACKER_NATIVE_ROOT="$TEXTUREPACKER_NATIVE_ROOT" + ARCH="arm" + AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_LINUX -D_LINUX -D_ARMEL -DTARGET_RASPBERRY_PI") + AC_DEFINE(HAS_EGLGLES, [1], [Define if supporting EGL based GLES Framebuffer]) + USE_OMXLIB=1; AC_DEFINE([HAVE_OMXLIB],[1],["Define to 1 if OMX libs is enabled"]) + CFLAGS="$CFLAGS" + CXXFLAGS="$CXXFLAGS" + ffmpeg_target_os=linux + ;; +esac + if test "$build_shared_lib" = "yes"; then final_message="$final_message\n Shared lib\tYes" AC_SUBST(USE_LIBXBMC,1) fi + # platform debug flags if test "$use_debug" = "yes"; then final_message="$final_message\n Debugging:\tYes" @@ -670,8 +703,13 @@ CXXFLAGS="$CXXFLAGS $DEBUG_FLAGS" if test "$use_optimizations" = "yes"; then final_message="$final_message\n Optimization:\tYes" - CXXFLAGS="$CXXFLAGS -O2" - CFLAGS="$CFLAGS -O2" + if test "$target_platform" = "target_raspberry_pi"; then + CXXFLAGS="$CXXFLAGS" + CFLAGS="$CFLAGS" + else + CXXFLAGS="$CXXFLAGS -O2" + CFLAGS="$CFLAGS -O2" + fi else final_message="$final_message\n Optimization:\tNo" fi @@ -703,6 +741,9 @@ if test "$host_vendor" = "apple" ; then LIBS="$LIBS -framework QuartzCore" fi USE_EXTERNAL_FFMPEG=1 +elif test "$target_platform" = "target_raspberry_pi"; then + ARCH="arm" + use_arch="arm" elif test "$use_arch" = "arm"; then CFLAGS="$CFLAGS -mno-apcs-stack-check" CXXFLAGS="$CXXFLAGS -mno-apcs-stack-check" @@ -792,8 +833,15 @@ if test "$use_gles" = "yes"; then AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."]) AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.) else - AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library)) - AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library)) + if test "$target_platform" = "target_raspberry_pi"; then + AC_DEFINE([HAVE_LIBEGL],[1],["Define to 1 if you have the `EGL' library (-lEGL)."]) + AC_DEFINE([HAVE_LIBGLESV2],[1],["Define to 1 if you have the `GLESv2' library (-lGLESv2)."]) + AC_MSG_RESULT(== WARNING: OpenGLES support is assumed.) + LIBS="$LIBS -lEGL -lGLESv2 -lbcm_host -lvcos -lvchiq_arm" + else + AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library)) + AC_CHECK_LIB([GLESv2],[main],, AC_MSG_ERROR($missing_library)) + fi fi else if test "$use_gl" = "yes"; then @@ -1353,9 +1401,22 @@ fi # libcec USE_LIBCEC=0 +USE_CEC_RPI_API=0 +use_rpi_cec_api="auto" if test "x$use_libcec" != "xno"; then - # libcec needs libudev or libusb under linux, or the device will never be detected. - if test "$host_vendor" != "apple" && test "$use_libusb" = "no" && test "$use_libudev" = "no"; 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})" + use_rpi_cec_api="no" + ;; + esac + + # 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 AC_MSG_ERROR($libcec_disabled_missing_libs) else @@ -1366,11 +1427,20 @@ 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 - PKG_CHECK_MODULES([CEC],[libcec >= 1.7.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)]) + if test "x$use_libcec" != "xauto"; then + PKG_CHECK_MODULES([CEC],[libcec >= 1.8.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)]) + else + 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 XB_FIND_SONAME([LIBCEC],[cec],[use_libcec]) AC_MSG_NOTICE($libcec_enabled) else @@ -1629,6 +1699,10 @@ if test "$host_vendor" = "apple" ; then use_openmax="no" USE_OPENMAX=0 AC_MSG_NOTICE($openmax_disabled) +elif test "$target_platform" = "target_raspberry_pi"; then + use_openmax="no" + USE_OPENMAX=0 + AC_MSG_NOTICE($openmax_disabled) else if test "$use_gles" = "yes" && test "$use_openmax" = "auto"; then PKG_CHECK_MODULES([OPENMAX], [libomxil-bellagio], @@ -1656,6 +1730,9 @@ case $add_players in AC_CHECK_HEADER([amlplayer/amports/amstream.h],, AC_MSG_ERROR($missing_headers)) XB_ADD_PLAYER([AMLPLAYER], [amlplayer]) ;; + *omxplayer*) + XB_ADD_PLAYER([OMXPLAYER], [omxplayer]) + ;; esac # platform specific bin utilities @@ -2055,6 +2132,11 @@ fi if test "x$use_libcec" != "xno"; then final_message="$final_message\n libcec support:\tYes" + if test "x$use_rpi_cec_api" != "xno"; then + final_message="$final_message\n libcec RPi support:\tYes" + else + final_message="$final_message\n libcec RPi support:\tNo" + fi else final_message="$final_message\n libcec support:\tNo" fi @@ -2125,6 +2207,7 @@ OUTPUT_FILES="Makefile \ xbmc/cores/AudioEngine/Makefile \ xbmc/cores/paplayer/Makefile \ xbmc/cores/amlplayer/Makefile \ + xbmc/cores/omxplayer/Makefile \ lib/timidity/Makefile \ lib/xbadpcm/Makefile \ lib/asap/Makefile \ @@ -2233,6 +2316,7 @@ AC_SUBST(USE_AIRTUNES) AC_SUBST(USE_LIBUDEV) AC_SUBST(USE_LIBUSB) AC_SUBST(USE_LIBCEC) +AC_SUBST(USE_CEC_RPI_API) AC_SUBST(USE_MYSQL) AC_SUBST(USE_WEB_SERVER) AC_SUBST(USE_ANDROID) @@ -2373,6 +2457,10 @@ XB_CONFIG_MODULE([lib/ffmpeg], [ `if test "$use_arch" != "no"; then echo --arch=$use_arch; fi`\ `if test "$use_cpu" != "no"; then echo --cpu=$use_cpu; fi`\ `if test "$use_neon" = "yes"; then echo --enable-neon; else echo --disable-neon; fi`\ + `if test "$use_armv5te" = "yes"; then echo --enable-armv5te; else echo --disable-armv5te; fi`\ + `if test "$use_armv6t2" = "yes"; then echo --enable-armv6t2; else echo --disable-armv6t2; fi`\ + `if test "$use_armv6" = "yes"; then echo --enable-armv6; else echo --disable-armv6; fi`\ + `if test "$use_armvfp" = "yes"; then echo --enable-armvfp; else echo --disable-armvfp; fi`\ --target-os=$ffmpeg_target_os \ --disable-muxers \ --enable-muxer=spdif \ @@ -2398,6 +2486,7 @@ XB_CONFIG_MODULE([lib/ffmpeg], [ --enable-protocol=http \ --enable-pthreads \ --enable-runtime-cpudetect \ + `if test "$use_hardcoded_tables" = "yes"; then echo --enable-hardcoded-tables; else echo --disable-hardcoded-tables; fi`\ `if test "$target_platform" = "target_android" && test "$host_cpu" = "i686"; then echo --disable-mmx; fi #workaround for gcc 4.6 bug` \ `if test "$target_platform" = "target_android"; then echo "--custom-libname-with-major=\\$(SLIBPREF)\\$(FULLNAME)-\\$(LIBMAJOR)-${ARCH}\\$(SLIBSUF)"; \ else echo "--custom-libname-with-major=\\$(FULLNAME)-\\$(LIBMAJOR)-${ARCH}\\$(SLIBSUF)"; fi` \ |