Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
2060 lines (1875 sloc) 74.1 KB
-*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
AC_INIT(boxee, 0.9, http://www.boxee.tv/)
AC_CONFIG_HEADERS([config.h])
AH_TOP([#pragma once])
AC_LANG(C++)
# check for library basenames
AC_DEFUN([XB_FIND_SONAME],
[
AC_MSG_CHECKING([for lib$2 soname])
$1_SONAME=$( $CC -print-file-name=$4 | \
while read output; do objdump -p $output | \
grep "SONAME" | \
sed -e 's/ \+SONAME \+//'; done 2> /dev/null )
if [[ -z "$$1_SONAME" ]]; then
AC_MSG_RESULT([no])
if test -z "$3" || test "x${$3}" = "xyes"; then
AC_MSG_ERROR([Unable to determine soname of lib$2 library])
else
AC_MSG_WARN([Unable to determine soname of lib$2 library])
$3=no
AC_MSG_WARN([lib$2 support disabled])
fi
else
AC_MSG_RESULT([$$1_SONAME])
AC_SUBST($1_SONAME)
fi
])
# Ensure config.guess and config.sub exist and is executable
# Also install latest version of these files if available
AC_MSG_NOTICE([Ensuring config.guess and config.sub exist and is executable])
test -f config.guess && chmod a+x config.guess
if [[ -x /usr/share/misc/config.guess ]] && \
[[ $($PWD/config.guess -t | sed 's/-//g') -lt \
$(/usr/share/misc/config.guess -t | sed 's/-//g') ]]; then
cp -f /usr/share/misc/config.guess config.guess
fi
test -f config.sub && chmod a+x config.sub
if [[ -x /usr/share/misc/config.sub ]] && \
[[ $($PWD/config.sub -t | sed 's/-//g') -lt \
$(/usr/share/misc/config.sub -t | sed 's/-//g') ]]; then
cp -f /usr/share/misc/config.sub config.sub
fi
AC_CANONICAL_HOST
# General message strings
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. =="
goom_enabled="== GOOM enabled. =="
goom_disabled="== GOOM disabled. =="
pulse_not_found="== Could not find libpulse. PulseAudio support disabled. =="
pulse_disabled="== PulseAudio support manually disabled. =="
faac_not_found="== Could not find libfaac. FAAC support disabled. =="
faac_disabled="== FAAC support manually disabled. =="
avahi_not_found="== Could not find libavahi-common or libavahi-client. Avahi support disabled. =="
avahi_disabled="== Avahi support disabled. =="
vdpau_not_found="== Could not find libvdpau. VDPAU support disabled. =="
vdpau_disabled="== VDPAU support manually disabled. =="
# External library message strings
external_libraries_enabled="== Use of all supported external libraries enabled. =="
external_libraries_disabled="== Use of all supported external libraries disabled. =="
external_ffmpeg_enabled="== Use of external ffmpeg enabled. =="
external_ffmpeg_disabled="== Use of external ffmpeg disabled. =="
external_liba52_enabled="== Use of external liba52 enabled. =="
external_liba52_disabled="== Use of external liba52 disabled. =="
external_libdts_enabled="== Use of external libdts enabled. =="
external_libdts_disabled="== Use of external libdts disabled. =="
external_libmpeg2_enabled="== Use of external libmpeg2 enabled. =="
external_libmpeg2_disabled="== Use of external libmpeg2 disabled. =="
external_libass_enabled="== Use of external libass enabled. =="
external_libass_disabled="== Use of external libass disabled. =="
external_libogg_enabled="== Use of external libogg enabled. =="
external_libogg_disabled="== Use of external libogg disabled. =="
external_libwavpack_enabled="== Use of external libwavpack enabled. =="
external_libwavpack_disabled="== Use of external libwavpack disabled. =="
external_python_enabled="== Use of external python enabled. =="
external_python_disabled="== Use of external python disabled. =="
ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. =="
case $host in
i686-cm-linux*)
AC_SUBST(ARCH_DEFINES, "-DCANMORE")
ARCH="i686-linux"
PLATFORM="intelce-linux"
;;
i*86*-linux-gnu*)
ARCH="i486-linux"
PLATFORM="x86-linux"
PLATFORM="linux32pc"
;;
x86_64-*-linux-gnu*)
ARCH="x86_64-linux"
PLATFORM="x86_64-linux"
;;
i386-apple-darwin*)
ARCH="x86-osx"
PLATFORM="x86-osx"
OSX_GCC="gcc-4.0"
OSX_CXX="g++-4.0"
AC_SUBST(ARCH_DEFINES, "-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk")
AC_SUBST(OSX,"10.4")
AC_SUBST(OSX_LDFLAGS,"-arch i386")
OSX_FLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
# export kernelflags (i386/x86_64) (OS X > 10.6.1)
AC_SUBST([HOSTTYPE])
;;
x86_64-apple-darwin*)
ARCH="x86-osx"
PLATFORM="x86-osx"
OSX_GCC="gcc"
OSX_CXX="g++"
OSX="10.5"
ARCH_BITS=64
CFLAGS="$CFLAGS -m$ARCH_BITS"
CXXFLAGS="$CXXFLAGS -m$ARCH_BITS"
LDFLAGS="$LDFLAGS -m$ARCH_BITS"
OSX_FLAGS=""
AC_SUBST(ARCH_DEFINES, "-m$ARCH_BITS")
AC_SUBST(OSX,"10.5")
if test "$ARCH_BITS" = "32" ; then
AC_SUBST(OSX_LDFLAGS,"-arch i386")
else
AC_SUBST(OSX_LDFLAGS,"-arch x86_64")
fi
# export kernelflags (i386/x86_64) (OS X > 10.6.1)
AC_SUBST([HOSTTYPE])
;;
powerpc-apple-darwin*)
ARCH="powerpc-osx"
PLATFORM="powerpc-osx"
OSX_GCC="gcc-4.0"
OSX_CXX="g++-4.0"
AC_SUBST(ARCH_DEFINES, "-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk")
OSX_FLAGS="-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk"
AC_SUBST(OSX,"10.4")
AC_SUBST(OSX_LDFLAGS,"-arch i386")
;;
powerpc-*-linux-gnu*)
ARCH="powerpc-linux"
PLATFORM="powerpc-linux"
AC_SUBST(ARCH_DEFINES, "-D_POWERPC")
;;
powerpc64-*-linux-gnu*)
ARCH="powerpc64-linux"
PLATFORM="powerpc64-linux"
AC_SUBST(ARCH_DEFINES, "-D_POWERPC64")
;;
arm-*-linux*)
ARCH="arm-none-linux"
if test "$target_platform" != "tegra2-nvidia" ; then
AC_SUBST(ARCH_DEFINES, "-D_ARM")
PLATFORM="arm-linux"
else
AC_SUBST(ARCH_DEFINES, "-D_ARM -DEMPOWER")
PLATFORM="tegra2-linux"
fi
;;
*)
AC_MSG_ERROR(unsupported host ($host))
esac
AC_SUBST([ARCH])
AC_SUBST([PLATFORM])
if test "$target_platform" != "" ; then
cross_compiling=yes
fi
AC_ARG_ENABLE([debug],
[AS_HELP_STRING([--enable-debug],
[enable debugging information (default is yes)])],
[use_debug=$enableval],
[use_debug=yes])
AC_ARG_ENABLE([optimizations],
[AS_HELP_STRING([--enable-optimizations],
[enable optimization (default is yes)])],
[use_optimizations=$enableval],
[use_optimizations=yes])
AC_ARG_ENABLE([gl],
[AS_HELP_STRING([--enable-gl],
[enable OpenGL rendering (default is yes)])],
[use_gl=$enableval],
[use_gl=yes])
AC_ARG_ENABLE([vdpau],
[AS_HELP_STRING([--enable-vdpau],
[enable VDPAU decoding (default is yes)])],
[use_vdpau=$enableval],
[use_vdpau=yes])
AC_ARG_ENABLE([profiling],
[AS_HELP_STRING([--enable-profiling],
[enable gprof profiling (default is no)])],
[use_profiling=$enableval],
[use_profiling=no])
AC_ARG_ENABLE([joystick],
[AS_HELP_STRING([--enable-joystick],
[enable SDL joystick support (default is yes)])],
[use_joystick=$enableval],
[use_joystick=yes])
AC_ARG_ENABLE([xrandr],
[AS_HELP_STRING([--enable-xrandr],
[enable XRandR support (default is no)])],
[use_xrandr=$enableval],
[use_xrandr=no])
AC_ARG_ENABLE([vis-goom],
[AS_HELP_STRING([--enable-vis-goom],
[enable GOOM visualisation (default is no)])],
[BUILD_GOOM=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_GOOM=0])
AC_PATH_PROG(CCACHE,ccache,none)
AC_ARG_ENABLE([ccache],
[AS_HELP_STRING([--enable-ccache],
[enable building with ccache feature (default is yes if ccache is installed)])],
[use_ccache=$enableval],
[use_ccache=yes])
AC_ARG_ENABLE([pulse],
[AS_HELP_STRING([--enable-pulse],
[enable PulseAudio support (default is no)])],
[use_pulse=$enableval],
[use_pulse=no])
AC_ARG_ENABLE([faac],
[AS_HELP_STRING([--enable-faac],
[enable FAAC support (default is no)])],
[use_faac=$enableval],
[use_faac=no])
AC_ARG_ENABLE([mid],
[AS_HELP_STRING([--enable-mid],
[enable MID support (default is no)])],
[use_mid=$enableval],
[use_mid=no])
AC_ARG_ENABLE([avahi],
[AS_HELP_STRING([--disable-avahi],
[disable Avahi support (default is enabled if libavahi-common and libavahi-client is found)])],
[use_avahi=$enableval],
[use_avahi=yes])
AC_ARG_ENABLE([libbluray],
[AS_HELP_STRING([--enable-libbluray],
[enable libbluray support])],
[use_libbluray=$enableval],
[use_libbluray=auto])
### External libraries options
AC_ARG_ENABLE([external-libraries],
[AS_HELP_STRING([--enable-external-libraries],
[enable use of all supported external libraries (default is no) 'Linux only'])],
[use_external_libraries=$enableval],
[use_external_libraries=no])
AC_ARG_ENABLE([external-ffmpeg],
[AS_HELP_STRING([--enable-external-ffmpeg],
[enable use of external ffmpeg libraries (default is no) 'Linux only'])],
[use_external_ffmpeg=$enableval],
[use_external_ffmpeg=no])
AC_ARG_ENABLE([external-liba52],
[AS_HELP_STRING([--enable-external-liba52],
[enable use of external liba52 library (default is no) 'Linux only'])],
[use_external_liba52=$enableval],
[use_external_liba52=no])
AC_ARG_ENABLE([external-libdts],
[AS_HELP_STRING([--enable-external-libdts],
[enable use of external libdts library (default is no) 'Linux only'])],
[use_external_libdts=$enableval],
[use_external_libdts=no])
AC_ARG_ENABLE([external-libmpeg2],
[AS_HELP_STRING([--enable-external-libmpeg2],
[enable use of external libmpeg2 library (default is no) 'Linux only'])],
[use_external_libmpeg2=$enableval],
[use_external_libmpeg2=no])
AC_ARG_ENABLE([external-libass],
[AS_HELP_STRING([--enable-external-libass],
[enable use of external libass library (default is no) 'Linux only'])],
[use_external_libass=$enableval],
[use_external_libass=no])
AC_ARG_ENABLE([external-libogg],
[AS_HELP_STRING([--enable-external-libogg],
[enable use of external libogg library (default is no) 'Linux only'])],
[use_external_libogg=$enableval],
[use_external_libogg=no])
AC_ARG_ENABLE([external-libwavpack],
[AS_HELP_STRING([--enable-external-libwavpack],
[enable use of external libwavpack library (default is no) 'Linux only'])],
[use_external_libwavpack=$enableval],
[use_external_libwavpack=no])
AC_ARG_ENABLE([external-python],
[AS_HELP_STRING([--enable-external-python],
[enable use of external python library (default is no) 'Linux only'])],
[use_external_python=$enableval],
[use_external_python=no])
AC_ARG_ENABLE([x11],
[AS_HELP_STRING([--enable-x11],
[enable use of x11 (default is no, meaning OpenKode) 'Tegra2 only'])],
[use_x11=$enableval],
[use_x11=no])
AC_ARG_ENABLE([boxee-hal],
[AS_HELP_STRING([--enable-boxee-hal],
[enable use of Boxee service to manage hardware (default is no)])],
[use_boxee_hal=$enableval],
[use_boxee_hal=no])
AC_ARG_ENABLE([opkg],
[AS_HELP_STRING([--enable-opkg],
[build opkg lib (default is no)])],
[BUILD_OPKG=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_OPKG=0])
AC_ARG_ENABLE([mysqlclient],
[AS_HELP_STRING([--enable-mysqlclient],
[enable use of mysql client (default is yes) ])],
[use_mysqlclient=$enableval],
[use_mysqlclient=yes])
AC_ARG_ENABLE([fontconfig],
[AS_HELP_STRING([--enable-fontconfig],
[enable use of fontconfig (default is yes) ])],
[use_fontconfig=$enableval],
[use_fontconfig=yes])
AC_ARG_ENABLE([dvd-drive],
[AS_HELP_STRING([--enable-dvd-drive],
[enable use of dvd drive (default is yes) ])],
[use_dvd_drive=$enableval],
[use_dvd_drive=yes])
AC_ARG_ENABLE([pap-ape],
[AS_HELP_STRING([--enable-pap-ape],
[compile pap ape format (default is yes) ])],
[BUILD_PAP_APE=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_APE=1])
AC_ARG_ENABLE([pap-wavpack],
[AS_HELP_STRING([--enable-pap-wavpack],
[compile pap wavpack format (default is yes) ])],
[BUILD_PAP_WAVPACK=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_WAVPACK=1])
AC_ARG_ENABLE([pap-sid],
[AS_HELP_STRING([--enable-pap-sid],
[compile pap sid format (default is yes) ])],
[BUILD_PAP_SID=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_SID=1])
AC_ARG_ENABLE([pap-nsf],
[AS_HELP_STRING([--enable-pap-nsf],
[compile pap nsf format (default is yes) ])],
[BUILD_PAP_NSF=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_NSF=1])
AC_ARG_ENABLE([pap-vgmstream],
[AS_HELP_STRING([--enable-pap-vgmstream],
[compile pap vgmstream format (default is yes) ])],
[BUILD_PAP_VGMSTREAM=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_VGMSTREAM=1])
AC_ARG_ENABLE([pap-ym],
[AS_HELP_STRING([--enable-pap-ym],
[compile pap ym format (default is yes) ])],
[BUILD_PAP_YM=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_YM=1])
AC_ARG_ENABLE([pap-timidity],
[AS_HELP_STRING([--enable-pap-timidity],
[compile pap timidity format (default is yes) ])],
[BUILD_PAP_TIMIDITY=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_TIMIDITY=1])
AC_ARG_ENABLE([pap-gym],
[AS_HELP_STRING([--enable-pap-gym],
[compile pap gym format (default is yes) ])],
[BUILD_PAP_GYM=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_GYM=1])
AC_ARG_ENABLE([pap-spc],
[AS_HELP_STRING([--enable-pap-spc],
[compile pap spc format (default is yes) ])],
[BUILD_PAP_SPC=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_SPC=1])
AC_ARG_ENABLE([pap-adpcm],
[AS_HELP_STRING([--enable-pap-adpcm],
[compile pap adpcm format (default is yes) ])],
[BUILD_PAP_ADPCM=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PAP_ADPCM=1])
AC_ARG_ENABLE([ss-rsxs],
[AS_HELP_STRING([--enable-ss-rsxs],
[compile rsxs screen saver (default is yes) ])],
[BUILD_RSXS=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_RSXS=1])
AC_ARG_ENABLE([vis-projectm],
[AS_HELP_STRING([--enable-vis-projectm],
[enable ProjectM visualisation (default is yes)])],
[BUILD_PROJECTM=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_PROJECTM=1])
AC_ARG_ENABLE([vis-spectrum],
[AS_HELP_STRING([--enable-vis-spectrum],
[enable spectrum visualisation (default is yes)])],
[BUILD_SPECTRUM=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[BUILD_SPECTRUM=1])
AC_ARG_ENABLE([dvd-liba52],
[AS_HELP_STRING([--enable-dvd-liba52],
[dvd support for a52 audio format (default is yes)])],
[SUPPORT_DVD_LIBA52=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[SUPPORT_DVD_LIBA52=1])
AC_ARG_ENABLE([dvd-libdts],
[AS_HELP_STRING([--enable-dvd-libdts],
[dvd support for dts audio format (default is yes)])],
[SUPPORT_DVD_LIBDTS=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[SUPPORT_DVD_LIBDTS=1])
AC_ARG_ENABLE([dvd-libmpeg2],
[AS_HELP_STRING([--enable-dvd-libmpeg2],
[dvd support for mpeg2 format (default is yes)])],
[SUPPORT_DVD_LIBMPEG2=`if test "$enableval" = "no"; then echo 0; else echo 1; fi`],
[SUPPORT_DVD_LIBMPEG2=1])
AC_ARG_ENABLE([ffmpeg-postproc],
[AS_HELP_STRING([--enable-ffmpeg-postproc],
[ffmpeg postproc (default is yes)])],
[DISABLE_FFMPEG_POSTPROC=`if test "$enableval" = "no"; then echo 1; else echo 0; fi`],
[DISABLE_FFMPEG_POSTPROC=0])
AC_ARG_ENABLE([ffmpeg-swscale],
[AS_HELP_STRING([--enable-ffmpeg-swscale],
[ffmpeg swscale (default is yes)])],
[DISABLE_FFMPEG_SWSCALE=`if test "$enableval" = "no"; then echo 1; else echo 0; fi`],
[DISABLE_FFMPEG_SWSCALE=0])
USE_FONTCONTFIG=$use_fontconfig
AC_SUBST(USE_FONTCONFIG)
### End of external library options
# PCRE is a requirement
use_pcre="yes"
# Checks for programs.
PASSED_CXXFLAGS=$CXXFLAGS # Hack to override autoconf default values
AC_PROG_CXX
CXXFLAGS=$PASSED_CXXFLAGS
PASSED_CFLAGS=$CFLAGS # Hack to override autoconf default values
AC_PROG_CC
CFLAGS=$PASSED_CFLAGS
AC_PROG_AWK
AC_PROG_LN_S
AC_PROG_MAKE_SET
# platform specific flags
if test "$cross_compiling" != "yes"; then
if test "$host_vendor" = "apple"; then
AC_SUBST(MACOSX_DEPLOYMENT_TARGET, $OSX)
# need these in CFLAGS/CXXFLAGS so AC_CHECK_LIB works
CFLAGS="$CFLAGS -I$(PWD) -I$(PWD)/xbmc/cores/dvdplayer/Codecs/ffmpeg -I/opt/local/include"
CFLAGS="$CFLAGS -I/opt/local/include/freetype2"
CFLAGS="$CFLAGS -I/opt/local/include/mysql5"
CFLAGS="$CFLAGS -I/opt/local/include/lzo"
CXXFLAGS="$CXXFLAGS -I$(PWD) -I$(PWD)/xbmc/cores/dvdplayer/Codecs/ffmpeg -I/opt/local/include"
CXXFLAGS="$CXXFLAGS -I/opt/local/include/freetype2"
CXXFLAGS="$CXXFLAGS -I/opt/local/include/mysql5"
# standard xbmc paths
INCLUDES="$INCLUDES -I."
INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc"
INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/lib"
INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/osx"
INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/lib/harfbuzz/harfbuzz/src"
INCLUDES="$INCLUDES -I/opt/local/include"
INCLUDES="$INCLUDES -I/opt/local/include/freetype2"
INCLUDES="$INCLUDES -I/opt/local/include/mysql5"
LDFLAGS="$LDFLAGS $OSX_FLAGS"
LDFLAGS="$LDFLAGS -framework IOKit"
LDFLAGS="$LDFLAGS -framework Cocoa"
LDFLAGS="$LDFLAGS -framework OpenGL"
LDFLAGS="$LDFLAGS -framework AppKit"
LDFLAGS="$LDFLAGS -framework Carbon"
LDFLAGS="$LDFLAGS -framework CoreAudio"
LDFLAGS="$LDFLAGS -framework AudioUnit"
LDFLAGS="$LDFLAGS -framework Foundation"
LDFLAGS="$LDFLAGS -framework CoreServices"
LDFLAGS="$LDFLAGS -framework CoreVideo"
LDFLAGS="$LDFLAGS -framework CoreAudio"
LDFLAGS="$LDFLAGS -framework AudioToolbox"
LDFLAGS="$LDFLAGS -framework CoreFoundation"
LDFLAGS="$LDFLAGS -framework DiskArbitration"
LDFLAGS="$LDFLAGS -framework ApplicationServices"
LDFLAGS="$LDFLAGS -framework SystemConfiguration"
LDFLAGS="$LDFLAGS -L/opt/local/lib"
LDFLAGS="$LDFLAGS -L/opt/local/lib/mysql5/mysql"
# LDFLAGS="$LDFLAGS -L/opt/local/lib/samba3"
AR=ar
RANLIB=ranlib
CPPFLAGS="$CXXFLAGS"
else
INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/lib/harfbuzz/harfbuzz/src"
CFLAGS="$CFLAGS -I/usr/local/include/freetype2 -I/usr/local/include/lzo"
AR=ar
RANLIB=ranlib
fi
else #cross compiling = "yes"
INCLUDES="$INCLUDES -I\$(abs_top_srcdir)/xbmc/lib/harfbuzz/harfbuzz/src"
CROSSCOMPILE_FLAGS='--host $host CC="$CC" CXX="$CXX" LD="$LD" AR="$AR" NM="$NM" RANLIB="$RANLIB" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" LDFLAGS="$LDFLAGS"'
fi
if test "$use_boxee_hal" = "yes"; then
INCLUDES="$INCLUDES -DHAS_BOXEE_HAL"
AC_SUBST(BOXEEHAL,1)
fi
# Add top source directory for all builds so we can use config.h
INCLUDES="$INCLUDES -I\$(abs_top_srcdir)"
# Checks for boost headers using CXX instead of CC
AC_CHECK_HEADER([boost/shared_ptr.hpp],, AC_MSG_ERROR($missing_library))
USE_GLES=0
# Checks for platforms libraries.
if test "$target_platform" = "tegra2-nvidia"; then
AC_CHECK_LIB([nvos], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvrm], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvrm_graphics], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvdispmgr_d], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvddk_2d], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvddk_2d_v2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvodm_query], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvodm_disp], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvddk_disp], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvsm], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvcwm], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvodm_dtvtuner], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvddk_audiomixer], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_tracklist], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvodm_imager], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_manager], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_service], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_utils], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_contentpipe], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_tracklist], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_parser], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_misc], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_videorenderer], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_vp6_video], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_writer], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_audio], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvddk_audiomixer_impl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvodm_hdmi], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_manager_impl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([KD], [main],, AC_MSG_ERROR($missing_library), -lEGL -lnvwsi)
AC_CHECK_LIB([nvwsi], [main],, AC_MSG_ERROR($missing_library), -lEGL)
AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([GLESv2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvmm_video], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([asound], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([nvomx], [main],, AC_MSG_ERROR($missing_library))
if test "$use_x11" = "yes"; then
AC_CHECK_LIB([Xfixes], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([Xcomposite], [main],, AC_MSG_ERROR($missing_library))
LDFLAGS="$LDFLAGS -L/opt/tegra2/usr/lib"
INCLUDES="$INCLUDES -I/opt/tegra2/usr/include -DHAS_X11"
else
INCLUDES="$INCLUDES -DHAS_OPENKODE"
fi
USE_GLES=1
AC_CHECK_HEADER([faad.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([iconv], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([resolv], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([smbclient], [main],, AC_MSG_ERROR($missing_library))
USE_EXTERNAL_SAMBA=1
AC_SUBST(EMBEDDED,1)
elif test "$target_platform" = "i686-cm"; then
USE_GLES=1
AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([platform_config], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([osal], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([system_utils], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([gdl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([pal], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([srv_um], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([IMGegl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([EGL], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([GLESv2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ismd_core], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ismd_viddec_v2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ismd_vidrend], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ismd_vidpproc], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ismd_audio], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([ismd_demux], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([picuart], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([expat], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([gma], [main],, AC_MSG_ERROR($missing_library))
AC_SUBST(EMBEDDED,1)
elif test "$use_gl" = "yes"; then
if test "$host_vendor" = "apple" ; then
# linking to OpenGL.framework instead of libGL, libGLU
AC_CHECK_LIB([GLEW], [main],, AC_MSG_ERROR($missing_library))
else
AC_CHECK_LIB([GL], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([GLEW], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([GLU], [main],, AC_MSG_ERROR($missing_library))
fi
AC_SUBST(EMBEDDED,0)
else
AC_MSG_RESULT(== WARNING: OpenGL support is disabled. XBMC will run VERY slow. ==)
AC_CHECK_LIB([SDL_gfx], [main])
AC_SUBST(EMBEDDED,0)
fi
# platform independent libraries
AC_CHECK_HEADER([mad.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([jpeglib.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([jasper/jasper.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([ogg/ogg.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([vorbis/vorbisfile.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([vorbis/vorbisenc.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([bz2], [main],, AC_MSG_ERROR($missing_library))
if test "$use_mysqlclient" = "yes"; then
AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
HAS_MYSQLCLIENT=1
else
HAS_MYSQLCLIENT=0
fi
AC_CHECK_LIB([pthread], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([lzo2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([z], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([gdbm], [main],, AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([MAD], [mad],
[INCLUDES+=" $MAD_CFLAGS"; LIBS+=" $MAD_LIBS"],
AC_MSG_ERROR($missing_library))
if test "$use_fontconfig" = yes; then
PKG_CHECK_MODULES([FONTCONFIG], [fontconfig],
[INCLUDES+=" $FONTCONFIG_CFLAGS"; LIBS+=" $FONTCONFIG_LIBS"],
AC_MSG_ERROR($missing_library))
fi
PKG_CHECK_MODULES([FRIBIDI], [fribidi],
[INCLUDES+=" $FRIBIDI_CFLAGS"; LIBS+=" $FRIBIDI_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([SQLITE3], [sqlite3],
[INCLUDES+=" $SQLITE3_CFLAGS"; LIBS+=" $SQLITE3_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([PNG], [libpng],
[INCLUDES+=" $PNG_CFLAGS"; LIBS+=" $PNG_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([PCRE], [libpcre],
[INCLUDES+=" $PCRE_CFLAGS"; LIBS+=" $PCRE_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([SAMPLERATE], [samplerate],
[INCLUDES+=" $SAMPLERATE_CFLAGS"; LIBS+=" $SAMPLERATE_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([MMS], [libmms],
[INCLUDES+=" $MMS_CFLAGS"; LIBS+=" $MMS_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([FREETYPE2], [freetype2],
[INCLUDES+=" $FREETYPE2_CFLAGS"; LIBS+=" $FREETYPE2_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([OGG], [ogg],
[INCLUDES+=" $OGG_CFLAGS"; LIBS+=" $OGG_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([VORBIS], [vorbis],
[INCLUDES+=" $VORBIS_CFLAGS"; LIBS+=" $VORBIS_LIBS"],
AC_MSG_ERROR($missing_library))
# check for libbluray
AS_CASE([x$use_libbluray],
[xyes],[
PKG_CHECK_MODULES([LIBBLURAY],[libbluray],[use_libbluray="yes"], AC_MSG_ERROR($missing_library))
],
[xauto],[
PKG_CHECK_MODULES([LIBBLURAY],[libbluray],[use_libbluray="yes"], [use_libbluray="no"])
])
AS_CASE([x$use_libbluray],
[xyes],[
INCLUDES="$INCLUDES $LIBBLURAY_CFLAGS";
if test "$host_vendor" = "i686-cm"; then
AC_CHECK_HEADER([bluray.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([filesystem.h],, AC_MSG_ERROR($missing_library))
fi;
AC_DEFINE([HAVE_LIBBLURAY], 1, [System has libbluray library])
AC_SUBST([HAVE_LIBBLURAY], 1)
],[
if test "$target_platform" = "i686-cm" ; then
AC_DEFINE([HAVE_LIBBLURAY], 1)
fi;
# AC_DEFINE([HAVE_LIBBLURAY], 0, [System has libbluray library])
# AC_SUBST([HAVE_LIBBLURAY], 0)
]
)
# platform dependent libraries
BUILD_WAVEFORM=0
if test "$target_platform" = "i686-cm" ; then
AC_CHECK_HEADER([faad.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([iconv], [main],, AC_MSG_ERROR($missing_library))
# AC_CHECK_LIB([idn], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([resolv], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([smbclient], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([cares], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([gpg-error], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([gcrypt], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([fuse], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([afpclient], [main],, AC_MSG_ERROR($missing_library))
USE_EXTERNAL_SAMBA=1
elif test "$host_vendor" = "apple" ; then
AC_CHECK_LIB([iconv], [main],, AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([VORBISFILE], [vorbisfile],
[INCLUDES+=" $VORBISFILE_CFLAGS"; LIBS+=" $VORBISFILE_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([VORBISENC], [vorbisenc],
[INCLUDES+=" $VORBISENC_CFLAGS"; LIBS+=" $VORBISENC_LIBS"],
AC_MSG_ERROR($missing_library))
USE_EXTERNAL_SAMBA=0
BUILD_WAVEFORM=1
else
LIBS+="/usr/lib/libmysqlclient.so.16 "
LIBS+="/usr/lib/libcdio.a "
AC_CHECK_HEADER([FLAC/stream_decoder.h],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([dl], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([resolv], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([jasper], [main],, AC_MSG_ERROR($missing_library)) # check for cximage
AC_CHECK_LIB([tiff], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([rt], [clock_gettime],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([crypto], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([samplerate], [main],, AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([SAMPLERATE], [samplerate],
[INCLUDES+=" $SAMPLERATE_CFLAGS"; LIBS+=" $SAMPLERATE_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([ALSA], [alsa],
[INCLUDES+=" $ALSA_CFLAGS"; LIBS+=" $ALSA_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([ENCA], [enca],
[INCLUDES+=" $ENCA_CFLAGS"; LIBS+=" $ENCA_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([XT], [xt],
[INCLUDES+=" $XT_CFLAGS"; LIBS+=" $XT_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([XTST], [xtst],
[INCLUDES+=" $XTST_CFLAGS"; LIBS+=" $XTST_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([XMU], [xmu],
[INCLUDES+=" $XMU_CFLAGS"; LIBS+=" $XMU_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([XINERAMA], [xinerama],
[INCLUDES+=" $XINERAMA_CFLAGS"; LIBS+=" $XINERAMA_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([DBUS], [dbus-1],
[INCLUDES+=" $DBUS_CFLAGS"; LIBS+=" $DBUS_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([HAL_STORAGE], [hal-storage],
[INCLUDES+=" $HAL_STORAGE_CFLAGS"; LIBS+=" $HAL_STORAGE_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([HAL], [hal],
[INCLUDES+=" $HAL_CFLAGS"; LIBS+=" $HAL_LIBS"],
AC_MSG_ERROR($missing_library))
USE_EXTERNAL_SAMBA=1
BUILD_WAVEFORM=1
fi
if test "$host_vendor" != "apple"; then
PKG_CHECK_MODULES([CURL], [libcurl],
[INCLUDES+=" $CURL_CFLAGS"; LIBS+=" $CURL_LIBS"],
AC_MSG_ERROR($missing_library))
PKG_CHECK_MODULES([SDL], [sdl],
[INCLUDES+=" $SDL_CFLAGS"; LIBS+=" $SDL_LIBS"],
AC_MSG_ERROR($missing_library))
fi
# PulseAudio
if test "$host_vendor" = "apple" || test "$cross_compiling" = "yes"; then
use_pulse="no"
AC_MSG_RESULT($pulse_disabled)
else
if test "$use_pulse" = "yes"; then
AC_CHECK_LIB([pulse], [main],
LIBS=" -lpulse $LIBS";INCLUDES="$INCLUDES -DHAS_PULSEAUDIO",
use_pulse=no;AC_MSG_RESULT($pulse_not_found))
else
AC_MSG_RESULT($pulse_disabled)
fi
fi
# FAAC
if test "$host_vendor" = "apple"; then
use_faac="no"
AC_MSG_RESULT($faac_disabled)
else
if test "$use_faac" = "yes"; then
AC_CHECK_LIB([faac], [main],,
use_faac=no;AC_MSG_RESULT($faac_not_found))
else
AC_MSG_RESULT($faac_disabled)
fi
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],
LIBS=" -lavahi-common $LIBS";,
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],
LIBS=" -lavahi-client $LIBS";INCLUDES="$INCLUDES -DHAS_AVAHI",
use_avahi=no;AC_MSG_RESULT($avahi_not_found))
fi
else
AC_MSG_RESULT($avahi_disabled)
fi
fi
# XRandR
if test "$host_vendor" = "apple"; then
use_xrandr="no"
BUILD_XRANDR=0
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))
BUILD_XRANDR=1
else
AC_MSG_RESULT($xrandr_disabled)
BUILD_XRANDR=0
fi
fi
### External libraries checks
if test "$use_external_libraries" = "yes"; then
AC_MSG_NOTICE($external_libraries_enabled)
USE_EXTERNAL_LIBRARIES=1
AC_DEFINE([USE_EXTERNAL_LIBRARIES], [1], [Whether to use external libraries.])
else
AC_MSG_NOTICE($external_libraries_disabled)
USE_EXTERNAL_LIBRARIES=0
fi
# External FFmpeg
if test "$use_external_libraries" = "yes" || test "$use_external_ffmpeg" = "yes"; then
AC_CHECK_LIB([avcodec], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([avformat], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([avutil], [main],, AC_MSG_ERROR($missing_library))
if test "$DISABLE_FFMPEG_POSTPROC" = "0"; then
AC_CHECK_LIB([postproc], [main],, AC_MSG_ERROR($missing_library))
fi
if test "$DISABLE_FFMPEG_SWSCALE" = "0"; then
AC_CHECK_LIB([swscale], [main],, AC_MSG_ERROR($missing_library))
fi
# Determine whether AVPacket and relevant functions are defined in libavformat
# or libavcodec
AC_CHECK_LIB([avcodec], [av_free_packet],
[AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavcodec. ==)],
[AC_MSG_NOTICE(== AVPacket and relevant functions defined in libavformat. ==)
AC_DEFINE([AVPACKET_IN_AVFORMAT], [1], [Whether AVPacket is in libavformat.])])
# Possible places the ffmpeg headers may be
AC_CHECK_HEADERS([stdint.h libavcodec/avcodec.h libavformat/avformat.h libavutil/avutil.h],,
[AC_CHECK_HEADERS([ffmpeg/avcodec.h ffmpeg/avformat.h ffmpeg/avutil.h],,
[AC_MSG_ERROR($missing_headers)])])
if test "$DISABLE_FFMPEG_POSTPROC" = "0"; then
AC_CHECK_HEADERS([stdint.h libavcodec/avcodec.h libavformat/avformat.h libavutil/avutil.h libpostproc/postprocess.h],,
[AC_CHECK_HEADERS([ffmpeg/avcodec.h ffmpeg/avformat.h ffmpeg/avutil.h postproc/postprocess.h],,
[AC_MSG_ERROR($missing_headers)])])
fi
if test "$DISABLE_FFMPEG_SWSCALE" = "0"; then
AC_CHECK_HEADERS([stdint.h libavcodec/avcodec.h libavformat/avformat.h libavutil/avutil.h libswscale/swscale.h],,
[AC_CHECK_HEADERS([ffmpeg/avcodec.h ffmpeg/avformat.h ffmpeg/avutil.h ffmpeg/swscale.h],,
[AC_MSG_ERROR($missing_headers)])])
fi
# We'll support the use of rgb2rgb.h if it exists.
AC_CHECK_HEADERS([libswscale/rgb2rgb.h],,)
AC_CHECK_HEADERS([ffmpeg/rgb2rgb.h],,)
AC_MSG_NOTICE($external_ffmpeg_enabled)
USE_EXTERNAL_FFMPEG=1
AC_DEFINE([USE_EXTERNAL_FFMPEG], [1], [Whether to use external FFmpeg libraries.])
# Disable vdpau support if external libavcodec doesn't have it
AC_CHECK_LIB([avcodec], [ff_vdpau_vc1_decode_picture],,
use_vdpau=no;AC_MSG_RESULT($ffmpeg_vdpau_not_supported))
else
AC_MSG_NOTICE($external_ffmpeg_disabled)
USE_EXTERNAL_FFMPEG=0
fi
# External liba52
if test "$SUPPORT_DVD_LIBA52" = "1"; then
AC_DEFINE([HAS_DVD_LIBA52_CODEC], [1], [support of dvd liba52 format.])
if test "$use_external_libraries" = "yes" || test "$use_external_liba52" = "yes"; then
AC_CHECK_LIB([a52], [main],, AC_MSG_ERROR($missing_library))
AC_MSG_NOTICE($external_liba52_enabled)
USE_EXTERNAL_LIBA52=1
AC_DEFINE([USE_EXTERNAL_LIBA52], [1], [Whether to use external liba52 library.])
else
AC_MSG_NOTICE($external_liba52_disabled)
USE_EXTERNAL_LIBA52=0
fi
else
USE_EXTERNAL_LIBA52=0
fi
# External libdts
if test "$SUPPORT_DVD_LIBDTS" = "1"; then
AC_DEFINE([HAS_DVD_LIBDTS_CODEC], [1], [support of dvd libdts format.])
if test "$use_external_libraries" = "yes" || test "$use_external_libdts" = "yes"; then
AC_CHECK_LIB([dts], [main],, AC_MSG_ERROR($missing_library))
AC_MSG_NOTICE($external_libdts_enabled)
USE_EXTERNAL_LIBDTS=1
AC_DEFINE([USE_EXTERNAL_LIBDTS], [1], [Whether to use external libdts library.])
else
AC_MSG_NOTICE($external_libdts_disabled)
USE_EXTERNAL_LIBDTS=0
fi
else
USE_EXTERNAL_LIBDTS=0
fi
# External libmpeg2
if test "$SUPPORT_DVD_LIBMPEG2" = "1"; then
AC_DEFINE([HAS_DVD_LIBMPEG2_CODEC], [1], [support of dvd libmpeg2 format.])
if test "$use_external_libraries" = "yes" || test "$use_external_libmpeg2" = "yes"; then
AC_CHECK_LIB([mpeg2], [main],, AC_MSG_ERROR($missing_library))
AC_CHECK_LIB([mpeg2convert], [main],, AC_MSG_ERROR($missing_library))
AC_MSG_NOTICE($external_libmpeg2_enabled)
USE_EXTERNAL_LIBMPEG2=1
AC_DEFINE([USE_EXTERNAL_LIBMPEG2], [1], [Whether to use external libmpeg2 library.])
else
AC_MSG_NOTICE($external_libmpeg2_disabled)
USE_EXTERNAL_LIBMPEG2=0
fi
else
USE_EXTERNAL_LIBMPEG2=0
fi
# External libass
if test "$use_external_libraries" = "yes" || test "$use_external_libass" = "yes"; then
# We need libass >= 0.9.7.
AC_CHECK_LIB([ass], [ass_set_message_cb],
[AC_CHECK_LIB([ass], [main],,)
AC_MSG_NOTICE($external_libass_enabled)
USE_EXTERNAL_LIBASS=1
AC_DEFINE([USE_EXTERNAL_LIBASS], [1], [Whether to use external libass library.])],
[AC_MSG_WARN(== Need libass >= 0.9.7. Disabling external libass. ==)
USE_EXTERNAL_LIBASS=0])
else
AC_MSG_NOTICE($external_libass_disabled)
USE_EXTERNAL_LIBASS=0
fi
# External libogg
if test "$use_external_libraries" = "yes" || test "$use_external_libogg" = "yes"; then
AC_MSG_NOTICE($external_libogg_enabled)
USE_EXTERNAL_LIBOGG=1
AC_DEFINE([USE_EXTERNAL_LIBOGG], [1], [Whether to use external libogg library.])
else
AC_MSG_NOTICE($external_libogg_disabled)
USE_EXTERNAL_LIBOGG=0
fi
# External libwavpack
if test "$use_external_libraries" = "yes" || test "$use_external_libwavpack" = "yes"; then
AC_CHECK_LIB([wavpack], [main],, AC_MSG_ERROR($missing_library))
AC_MSG_NOTICE($external_libwavpack_enabled)
USE_EXTERNAL_LIBWAVPACK=1
AC_DEFINE([USE_EXTERNAL_LIBWAVPACK], [1], [Whether to use external libwavpack library.])
else
AC_MSG_NOTICE($external_libwavpack_disabled)
USE_EXTERNAL_LIBWAVPACK=0
fi
# External Python
if test "$use_external_libraries" = "yes" || test "$use_external_python" = "yes"; then
AC_CHECK_LIB([python2.6], [main],,
[AC_CHECK_LIB([python2.5], [main],,
[AC_CHECK_LIB([python2.4], [main],,
[AC_MSG_ERROR($missing_library)] )] )] )
# Test again, but this time just set some variables we need in Makefiles
AC_CHECK_LIB([python2.6], [main],[USE_PYTHON2_6=1],
[AC_CHECK_LIB([python2.5], [main],[USE_PYTHON2_5=1],
[AC_CHECK_LIB([python2.4], [main],[USE_PYTHON2_4=1],
[AC_MSG_ERROR($missing_library)] )] )] )
AC_MSG_NOTICE($external_python_enabled)
test "$USE_PYTHON2_6" && AC_MSG_NOTICE([Using Python 2.6])
test "$USE_PYTHON2_5" && AC_MSG_NOTICE([Using Python 2.5])
test "$USE_PYTHON2_4" && AC_MSG_NOTICE([Using Python 2.4])
USE_EXTERNAL_PYTHON=1
AC_DEFINE([USE_EXTERNAL_PYTHON], [1], [Whether to use external python library.])
else
AC_MSG_NOTICE($external_python_disabled)
USE_EXTERNAL_PYTHON=0
# We'll need zip in this case.
AC_CHECK_PROG(HAVE_ZIP,zip,"yes","no",)
if test "$HAVE_ZIP" = "no" ; then
AC_MSG_ERROR($missing_program)
fi
fi
# VDPAU
if test "$host_vendor" = "apple" ; then
use_vdpau="no"
AC_MSG_NOTICE($vdpau_disabled)
else
if test "$use_vdpau" = "yes"; then
AC_CHECK_HEADER([vdpau/vdpau.h],AC_DEFINE([HAVE_LIBVDPAU], [], [Define to 1 if you have the 'vdpau' library (-lvdpau).]),
use_vdpau=no;AC_MSG_ERROR($vdpau_not_found))
else
AC_MSG_NOTICE($vdpau_disabled)
fi
fi
# platform specific bin utilities
if test "$host_vendor" != "apple" ; then
AC_CHECK_PROG(HAVE_GAWK,gawk,"yes","no",)
if test "$HAVE_GAWK" = "no" ; then
AC_MSG_ERROR($missing_program)
fi
fi
AC_CHECK_PROG(HAVE_CMAKE,cmake,"yes","no",)
if test "$HAVE_CMAKE" = "no" ; then
AC_MSG_ERROR($missing_program)
fi
AC_CHECK_PROG(HAVE_GPERF,gperf,"yes","no",)
if test "$HAVE_GPERF" = "no" ; then
AC_MSG_ERROR($missing_program)
fi
AC_CHECK_PROG(HAVE_UNZIP,unzip,"yes","no",)
if test "$HAVE_UNZIP" = "no" ; then
AC_MSG_ERROR($missing_program)
fi
if test "$ARCH" != "x86_64-linux"; then
AC_CHECK_PROG(HAVE_NASM,nasm,"yes","no",)
if test "$HAVE_NASM" = "no" ; then
AC_MSG_ERROR($missing_program)
fi
fi
# Checks for header files.
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
AC_CHECK_HEADERS([lzo/lzo1.h])
AC_CHECK_HEADERS([arpa/inet.h fcntl.h float.h inttypes.h limits.h locale.h \
malloc.h memory.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h \
strings.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h \
sys/time.h sys/timeb.h sys/vfs.h termios.h unistd.h utime.h wchar.h wctype.h])
# Checks for typedefs, structures, and compiler characteristics.
AC_HEADER_STAT
AC_HEADER_STDBOOL
AC_C_CONST
AC_TYPE_UID_T
AC_C_INLINE
AC_TYPE_INT8_T
AC_TYPE_INT16_T
AC_TYPE_INT32_T
AC_TYPE_INT64_T
AC_TYPE_MODE_T
AC_TYPE_OFF_T
AC_TYPE_PID_T
AC_C_RESTRICT
AC_TYPE_SIZE_T
AC_TYPE_SSIZE_T
AC_CHECK_MEMBERS([struct stat.st_rdev])
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UINT8_T
AC_TYPE_UINT16_T
AC_TYPE_UINT32_T
AC_TYPE_UINT64_T
AC_C_BIGENDIAN
# Checks for library functions.
AC_FUNC_ALLOCA
AC_FUNC_CHOWN
AC_FUNC_CLOSEDIR_VOID
AC_FUNC_ERROR_AT_LINE
AC_FUNC_FSEEKO
AC_PROG_GCC_TRADITIONAL
AC_FUNC_LSTAT
AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK
AC_FUNC_MEMCMP
AC_FUNC_MKTIME
AC_FUNC_MMAP
# Boxee is apparently having compile problems
# if HAVE_REALLOC is defined. Sort this later.
#AC_FUNC_REALLOC
AC_FUNC_SELECT_ARGTYPES
AC_FUNC_SETVBUF_REVERSED
AC_TYPE_SIGNAL
AC_FUNC_STAT
AC_FUNC_STRCOLL
AC_FUNC_STRFTIME
AC_FUNC_STRTOD
AC_FUNC_UTIME_NULL
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd gethostbyaddr gethostbyname gethostname getpagesize getpass gettimeofday inet_ntoa lchown localeconv memchr memmove memset mkdir modf munmap pow rmdir select setenv setlocale socket sqrt strcasecmp strchr strcspn strdup strerror strncasecmp strpbrk strrchr strspn strstr strtol strtoul sysinfo tzset utime])
# Check for various sizes
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([size_t])
dashes="------------------------"
final_message="\n XBMC Configuration:"
final_message="\n$dashes$final_message\n$dashes"
if test "$use_debug" = "yes"; then
final_message="$final_message\n Debugging:\tYes"
if test "$use_profiling" = "yes"; then
final_message="$final_message\n Profiling:\tYes"
DEBUG_FLAGS="-g -pg -D_DEBUG -Wall -Wextra -Wno-unused-parameter"
else
final_message="$final_message\n Profiling:\tNo"
DEBUG_FLAGS="-g -D_DEBUG -Wall -Wextra -Wno-unused-parameter" # -D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC"
fi
else
final_message="$final_message\n Debugging:\tNo"
if test "$use_profiling" = "yes"; then
final_message="$final_message\n Profiling:\tYes"
DEBUG_FLAGS="-pg -DNDEBUG=1"
else
final_message="$final_message\n Profiling:\tNo"
DEBUG_FLAGS="-DNDEBUG=1"
fi
fi
if test "$use_optimizations" = "yes"; then
final_message="$final_message\n Optimization:\tYes"
CXXFLAGS="$CXXFLAGS -O2 -Wall -Wextra -Wno-unused-parameter "
CFLAGS="$CFLAGS -O2 -Wall -Wextra -Wno-unused-parameter "
else
final_message="$final_message\n Optimization:\tNo"
fi
if test "$use_gl" = "yes"; then
final_message="$final_message\n OpenGL:\tYes"
SDL_DEFINES=""
else
final_message="$final_message\n OpenGL:\tNo (Very Slow)"
SDL_DEFINES="-DHAS_SDL_2D"
fi
if test "$use_vdpau" = "yes"; then
final_message="$final_message\n VDPAU:\tYes"
else
final_message="$final_message\n VDPAU:\tNo"
fi
if test "$use_joystick" = "yes"; then
final_message="$final_message\n Joystick:\tYes"
SDL_DEFINES="$SDL_DEFINES -DHAS_SDL_JOYSTICK"
else
final_message="$final_message\n Joystick:\tNo"
fi
if test "$use_xrandr" = "yes"; then
final_message="$final_message\n XRandR:\tYes"
SDL_DEFINES="$SDL_DEFINES -DHAS_XRANDR"
else
final_message="$final_message\n XRandR:\tNo"
fi
if test "$BUILD_GOOM" = "yes"; then
final_message="$final_message\n GOOM:\t\tYes"
else
final_message="$final_message\n GOOM:\t\tNo"
fi
if test "$use_libbluray" = "yes"; then
final_message="$final_message\n Bluray:\tYes"
else
final_message="$final_message\n Bluray:\tNo"
fi
if test "$use_pcre" = "yes"; then
final_message="$final_message\n PCRE Support:\tYes"
SDL_DEFINES="$SDL_DEFINES -DHAS_PCRE"
else
final_message="$final_message\n PCRE Support:\tNo"
fi
if test "$use_mid" = "yes"; then
final_message="$final_message\n MID Support:\tYes"
SDL_DEFINES="$SDL_DEFINES -DMID"
else
final_message="$final_message\n MID Support:\tNo"
fi
if test "$use_ccache" = "yes"; then
if test "$ac_cv_path_CCACHE" = "none"; then
echo "ccache not found. Falling back to default CC"
final_message="$final_message\n ccache:\tNo"
else
CC="$ac_cv_path_CCACHE $CC"
CXX="$ac_cv_path_CCACHE $CXX"
AC_MSG_NOTICE(enabling ccache)
final_message="$final_message\n ccache:\tYes"
fi
else
final_message="$final_message\n ccache:\tNo"
fi
if test "$use_pulse" = "yes"; then
final_message="$final_message\n PulseAudio:\tYes"
else
final_message="$final_message\n PulseAudio:\tNo"
fi
if test "$use_faac" = "yes"; then
final_message="$final_message\n FAAC:\t\tYes"
else
final_message="$final_message\n FAAC:\t\tNo"
fi
DVDREAD_CFLAGS="-D_XBMC -UHAVE_DVDCSS_DVDCSS_H"
if test "$use_avahi" = "yes"; then
final_message="$final_message\n Avahi:\tYes"
else
final_message="$final_message\n Avahi:\tNo"
fi
### External libraries messages
if test "$use_external_libraries" = "yes"; then
final_message="$final_message\n External Libraries:\tYes"
else
final_message="$final_message\n External Libraries:\tNo"
if test "$use_external_ffmpeg" = "yes"; then
final_message="$final_message\n External FFmpeg:\tYes"
else
final_message="$final_message\n External FFmpeg:\tNo"
fi
if test "$use_external_liba52" = "yes"; then
final_message="$final_message\n External liba52:\tYes"
else
final_message="$final_message\n External liba52:\tNo"
fi
if test "$use_external_libdts" = "yes"; then
final_message="$final_message\n External libdts:\tYes"
else
final_message="$final_message\n External libdts:\tNo"
fi
if test "$use_external_libmpeg2" = "yes"; then
final_message="$final_message\n External libmpeg2:\tYes"
else
final_message="$final_message\n External libmpeg2:\tNo"
fi
if test "$use_external_libass" = "yes"; then
final_message="$final_message\n External libass:\tYes"
else
final_message="$final_message\n External libass:\tNo"
fi
if test "$use_external_libogg" = "yes"; then
final_message="$final_message\n External libogg:\tYes"
else
final_message="$final_message\n External libogg:\tNo"
fi
if test "$use_external_libwavpack" = "yes"; then
final_message="$final_message\n External libwavpack:\tYes"
else
final_message="$final_message\n External libwavpack:\tNo"
fi
if test "$use_external_python" = "yes"; then
final_message="$final_message\n External Python:\tYes"
else
final_message="$final_message\n External Python:\tNo"
fi
fi
OUTPUT_FILES="Makefile \
Makefile.include \
xbmc/cores/dvdplayer/Codecs/Makefile \
xbmc/cores/dvdplayer/Codecs/libdvd/Makefile \
xbmc/cores/AudioRenderers/Makefile \
xbmc/cores/paplayer/Makefile \
xbmc/cores/paplayer/MACDll/Makefile \
xbmc/cores/paplayer/timidity/Makefile \
xbmc/cores/paplayer/AC3Codec/Makefile \
xbmc/cores/paplayer/ADPCMCodec/Makefile \
xbmc/cores/paplayer/ModuleCodec/Makefile \
xbmc/cores/paplayer/GYMCodec/Makefile \
xbmc/cores/paplayer/NSFCodec/Makefile \
xbmc/cores/paplayer/SIDCodec/Makefile \
xbmc/cores/paplayer/vgmstream/Makefile \
xbmc/cores/paplayer/SPCCodec/SNES/SNESAPU/Makefile \
xbmc/cores/paplayer/WavPackCodec/Makefile \
xbmc/cores/paplayer/YMCodec/StSoundLibrary/Makefile \
guilib/common/Makefile \
xbmc/lib/libass/xbmc/Makefile \
xbmc/lib/libXBMS/Makefile \
xbmc/lib/libRTV/Makefile \
xbmc/lib/libexif/Makefile \
xbmc/lib/libXDAAP/Makefile \
xbmc/lib/libhdhomerun/Makefile \
xbmc/lib/libGoAhead/Makefile \
xbmc/lib/libshout/Makefile \
xbmc/lib/libsquish/Makefile \
xbmc/lib/libid3tag/Makefile \
xbmc/lib/cximage-6.0/Makefile \
xbmc/lib/libPython/linux/Makefile \
xbmc/lib/libUPnP/Makefile \
xbmc/lib/libjsonrpc/Makefile \
xbmc/DllPaths_generated.h \
xbmc/linux/svn_rev.h \
xbmc/linux/Makefile \
xbmc/screensavers/Makefile \
xbmc/screensavers/rsxs-0.9/xbmc/Makefile \
xbmc/visualizations/XBMCProjectM/Makefile \
xbmc/visualizations/Goom/Makefile \
xbmc/visualizations/OpenGLSpectrum/Makefile \
xbmc/visualizations/WaveForm/Makefile \
xbmc/visualizations/iTunes/Makefile \
BoxeeHal/server/Makefile \
tools/TexturePacker/Makefile "
if test "$host_vendor" = "apple"; then
OUTPUT_FILES+="xbmc/cores/paplayer/FLACCodec/Makefile \
tools/EventClients/Clients/OSXRemote/Makefile \
xbmc/cores/paplayer/vorbisfile/Makefile"
fi
AC_CONFIG_FILES([${OUTPUT_FILES}])
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
AC_SUBST(INCLUDES)
AC_SUBST(LDFLAGS)
AC_SUBST(DEBUG_FLAGS)
AC_SUBST(SDL_DEFINES)
AC_SUBST(BUILD_GOOM)
AC_SUBST(USE_EXTERNAL_LIBRARIES)
AC_SUBST(USE_EXTERNAL_FFMPEG)
AC_SUBST(USE_EXTERNAL_LIBA52)
AC_SUBST(SUPPORT_DVD_LIBA52)
AC_SUBST(USE_EXTERNAL_LIBDTS)
AC_SUBST(SUPPORT_DVD_LIBDTS)
AC_SUBST(USE_EXTERNAL_LIBMPEG2)
AC_SUBST(SUPPORT_DVD_LIBMPEG2)
AC_SUBST(USE_EXTERNAL_LIBASS)
AC_SUBST(USE_EXTERNAL_LIBVORBIS)
AC_SUBST(USE_EXTERNAL_LIBOGG)
AC_SUBST(USE_EXTERNAL_LIBWAVPACK)
AC_SUBST(USE_EXTERNAL_PYTHON)
AC_SUBST(USE_PYTHON2_6)
AC_SUBST(USE_PYTHON2_5)
AC_SUBST(USE_PYTHON2_4)
AC_SUBST(OUTPUT_FILES)
AC_SUBST(AR)
AC_SUBST(LD)
AC_SUBST(RANLIB)
AC_SUBST(USE_EXTERNAL_SAMBA)
AC_SUBST(HAS_MYSQLCLIENT)
AC_SUBST(BUILD_RSXS)
AC_SUBST(BUILD_PROJECTM)
AC_SUBST(BUILD_SPECTRUM)
AC_SUBST(BUILD_WAVEFORM)
AC_SUBST(BUILD_XRANDR)
AC_SUBST(USE_GLES)
AC_SUBST(BUILD_OPKG)
AC_SUBST(BUILD_PAP_APE)
AC_SUBST(BUILD_PAP_WAVPACK)
AC_SUBST(BUILD_PAP_SID)
AC_SUBST(BUILD_PAP_NSF)
AC_SUBST(BUILD_PAP_VGMSTREAM)
AC_SUBST(BUILD_PAP_YM)
AC_SUBST(BUILD_PAP_TIMIDITY)
AC_SUBST(BUILD_PAP_GYM)
AC_SUBST(BUILD_PAP_SPC)
AC_SUBST(BUILD_PAP_ADPCM)
AC_SUBST(DISABLE_FFMPEG_POSTPROC)
AC_SUBST(DISABLE_FFMPEG_SWSCALE)
if test "$BUILD_PAP_APE" = 1; then
AC_DEFINE([HAS_APE_CODEC], [1], [support of your ape format.])
fi
if test "$BUILD_PAP_WAVPACK" = 1; then
AC_DEFINE([HAS_WAVPACK_CODEC], [1], [support of your wavpack format.])
fi
if test "$BUILD_PAP_SID" = 1; then
AC_DEFINE([HAS_SID_CODEC], [1], [support of your sid format.])
fi
if test "$BUILD_PAP_NSF" = 1; then
AC_DEFINE([HAS_NSF_CODEC], [1], [support of your nsf format.])
fi
if test "$BUILD_PAP_VGMSTREAM" = 1; then
AC_DEFINE([HAS_VGMSTREAM_CODEC], [1], [support of your vgmstream format.])
fi
if test "$BUILD_PAP_YM" = 1; then
AC_DEFINE([HAS_YM_CODEC], [1], [support of your ym format.])
fi
if test "$BUILD_PAP_TIMIDITY" = 1; then
AC_DEFINE([HAS_TIMIDITY_CODEC], [1], [support of your timidity format.])
fi
if test "$BUILD_PAP_GYM" = 1; then
AC_DEFINE([HAS_GYM_CODEC], [1], [support of your gym format.])
fi
if test "$BUILD_PAP_SPC" = 1; then
AC_DEFINE([HAS_SPC_CODEC], [1], [support of your spc format.])
fi
if test "$BUILD_PAP_ADPCM" = 1; then
AC_DEFINE([HAS_ADPCM_CODEC], [1], [support of your adpcm format.])
fi
if test "$DISABLE_FFMPEG_POSTPROC" = 1; then
AC_DEFINE([DISABLE_FFMPEG_POSTPROC], [1], [disable ffmpeg postproc.])
fi
if test "$DISABLE_FFMPEG_SWSCALE" = 1; then
AC_DEFINE([DISABLE_FFMPEG_SWSCALE], [1], [disable ffmpeg swscale.])
fi
# Function to run the configure scripts in our submodules
# Consists of three paramaters, the path to the submodule, the configure command
# with appropriate arguments, and a third parameter set to 1 if we are to skip
# running the script, anything else if not.
AC_DEFUN([XB_CONFIG_MODULE],[
AC_CONFIG_COMMANDS_POST([
if [[ $3 != "1" ]]; then
if [[ -d $1 ]]; then
pushd $1
$2
if [[ $? -ne 0 ]]; then
popd
AC_MSG_ERROR([[Submodule $1 failed to configure]])
else
popd
fi
else
AC_MSG_ERROR([[Submodule $1 doesn't exist]])
fi
else
AC_MSG_NOTICE([[Skipping configuration of submodule $1.]])
fi
])
])
XB_CONFIG_MODULE([xbmc/lib/opkg/opkg-0.1.8], [
eval PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure --disable-shared --disable-shave --disable-openssl --with-opkgetcdir=/opt/boxee/ --with-opkglibdir=/opt/boxee/ $CROSSCOMPILE_FLAGS
], [`expr 1 - $BUILD_OPKG`])
XB_CONFIG_MODULE([xbmc/lib/libPython/Python], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
./configure \
--enable-ipv6 \
--enable-unicode=ucs4 \
--without-cxx \
--enable-shared \
--without-pymalloc \
--disable-toolbox-glue \
LDFLAGS="-L/opt/local/lib" \
CFLAGS="-m$ARCH_BITS" \
OPT="-Wno-deprecated-declarations -I/opt/local/include" \
MACOSX_DEPLOYMENT_TARGET=$OSX &&
sed -i"" -e "s/define HAVE_GETC_UNLOCKED 1/undef HAVE_GETC_UNLOCKED/" pyconfig.h &&
sed -i"" -e "s/define HAVE_FSEEKO 1/undef HAVE_FSEEKO/" pyconfig.h &&
sed -i"" -e "s/define HAVE_FTELLO 1/undef HAVE_FTELLO/" pyconfig.h &&
sed -i"" -e "s/define HAVE_FTRUNCATE 1/undef HAVE_FTRUNCATE/" pyconfig.h &&
sed -i"" -e "s/define HAVE_FPATHCONF 1/undef HAVE_FPATHCONF/" pyconfig.h &&
sed -i"" -e "s/define HAVE_FSYNC 1/undef HAVE_FSYNC/" pyconfig.h &&
sed -i"" -e "s/define HAVE_FCHDIR 1/undef HAVE_FCHDIR/" pyconfig.h &&
sed -i"" -e "s/define _POSIX_C_SOURCE 200112L/undef _POSIX_C_SOURCE/" pyconfig.h &&
sed -i"" -e "s/define _XOPEN_SOURCE 600/undef _XOPEN_SOURCE/" pyconfig.h &&
sed -i"" -e "s/define _XOPEN_SOURCE_EXTENDED 1/undef _XOPEN_SOURCE_EXTENDED/" pyconfig.h &&
cp pyconfig.h Include
elif test "$cross_compiling" != "yes"; then
ac_cv_lib_util_openpty=no ac_cv_func_openpty=no ac_cv_func_forkpty=no ac_cv_lib_util_forkpty=no \
./configure \
--enable-ipv6 \
--enable-unicode=ucs4 \
--without-cxx \
--enable-shared \
--without-pymalloc \
--prefix=`pwd`/../linux/python-lib CFLAGS=-fPIC &&
sed -i"" -e "s/define HAVE_GETC_UNLOCKED 1/undef HAVE_GETC_UNLOCKED/" pyconfig.h &&
sed -i"" -e "s/define _POSIX_C_SOURCE 200112L/undef _POSIX_C_SOURCE/" pyconfig.h &&
sed -i"" -e "s/define _XOPEN_SOURCE 600/undef _XOPEN_SOURCE/" pyconfig.h &&
cp pyconfig.h Include
else
save_cflags=$CFLAGS
BASECFLAGS="$INCLUDES $LDFLAGS"
CFLAGS="$CFLAGS -fPIC"
eval ./configure \
--enable-unicode=ucs4 \
--without-cxx \
--enable-shared \
--without-pymalloc \
--prefix=`pwd`/../linux/python-lib $CROSSCOMPILE_FLAGS &&
sed -i -e "s/define HAVE_GETC_UNLOCKED 1/undef HAVE_GETC_UNLOCKED/" pyconfig.h &&
cp pyconfig.h Include
CFLAGS=$save_cflags
fi
], [$USE_EXTERNAL_PYTHON])
XB_CONFIG_MODULE([xbmc/cores/paplayer/FLACCodec/flac-1.2.1], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
CFLAGS="-fPIC -fno-common $OSX_FLAGS" \
./configure MACOSX_DEPLOYMENT_TARGET=$OSX \
--with-pic \
--disable-asm-optimizations \
--disable-xmms-plugin \
--disable-cpplibs \
CC="$CC" \
CXX="$CXX"
elif test "$cross_compiling" != "yes"; then
true
else
eval ./configure \
--with-pic \
--disable-asm-optimizations \
--disable-xmms-plugin \
--disable-cpplibs \
$CROSSCOMPILE_FLAGS
fi
], [0])
XB_CONFIG_MODULE([xbmc/cores/paplayer/vorbisfile/libvorbis], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
./configure MACOSX_DEPLOYMENT_TARGET=$OSX --with-pic --build=x86_64
else
true
fi
], [0])
XB_CONFIG_MODULE([xbmc/cores/paplayer/vorbisfile/ogg], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
./configure MACOSX_DEPLOYMENT_TARGET=$OSX --with-pic --build=x86_64
else
true
fi
], [0])
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/ffmpeg], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
./configure \
--extra-cflags="-w -D_DARWIN_C_SOURCE -D_XBOX $OSX_FLAGS " \
--enable-static \
`if test "$use_debug" = "no"; then echo --disable-debug; fi` \
--disable-muxers \
--disable-encoders \
--disable-devices \
--disable-ffplay \
--disable-ffserver \
--disable-ffmpeg \
--disable-doc \
--enable-shared \
--disable-decoder=mpeg_xvmc \
--enable-postproc \
--enable-gpl \
--enable-protocol=http \
--enable-pthreads \
--cc="$OSX_GCC" &&
sed -ibak -e "s#YASM=yasm#YASM=/opt/local/bin/yasm#" config.mak &&
sed -ibak -e "s# -D_ISOC99_SOURCE -D_POSIX_C_SOURCE=200112 # #" config.mak &&
sed -ibak -e "s#libswscale_VERSION_MAJOR=0#libswscale_VERSION_MAJOR=0.7.1#" config.mak &&
sed -ibak -e "s#libavfilter_VERSION_MAJOR=0#libavfilter_VERSION_MAJOR=0.4.0#" config.mak
elif test "$target_platform" = "tegra2-nvidia"; then
./configure \
--extra-cflags="-mtune=cortex-a8 -mthumb-interwork -mhard-float -mfpu=vfpv3-d16 -mfloat-abi=softfp -finline-functions -finline-limit=300 -fomit-frame-pointer -fgcse-after-reload -D_XBOX" \
--arch=armv6 \
--cpu=armv6 \
--cross-prefix=$CROSSBIN \
--disable-static \
--disable-altivec \
--disable-muxers \
--disable-encoders \
--disable-decoder=mpeg_xvmc \
--disable-devices \
--disable-ffplay \
--disable-ffserver \
--disable-ffmpeg \
--enable-shared \
--enable-postproc \
--enable-gpl \
--enable-protocol=http \
--enable-pthreads \
`if test "$use_debug" = "no"; then echo --disable-debug; fi` \
`if test "$use_external_libfaad" = "yes"; then echo --enable-libfaad; fi`
elif test "$target_platform" = "i686-cm"; then
./configure \
--extra-cflags="-I$CANMORE_HOME/local/include -I$CANMORE_HOME/IntelCE/include -D_XBOX -DNDEBUG" \
--extra-ldflags="-L$CANMORE_HOME/local/lib -L$CANMORE_HOME/IntelCE/lib " \
--extra-libs="-lbz2 -lvpx" \
--arch=i686 \
--cpu=i686 \
--target_os="linux" \
--disable-muxers \
--disable-encoders \
--disable-decoder=mpeg_xvmc \
--disable-devices \
--disable-ffplay \
--disable-ffserver \
--disable-ffmpeg \
--enable-shared \
`if test "$DISABLE_FFMPEG_POSTPROC" = "0"; then echo --enable-postproc; else echo --disable-postproc; fi` \
--enable-gpl \
--enable-protocol=http \
--enable-pthreads \
--enable-libvpx \
--enable-zlib \
--enable-bzlib \
--disable-decoder=vp8 \
--cross-prefix=$CROSSBIN \
`if test "$use_debug" = "no"; then echo --disable-debug; fi` \
`if test "$use_external_libfaad" = "yes"; then echo --enable-libfaad; fi` &&
sed -i"" -e "s#define HAVE_SYMVER 1#define HAVE_SYMVER 0#" config.h &&
sed -i"" -e "s#define HAVE_SYMVER_GNU_ASM 1#define HAVE_SYMVER_GNU_ASM 0#" config.h
else
./configure \
--extra-cflags="-D_XBOX" \
--disable-static \
`if test "$use_debug" = "no"; then echo --disable-debug; fi` \
--disable-muxers \
--disable-encoders \
--disable-decoder=mpeg_xvmc \
--disable-devices \
--disable-ffplay \
--disable-ffserver \
--disable-ffmpeg \
--enable-shared \
--enable-postproc \
--enable-gpl \
`if test "$use_vdpau" = "yes"; then echo --enable-vdpau; fi` \
--enable-protocol=http \
--enable-pthreads \
`if test "$host_cpu" = "powerpc" || test "$host_cpu" = "powerpc64"; then echo --enable-pic; fi` \
--cc="$CC"
fi
], [$USE_EXTERNAL_FFMPEG])
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libdts], [
if test "$SUPPORT_DVD_LIBDTS" = 1; then
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
CFLAGS="-fPIC -fno-common $OSX_FLAGS" \
LDFLAGS="$OSX_FLAGS -mmacosx-version-min=$OSX" \
./configure \
--disable-oss \
--disable-solaris-audio \
--disable-al-audio \
--disable-win
elif test "$cross_compiling" != "yes"; then
./configure \
--disable-oss \
--disable-solaris-audio \
--disable-al-audio \
--disable-win \
CFLAGS="-fPIC"
else
save_cflags=$CFLAGS
CFLAGS="$CFLAGS -fPIC"
eval ./configure \
--disable-oss \
--disable-solaris-audio \
--disable-al-audio \
--disable-win $CROSSCOMPILE_FLAGS
CFLAGS=$save_cflags
fi
fi
], [$USE_EXTERNAL_LIBDTS])
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libdvd/libdvdread], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
./configure2 MACOSX_DEPLOYMENT_TARGET=$OSX \
--extra-cflags="$DVDREAD_CFLAGS -D__DARWIN__ -fPIC -DPIC -fno-common $OSX_FLAGS " \
--enable-static \
--disable-shared \
--cc="$CC" &&
make dvdread-config &&
mkdir -p `pwd`/../includes/dvdread
cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
elif test "$cross_compiling" != "yes"; then
./configure2 \
--extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC " \
--enable-static \
--disable-shared \
--cc="$CC" &&
make dvdread-config &&
mkdir -p `pwd`/../includes/dvdread
cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
else
./configure2 \
--extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC -I`pwd`/../libdvdcss/src $CFLAGS" \
--extra-ldflags="$LDFLAGS" \
--enable-static \
--disable-shared \
--cc="$CC" &&
make dvdread-config &&
mkdir -p `pwd`/../includes/dvdread
cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
fi
], [0])
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libdvd/libdvdnav], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
./configure2 MACOSX_DEPLOYMENT_TARGET=$OSX \
--extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC -fno-common $OSX_FLAGS -I`pwd`/../includes" \
--extra-ldflags="-L`pwd`/../libdvdread/obj" \
--with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
--enable-static \
--disable-shared \
--cc="$CC"
elif test "$cross_compiling" != "yes"; then
./configure2 \
--extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC -I`pwd`/../includes" \
--extra-ldflags="-L`pwd`/../libdvdread/obj" \
--with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
--enable-static \
--disable-shared \
--cc="$CC"
else
./configure2 \
--extra-cflags="$DVDREAD_CFLAGS -fPIC -DPIC -I`pwd`/../includes $CFLAGS" \
--extra-ldflags="-L`pwd`/../libdvdread/obj $LDFLAGS" \
--with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
--enable-static \
--disable-shared \
--cc="$CC"
fi
], [0])
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libfaad2], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
CFLAGS="-O3 -fPIC -fno-common $OSX_FLAGS" \
./configure MACOSX_DEPLOYMENT_TARGET=$OSX \
--with-pic \
--with-mp4v2
elif test "$cross_compiling" != "yes"; then
CFLAGS="-O3 -fPIC -fno-common" \
./configure \
--with-pic \
--with-mp4v2
else
save_cflags=$CFLAGS
CFLAGS="$CFLAGS -O3"
eval ./configure \
--with-pic \
--with-mp4v2 \
$CROSSCOMPILE_FLAGS
CFLAGS=$save_cflags
fi
], [0])
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/liba52], [
if test "$SUPPORT_DVD_LIBA52" = 1; then
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
CFLAGS="-fPIC -fno-common $OSX_FLAGS" \
./configure MACOSX_DEPLOYMENT_TARGET=$OSX \
--with-pic \
--disable-static \
--enable-shared \
--disable-oss \
--disable-solaris-audio \
--disable-win \
--disable-al-audio
elif test "$cross_compiling" != "yes"; then
./configure \
--with-pic \
--disable-static \
--enable-shared \
--disable-oss \
--disable-solaris-audio \
--disable-win \
--disable-al-audio \
CFLAGS=-fPIC
else
eval ./configure \
--with-pic \
--disable-static \
--enable-shared \
--disable-oss \
--disable-solaris-audio \
--disable-win \
--disable-al-audio \
$CROSSCOMPILE_FLAGS
fi
fi
], [$USE_EXTERNAL_LIBA52])
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libmpeg2], [
if test "$SUPPORT_DVD_LIBMPEG2" = "1"; then
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
CFLAGS="-fPIC -fno-common $OSX_FLAGS" \
./configure MACOSX_DEPLOYMENT_TARGET=$OSX \
--with-pic \
--disable-static \
--enable-shared \
--disable-directx \
--disable-sdl \
--without-x
elif test "$cross_compiling" != "yes"; then
./configure \
--with-pic \
--disable-static \
--enable-shared \
--disable-directx \
--disable-sdl \
--without-x
else
eval ./configure \
--with-pic \
--disable-static \
--enable-shared \
--disable-directx \
--disable-sdl \
--without-x $CROSSCOMPILE_FLAGS
fi
fi
], [$USE_EXTERNAL_LIBMPEG2])
XB_CONFIG_MODULE([xbmc/cores/dvdplayer/Codecs/libmad], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
CFLAGS="-fno-common $OSX_FLAGS" \
./configure MACOSX_DEPLOYMENT_TARGET=$OSX \
--with-pic
elif test "$cross_compiling" != "yes"; then
true
else
eval ./configure \
--with-pic $CROSSCOMPILE_FLAGS
fi
], 0)
XB_CONFIG_MODULE([xbmc/lib/cximage-6.0/zlib], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
export MACOSX_DEPLOYMENT_TARGET=$OSX
CFLAGS="-fPIC -fno-common $OSX_FLAGS" \
./configure
fi
], [0])
XB_CONFIG_MODULE([xbmc/lib/libass], [
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
CFLAGS="-m$ARCH_BITS -fPIC -fno-common $OSX_FLAGS" \
./configure MACOSX_DEPLOYMENT_TARGET=$OSX
elif test "$cross_compiling" != "yes"; then
CFLAGS="$CFLAGS -fPIC" \
./configure
else
eval PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure --disable-enca --disable-shave $CROSSCOMPILE_FLAGS
fi
], [$USE_EXTERNAL_LIBASS])
XB_CONFIG_MODULE([xbmc/lib/libid3tag/libid3tag],[
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
CFLAGS="$OSX_FLAGS -fno-common" \
CPPFLAGS="$OSX_FLAGS -fno-common" \
./configure MACOSX_DEPLOYMENT_TARGET=$OSX \
--disable-static \
--disable-debugging \
--with-pic
elif test "$cross_compiling" != "yes"; then
CFLAGS=-O3 \
./configure \
--disable-static \
--disable-debugging \
--with-pic
else
save_cflags="$CFLAGS"
CFLAGS="$CFLAGS -O3"
eval ./configure \
--disable-static \
--disable-debugging \
--with-pic $CROSSCOMPILE_FLAGS
CFLAGS="$save_cflags"
fi
], [0])
XB_CONFIG_MODULE([xbmc/visualizations/XBMCProjectM/libprojectM],[
if test "$host_vendor" = "apple"; then
rm -f CMakeCache.txt && cmake -D CMAKE_C_FLAGS:STRING="-fno-common" -D CMAKE_CXX_FLAGS:STRING="-fno-common" -D CMAKE_BUILD_TYPE:STRING=RelWithDebInfo -D USE_FTGL:BOOL=OFF .
elif test "$cross_compiling" != "yes"; then
rm -f CMakeCache.txt && CC="" CXX="" cmake -D CMAKE_BUILD_TYPE:STRING=RelWithDebInfo -D USE_FTGL:BOOL=OFF .
fi
], [`expr 1 - $BUILD_PROJECTM`])
XB_CONFIG_MODULE([xbmc/visualizations/Goom/goom2k4-0],[
if test "$host_vendor" = "apple" && test "$cross_compiling" != "yes"; then
./configure \
CFLAGS="$OSX_FLAGS" \
CXXFLAGS="$OSX_FLAGS"\
--disable-shared \
--enable-static \
--with-pic
elif test "$cross_compiling" != "yes"; then
./configure \
--disable-shared \
--enable-static \
--with-pic
fi
], [`expr 1 - $BUILD_GOOM`])
XB_CONFIG_MODULE([xbmc/screensavers/rsxs-0.9/], [
if test "$host_vendor" = "apple"; then
./configure \
CFLAGS="-fPIC $OSX_FLAGS" \
CXXFLAGS="-fPIC $OSX_FLAGS" \
LDFLAGS="-L/opt/local/lib" \
LIBS="-lz" \
--x-includes=/usr/X11/include --x-libraries=/usr/X11/lib \
--without-xscreensaver \
--disable-sound \
--disable-cyclone \
--disable-fieldlines \
--disable-flocks \
--disable-flux \
--disable-helios \
--disable-hyperspace \
--disable-lattice \
--disable-skyrocket \
--disable-image
else
./configure \
CFLAGS="-fPIC" \
CXXFLAGS="-fPIC" \
--without-xscreensaver \
--disable-sound \
--disable-cyclone \
--disable-fieldlines \
--disable-flocks \
--disable-flux \
--disable-helios \
--disable-hyperspace \
--disable-lattice \
--disable-skyrocket
fi
], [`expr 1 - $BUILD_RSXS`])
XB_CONFIG_MODULE([xbmc/lib/cximage-6.0/jpeg-turbo], [
if test "$host_vendor" = "apple"; then
LDFLAGS="$LDFLAGS" CFLAGS="$CFLAGS" CXXFLAGS="$CXXFLAGS" ./configure --without-simd $CROSSCOMPILE_FLAGS
else
eval PKG_CONFIG_PATH="$PKG_CONFIG_PATH" ./configure $CROSSCOMPILE_FLAGS
fi
], [0])
XB_CONFIG_MODULE([xbmc/lib/libbluray], [
eval ./configure \
--disable-examples \
$CROSSCOMPILE_FLAGS
], [0])
XB_CONFIG_MODULE([xbmc/lib/w_scan], [
# special case here, since we don't want to use iconv but rather glibc iconv
if test "$target_platform" = "i686-cm"; then
CC="$CC" LD="$LD" \
CFLAGS="-I$CANMORE_HOME/IntelCE/include -I$CANMORE_HOME/IntelCE/usr/include" \
LDFLAGS="-L$CANMORE_HOME/IntelCE/lib -L$CANMORE_HOME/IntelCE/usr/lib " \
./configure --host $host
elif test "$host_vendor" != "apple"; then
eval ./configure
fi
], [0])
XB_CONFIG_MODULE([xbmc/lib/libdvbpsi], [
if test "$cross_compiling" = "yes"; then
eval ./configure \
$CROSSCOMPILE_FLAGS
elif test "$host_vendor" != "apple"; then
eval ./configure
fi
], [0])
XB_CONFIG_MODULE([xbmc/lib/harfbuzz/harfbuzz], [
if test "$target_platform" = "i686-cm"; then
ac_cv_prog_have_icu=false \
FREETYPE_CFLAGS="-I$CANMORE_HOME/local/include/freetype2" \
FREETYPE_LIBS="-L$CANMORE_HOME/local/lib -lfreetype" \
GLIB_CFLAGS="-I$CANMORE_HOME/local/lib/glib-2.0/include -I$CANMORE_HOME/local/include/glib-2.0 -I$CANMORE_HOME/local/include/glib-2.0/include" \
GLIB_LIBS="-L$CANMORE_HOME/local/lib -lglib-2.0" PKG_CONFIG="" \
eval \
./configure \
$CROSSCOMPILE_FLAGS
else
eval ./configure \
ac_cv_prog_have_icu=false
fi
], [0])
AC_OUTPUT
final_message="$final_message\n prefix:\t$prefix\n$dashes"
echo -e "$final_message\n"