diff options
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 203 |
1 files changed, 85 insertions, 118 deletions
diff --git a/configure.ac b/configure.ac index d72791b094..96be96fc68 100644 --- a/configure.ac +++ b/configure.ac @@ -64,10 +64,10 @@ AC_DEFUN([XB_FIND_SONAME], fi elif [[ "$host_vendor" != "apple" ]]; then AC_MSG_CHECKING([for lib$2 soname]) - $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS $4 -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}') + $1_FILENAME=$($CC -nostdlib -o /dev/null $CFLAGS $LDFLAGS $4 -l$2 -Wl,-M 2>/dev/null | grep "^LOAD.*$2" | awk '{V=2; print $V}') if [[ -z $$1_FILENAME ]]; then #try gold linker syntax - $1_FILENAME=$($CC -nostdlib -o /dev/null $LDFLAGS $4 -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "lib$2") + $1_FILENAME=$($CC -nostdlib -o /dev/null $CFLAGS $LDFLAGS $4 -l$2 -Wl,-t 3>&1 1>&2 2>&3 | grep "lib$2") fi if [[ ! -z $$1_FILENAME ]]; then $1_SONAME=$($OBJDUMP -p $$1_FILENAME | grep "SONAME.*$2" | awk '{V=2; print $V}') @@ -119,6 +119,7 @@ AC_DEFUN([XB_PUSH_FLAGS], [ # version can be overridden by setting the following as ENV vars when running configure APP_NAME=${APP_NAME-$(${AWK} '/APP_NAME/ {print $2}' version.txt)} APP_NAME_LC=$(echo $APP_NAME | ${AWK} '{print tolower($0)}') +APP_NAME_UC=$(echo $APP_NAME | ${AWK} '{print toupper($0)}') APP_VERSION_MAJOR=${APP_VERSION_MAJOR-$(${AWK} '/VERSION_MAJOR/ {print $2}' version.txt)} APP_VERSION_MINOR=${APP_VERSION_MINOR-$(${AWK} '/VERSION_MINOR/ {print $2}' version.txt)} APP_VERSION_TAG=${APP_VERSION_TAG-$(${AWK} '/VERSION_TAG/ {print $2}' version.txt)} @@ -134,6 +135,7 @@ if test "$APP_NAME" != "" && test "$APP_VERSION_MAJOR" != "" && test "$APP_VERSI AC_SUBST(APP_NAME) AC_SUBST(APP_NAME_LC) + AC_SUBST(APP_NAME_UC) AC_SUBST(APP_VERSION) AC_SUBST(APP_VERSION_MAJOR) AC_SUBST(APP_VERSION_MINOR) @@ -168,8 +170,6 @@ configure_debug="ERROR: this is a configure debug statement" missing_library="Could not find a required library. Please see the README for your platform." missing_headers="Could not find some required headers. Please see the README for your platform." missing_program="Could not find a required program. Please see the README for your platform." -xrandr_not_found="== Could not find libXRandR. SDL will be used for resolution support. ==" -xrandr_disabled="== XRandR support disabled. SDL will be used for resolution support. ==" waveform_enabled="== WAVEFORM enabled ==" waveform_disabled="== WAVEFORM disabled ==" spectrum_enabled="== SPECTRUM enabled ==" @@ -316,12 +316,6 @@ AC_ARG_ENABLE([joystick], [use_joystick=$enableval], [use_joystick=auto]) -AC_ARG_ENABLE([xrandr], - [AS_HELP_STRING([--enable-xrandr], - [enable XRandR support (default is yes)])], - [use_xrandr=$enableval], - [use_xrandr=yes]) - AC_ARG_ENABLE([waveform], [AS_HELP_STRING([--enable-waveform], [enable Waveform visualisation (default is yes)])], @@ -725,12 +719,16 @@ case $host in esac AC_SUBST([ARCH]) -check_sdl_arch=[`file $NATIVE_ROOT/lib/libSDL_image.dylib | awk '{print $NF}'`] -if test "x$check_sdl_arch" = "xi386" ; then - DARWIN_NATIVE_ARCH=-m32 -elif test "x$check_sdl_arch" = "xx86_64" ; then - DARWIN_NATIVE_ARCH=-m64 -fi +case $host in + *-apple-darwin*) + check_sdl_arch=[`file $NATIVE_ROOT/lib/libSDL_image.dylib | awk '{print $NF}'`] + if test "x$check_sdl_arch" = "xi386" ; then + DARWIN_NATIVE_ARCH=-m32 + elif test "x$check_sdl_arch" = "xx86_64" ; then + DARWIN_NATIVE_ARCH=-m64 + fi + ;; +esac AC_SUBST([DARWIN_NATIVE_ARCH]) if test "$target_platform" = "target_android" ; then @@ -749,6 +747,7 @@ case $use_platform in use_arch="arm" use_cpu=arm1176jzf-s use_hardcoded_tables="yes" + use_openmax=no ARCH="arm" 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"]) @@ -758,6 +757,17 @@ case $use_platform in ;; esac +if test "$host_vendor" = "apple"; then + use_avahi=no + use_alsa=no + use_openmax=no + use_goom=no + use_libudev=no + use_libusb=no + use_x11=no + use_wayland=no +fi + XBMC_SETUP_ARCH_DEFINES() # detect soname version @@ -958,7 +968,8 @@ AC_LANG_POP([C++]) # Python if test -z "$PYTHON_NOVERSIONCHECK"; then - AX_PYTHON_DEVEL([>= 2.4]) + AX_PYTHON_DEVEL([>= '2.6']) + AX_PYTHON_DEVEL([< '3.0']) PYTHON_VERSION=$ac_python_version fi @@ -970,7 +981,7 @@ else fi # Wayland -if test "$use_wayland" = "yes" && test "$host_vendor" != "apple"; then +if test "$use_wayland" = "yes"; then AC_MSG_NOTICE($wayland_enabled) PKG_CHECK_MODULES([WAYLAND_CLIENT], [wayland-client], [INCLUDES="$INCLUDES $WAYLAND_CLIENT_CFLAGS"; @@ -1313,7 +1324,7 @@ if test "$use_optical_drive" = "yes"; then fi # Alsa -if test "$use_alsa" = "yes" && test "$host_vendor" != "apple"; then +if test "$use_alsa" = "yes"; then PKG_CHECK_MODULES([ALSA], [alsa], [INCLUDES="$INCLUDES $ALSA_CFLAGS"; LIBS="$LIBS $ALSA_LIBS"], AC_MSG_ERROR($missing_library)) @@ -1354,21 +1365,16 @@ else fi # avahi -if test "$host_vendor" = "apple" ; then - use_avahi="no" - AC_MSG_RESULT($avahi_disabled) -else +if test "$use_avahi" = "yes"; then + AC_CHECK_LIB([avahi-common], [main],, + use_avahi=no;AC_MSG_RESULT($avahi_not_found)) if test "$use_avahi" = "yes"; then - AC_CHECK_LIB([avahi-common], [main],, + #either both libs or none + AC_CHECK_LIB([avahi-client], [main],, use_avahi=no;AC_MSG_RESULT($avahi_not_found)) - if test "$use_avahi" = "yes"; then - #either both libs or none - AC_CHECK_LIB([avahi-client], [main],, - use_avahi=no;AC_MSG_RESULT($avahi_not_found)) - fi - else - AC_MSG_RESULT($avahi_disabled) fi +else + AC_MSG_RESULT($avahi_disabled) fi # mdnsembedded @@ -1393,7 +1399,7 @@ fi AC_SUBST(USE_MDNSEMBEDDED) # X11 -if test "$use_x11" = "yes" && test "$host_vendor" != "apple"; then +if test "$use_x11" = "yes"; then AC_MSG_NOTICE($x11_enabled) PKG_CHECK_MODULES([X11], [x11], [INCLUDES="$INCLUDES $X11_CFLAGS"; LIBS="$LIBS $X11_LIBS"], @@ -1401,6 +1407,9 @@ if test "$use_x11" = "yes" && test "$host_vendor" != "apple"; then PKG_CHECK_MODULES([XEXT], [xext], [INCLUDES="$INCLUDES $XEXT_CFLAGS"; LIBS="$LIBS $XEXT_LIBS"], AC_MSG_ERROR($missing_library)) + PKG_CHECK_MODULES([XRANDR], [xrandr], + [INCLUDES="$INCLUDES $XRANDR_CFLAGS"; LIBS="$LIBS $XRANDR_LIBS"], + AC_MSG_ERROR($missing_library)) PKG_CHECK_MODULES([DRM], [libdrm], [INCLUDES="$INCLUDES $DRM_CFLAGS"; LIBS="$LIBS $DRM_LIBS"], AC_MSG_ERROR($missing_library)) @@ -1409,19 +1418,6 @@ else AC_MSG_RESULT($x11_disabled) fi -# XRandR -if test "$host_vendor" = "apple" || test "$use_x11" = "no"; then - use_xrandr="no" - AC_MSG_RESULT($xrandr_disabled) -else - if test "$use_xrandr" = "yes" ; then - AC_CHECK_LIB([Xrandr], [main],, - use_xrandr="no";AC_MSG_RESULT($xrandr_not_found)) - else - AC_MSG_RESULT($xrandr_disabled) - fi -fi - # WAVEFORM if test "$use_waveform" = "yes"; then AC_MSG_NOTICE($waveform_enabled) @@ -1441,17 +1437,12 @@ else fi # GOOM -if test "$host_vendor" = "apple" ; then +if test "$use_goom" = "yes" && test "$use_gl" = "yes"; then + AC_MSG_NOTICE($goom_enabled) + DISABLE_GOOM=0 +else AC_MSG_NOTICE($goom_disabled) DISABLE_GOOM=1 -else - if test "$use_goom" = "yes" && test "$use_gl" = "yes"; then - AC_MSG_NOTICE($goom_enabled) - DISABLE_GOOM=0 - else - AC_MSG_NOTICE($goom_disabled) - DISABLE_GOOM=1 - fi fi # RSXS @@ -1617,22 +1608,17 @@ fi # libudev USE_LIBUDEV=0 -if test "$host_vendor" = "apple" ; then - use_libudev="no" - AC_MSG_NOTICE($libudev_disabled) +if test "$use_libudev" = "auto"; then + PKG_CHECK_MODULES([UDEV],[libudev],,[use_libudev="no";AC_MSG_RESULT($libudev_not_found)]) +elif test "$use_libudev" = "yes" ; then + PKG_CHECK_MODULES([UDEV],[libudev],,[use_libudev="no";AC_MSG_ERROR($libudev_not_found)]) else - if test "$use_libudev" = "auto"; then - PKG_CHECK_MODULES([UDEV],[libudev],,[use_libudev="no";AC_MSG_RESULT($libudev_not_found)]) - elif test "$use_libudev" = "yes" ; then - PKG_CHECK_MODULES([UDEV],[libudev],,[use_libudev="no";AC_MSG_ERROR($libudev_not_found)]) - else - AC_MSG_NOTICE($libudev_disabled) - fi + AC_MSG_NOTICE($libudev_disabled) +fi - if test "x$use_libudev" != "xno"; then - USE_LIBUDEV=1;INCLUDES="$INCLUDES $UDEV_CFLAGS";LIBS="$LIBS $UDEV_LIBS" - AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]) - fi +if test "x$use_libudev" != "xno"; then + USE_LIBUDEV=1;INCLUDES="$INCLUDES $UDEV_CFLAGS";LIBS="$LIBS $UDEV_LIBS" + AC_DEFINE([HAVE_LIBUDEV],[1],["Define to 1 if libudev is installed"]) fi # libusb @@ -1643,26 +1629,21 @@ if test "x$use_libudev" != "xno"; then use_libusb="no" AC_MSG_NOTICE($libusb_disabled_udev_found) else - if test "$host_vendor" = "apple" ; then - use_libusb="no" - AC_MSG_NOTICE($libusb_disabled) - else - if echo "$ARCH" | grep -q freebsd ; then - AC_CHECK_LIB([usb],[main], + if echo "$ARCH" | grep -q freebsd ; then + AC_CHECK_LIB([usb],[main], [use_libusb="yes";USB_LIBS="-lusb"], [use_libusb="no";AC_MSG_RESULT($libusb_not_found)]) - elif test "$use_libusb" = "auto"; then - PKG_CHECK_MODULES([USB],[libusb],,[use_libusb="no";AC_MSG_RESULT($libusb_not_found)]) - elif test "$use_libusb" = "yes"; then - PKG_CHECK_MODULES([USB],[libusb],,[use_libusb="no";AC_MSG_ERROR($libusb_not_found)]) - else - AC_MSG_NOTICE($libusb_disabled) - fi - - if test "x$use_libusb" != "xno"; then - USE_LIBUSB=1;INCLUDES="$INCLUDES $USB_CFLAGS";LIBS="$LIBS $USB_LIBS" - AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"]) - fi + elif test "$use_libusb" = "auto"; then + PKG_CHECK_MODULES([USB],[libusb],,[use_libusb="no";AC_MSG_RESULT($libusb_not_found)]) + elif test "$use_libusb" = "yes"; then + PKG_CHECK_MODULES([USB],[libusb],,[use_libusb="no";AC_MSG_ERROR($libusb_not_found)]) + else + AC_MSG_NOTICE($libusb_disabled) + fi + + if test "x$use_libusb" != "xno"; then + USE_LIBUSB=1;INCLUDES="$INCLUDES $USB_CFLAGS";LIBS="$LIBS $USB_LIBS" + AC_DEFINE([HAVE_LIBUSB],[1],["Define to 1 if libusb is installed"]) fi fi @@ -1925,29 +1906,19 @@ else fi # OpenMax -if test "$host_vendor" = "apple" ; then - use_openmax="no" - USE_OPENMAX=0 +if test "$use_gles" = "yes" && test "$use_openmax" = "auto"; then + + AC_CHECK_HEADERS([OMX_Core.h], + USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS";AC_DEFINE([HAVE_LIBOPENMAX], [1], [Define to 1 if you have the OpenMax library.])], + use_openmax=no;USE_OPENMAX=0;AC_MSG_RESULT($openmax_not_found)) +elif test "$use_gles" = "yes" && test "$use_openmax" = "yes"; then + AC_CHECK_HEADERS([OMX_Core.h], + USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS";AC_DEFINE([HAVE_LIBOPENMAX], [1], [Define to 1 if you have the OpenMax library.])], + AC_MSG_ERROR($openmax_not_found)) +else AC_MSG_NOTICE($openmax_disabled) -elif test "$target_platform" = "target_raspberry_pi"; then - use_openmax="no" + use_openmax=no USE_OPENMAX=0 - AC_MSG_NOTICE($openmax_disabled) -else - if test "$use_gles" = "yes" && test "$use_openmax" = "auto"; then - - AC_CHECK_HEADERS([OMX_Core.h], - USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS";AC_DEFINE([HAVE_LIBOPENMAX], [1], [Define to 1 if you have the OpenMax library.])], - use_openmax=no;USE_OPENMAX=0;AC_MSG_RESULT($openmax_not_found)) - elif test "$use_gles" = "yes" && test "$use_openmax" = "yes"; then - AC_CHECK_HEADERS([OMX_Core.h], - USE_OPENMAX=1;[INCLUDES="$INCLUDES $OPENMAX_CFLAGS"; LIBS="$LIBS $OPENMAX_LIBS";AC_DEFINE([HAVE_LIBOPENMAX], [1], [Define to 1 if you have the OpenMax library.])], - AC_MSG_ERROR($openmax_not_found)) - else - AC_MSG_NOTICE($openmax_disabled) - use_openmax=no - USE_OPENMAX=0 - fi fi # additional internal players @@ -2135,14 +2106,6 @@ else final_message="$final_message\n Joystick:\tNo" fi -if test "$use_xrandr" = "yes"; then - final_message="$final_message\n XRandR:\tYes" - USE_XRANDR=1 -else - final_message="$final_message\n XRandR:\tNo" - USE_XRANDR=0 -fi - if test "$use_waveform" = "yes"; then final_message="$final_message\n Waveform:\tYes" else @@ -2567,6 +2530,7 @@ OUTPUT_FILES="Makefile \ tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCBroadcastReceiver.java \ tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCOnFrameAvailableListener.java \ tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCSettingsContentObserver.java \ + tools/android/packaging/xbmc/src/org/xbmc/kodi/XBMCOnAudioFocusChangeListener.java \ tools/android/packaging/xbmc/strings.xml \ addons/xbmc.addon/addon.xml" @@ -2599,8 +2563,12 @@ if echo "$libdir" | grep -q '${exec_prefix}'; then exec_prefix=${prefix} fi fi -eval "APP_LIBDIR=${libdir}" -AC_SUBST(APP_LIBDIR) +eval "APP_PREFIX=${prefix}" +eval "APP_LIB_DIR=${libdir}/${APP_NAME_LC}" +eval "APP_INCLUDE_DIR=${includedir}/${APP_NAME_LC}" +AC_SUBST(APP_PREFIX) +AC_SUBST(APP_LIB_DIR) +AC_SUBST(APP_INCLUDE_DIR) # Line below is used so we can use AM_INIT_AUTOMAKE. The corresponding # .dummy.am does nothing. @@ -2653,7 +2621,6 @@ AC_SUBST(USE_AIRPLAY) AC_SUBST(USE_OPENMAX) AC_SUBST(USE_PULSE) AC_SUBST(HAVE_LIBPULSE) -AC_SUBST(USE_XRANDR) AC_SUBST(USE_ALSA) AC_SUBST(USE_TEXTUREPACKER) AC_SUBST(TEXTUREPACKER) |