# 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. =="
-ffmpeg_vdpau_not_supported="== External ffmpeg doesn't support VDPAU. VDPAU support disabled. =="
dashes="------------------------"
final_message="\n XBMC Configuration:"
final_message="\n$dashes$final_message\n$dashes"
AC_ARG_ENABLE([pulse],
[AS_HELP_STRING([--enable-pulse],
- [enable PulseAudio support (default is no)])],
+ [enable PulseAudio support (default is auto)])],
[use_pulse=$enableval],
- [use_pulse=no])
+ [use_pulse=auto])
AC_ARG_ENABLE([ssh],
[AS_HELP_STRING([--disable-ssh],
[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=$use_external_libraries])
-
AC_ARG_ENABLE([libav-compat],
[AS_HELP_STRING([--enable-libav-compat],
[build a wrapper around libav to provide the functions needed by XBMC. This is
MAKE="${MAKE:-make}"
OBJDUMP="${OBJDUMP:-objdump}"
+use_external_ffmpeg=no
+use_static_ffmpeg=no
+
# ffmpeg needs the output of uname -s (e.x. linux, darwin) for the target_os
# there is no autoconf variable which will give
# the correct output format when doing cross compilation
if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
use_arch="x86"
use_cpu="i686"
+ else
+ target_platform=target_linux
fi
;;
x86_64-*-linux-gnu*|x86_64-*-linux-uclibc*)
if test "$use_cpu" = "no" -a "$cross_compiling" = "yes"; then
use_arch="x86_64"
use_cpu="x86_64"
+ else
+ target_platform=target_linux
fi
;;
i386-*-freebsd*)
fi
fi
fi
+if test "$target_platform" = "target_linux"; then
+ USE_STATIC_FFMPEG=1
+ use_static_ffmpeg=yes
+ AC_DEFINE([USE_STATIC_FFMPEG], [1], [link ffmpeg statically])
+ # ffmpeg may depend on gnutls and vorbisenc, we add those libs at the end of linker
+ # command in order to resolve any missing symbols
+ GNUTLS_ALL_LIBS=`${PKG_CONFIG} --static --libs-only-l --silence-errors gnutls`
+ VORBISENC_ALL_LIBS=`${PKG_CONFIG} --static --libs-only-l --silence-errors vorbisenc`
+fi
# Checks for library functions.
AC_FUNC_ALLOCA
XB_FIND_SONAME([VORBISFILE], [vorbisfile])
XB_FIND_SONAME([MODPLUG], [modplug])
XB_FIND_SONAME([ASS], [ass])
-XB_FIND_SONAME([MPEG2], [mpeg2])
+
+#link statically against mpeg2 on ios because of ios7
+#crash & burn if dyloaded
+if test "$ARCH" != "arm-osx" ; then
+ XB_FIND_SONAME([MPEG2], [mpeg2])
+fi
# Audio encoders
if test "x$use_libmp3lame" != "xno"; then
# libshairplay for AirTunes (prefered lib)
USE_AIRTUNES=0
if test "x$use_airtunes" != "xno"; then
- AC_CHECK_HEADERS([shairplay/raop.h],,
- [if test "x$use_airtunes" = "xyes"; then
- AC_MSG_ERROR($libshairplay_not_found)
- elif test "x$use_airtunes" != "xno"; then
- AC_MSG_NOTICE($libshairplay_not_found)
- use_airtunes="no"
- fi
+ AC_CHECK_HEADERS([shairplay/raop.h],USE_AIRTUNES=1,
+ [AC_MSG_NOTICE($libshairplay_not_found)
])
- if test "x$use_airtunes" != "xno"; then
- XB_FIND_SONAME([SHAIRPLAY], [shairplay], [use_airtunes])
- USE_AIRTUNES=1
- USE_LIBSHAIRPORT=1
+ if test "x$USE_AIRTUNES" != "x0"; then
+ XB_FIND_SONAME([SHAIRPLAY], [shairplay], [USE_AIRTUNES])
+ USE_LIBSHAIRPLAY=1
AC_CHECK_MEMBERS([struct raop_callbacks_s.cls],,,
[[#include <shairplay/raop.h>]])
AC_DEFINE([HAVE_LIBSHAIRPLAY],[1],["Define to 1 if you have libshairplay."])
#libshairport - as a fallback for AirTunes
if test "x$USE_AIRTUNES" == "x0"; then
- AC_CHECK_HEADERS([shairport/shairport.h],,
- [if test "x$use_airtunes" = "xyes"; then
- AC_MSG_ERROR($libshairport_not_found)
- elif test "x$use_airtunes" != "xno"; then
- AC_MSG_NOTICE($libshairport_not_found)
- use_airtunes="no"
- fi
+ AC_CHECK_HEADERS([shairport/shairport.h],USE_AIRTUNES=1,
+ [AC_MSG_NOTICE($libshairport_not_found)
])
- if test "x$use_airtunes" != "xno"; then
- XB_FIND_SONAME([SHAIRPORT], [shairport], [use_airtunes])
- USE_AIRTUNES=1
+ if test "x$USE_AIRTUNES" != "x0"; then
+ XB_FIND_SONAME([SHAIRPORT], [shairport], [USE_AIRTUNES])
AC_CHECK_MEMBERS([struct AudioOutput.ao_set_metadata],,,
[[#include <shairport/shairport.h>]])
AC_DEFINE([HAVE_LIBSHAIRPORT],[1],["Define to 1 if you have libshairport."])
fi
fi
+
+ if test "x$USE_AIRTUNES" == "x0"; then
+ if test "x$use_airtunes" == "xyes"; then
+ AC_MSG_ERROR("No airtunes library could be found. (libshairport/libshairplay)")
+ fi
+ use_airtunes="no"
+ fi
fi
# libudev
fi
if test "x$use_airtunes" != "xno"; then
- if test "x$USE_LIBSHAIRPORT" == "x1"; then
+ if test "x$USE_LIBSHAIRPLAY" == "x1"; then
final_message="$final_message\n AirTunes support (libshairplay):\tYes"
else
final_message="$final_message\n AirTunes support (libshairport):\tYes"
AC_SUBST(DISABLE_PROJECTM)
AC_SUBST(USE_SKIN_TOUCHED)
AC_SUBST(USE_EXTERNAL_FFMPEG)
+AC_SUBST(USE_STATIC_FFMPEG)
AC_SUBST(USE_LIBAV_HACKS)
AC_SUBST(PYTHON_VERSION)
AC_SUBST(OUTPUT_FILES)
AC_SUBST(GTEST_CONFIGURED)
AC_SUBST(USE_DOXYGEN)
AC_SUBST(USE_PVR_ADDONS)
+AC_SUBST(GNUTLS_ALL_LIBS)
+AC_SUBST(VORBISENC_ALL_LIBS)
# pushd and popd are not available in other shells besides bash, so implement
# our own pushd/popd functions
--disable-ffserver \
--disable-ffmpeg \
--disable-crystalhd \
- --enable-shared \
+ `if test "$use_static_ffmpeg" = "yes"; then echo --enable-static; else echo --enable-shared; fi` \
--disable-doc \
--enable-postproc \
--enable-gpl \
--disable-strip \
--disable-opts \
--cc="$CC" &&
- $MAKE dvdread-config &&
mkdir -p `pwd`/../includes/dvdread
cp `pwd`/../libdvdread/src/*.h `pwd`/../includes/dvdread
cp `pwd`/../libdvdread/src/dvdread/*.h `pwd`/../includes/dvdread
./configure2 \
--extra-cflags="$CFLAGS $DVDREAD_CFLAGS -I`pwd`/../includes $DROID_DVDLIB_SEEK64" \
--extra-ldflags="-L`pwd`/../libdvdread/obj" \
- --with-dvdread-config="`pwd`/../libdvdread/obj/dvdread-config" \
+ --with-dvdread-config="`pwd`/../dvdread-config" \
--prefix="${prefix}" --includedir="${includedir}" --libdir="${libdir}" --datadir="${datadir}" \
--host=$host_alias \
--build=$build_alias \