# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
-AC_INIT([xbmc], [11.9.7], [http://trac.xbmc.org])
+AC_INIT([xbmc], [12.0b1], [http://trac.xbmc.org])
AC_CONFIG_HEADERS([xbmc/config.h])
AH_TOP([#pragma once])
m4_include([m4/ax_python_devel.m4])
CXXFLAGS="$CXXFLAGS"
CFLAGS="$CFLAGS"
else
- CXXFLAGS="$CXXFLAGS -O2"
- CFLAGS="$CFLAGS -O2"
+ CXXFLAGS="-O2 $CXXFLAGS"
+ CFLAGS="-O2 $CFLAGS"
fi
else
final_message="$final_message\n Optimization:\tNo"
AC_CHECK_SIZEOF([int])
AC_CHECK_SIZEOF([size_t])
+# Check for intrinsics
+AC_MSG_CHECKING([for __sync_add_and_fetch(temp, 1)])
+AC_TRY_COMPILE([],[long* temp=0; __sync_add_and_fetch(temp, 1);],
+ [have_builtin_sync_add_and_fetch=yes],
+ [have_builtin_sync_add_and_fetch=no])
+AC_MSG_RESULT($have_builtin_sync_add_and_fetch)
+if test "x$have_builtin_sync_add_and_fetch" = "xyes"; then
+ AC_DEFINE(HAS_BUILTIN_SYNC_ADD_AND_FETCH, 1,
+ [Define to 1 if your compiler supports the __sync_add_and_fetch() intrinsic.])
+fi
+
+AC_MSG_CHECKING([for __sync_sub_and_fetch(temp, 1)])
+AC_TRY_COMPILE([],[long* temp=0; __sync_sub_and_fetch(temp, 1);],
+ [have_builtin_sync_sub_and_fetch=yes],
+ [have_builtin_sync_sub_and_fetch=no])
+AC_MSG_RESULT($have_builtin_sync_sub_and_fetch)
+if test "x$have_builtin_sync_sub_and_fetch" = "xyes"; then
+ AC_DEFINE(HAS_BUILTIN_SYNC_SUB_AND_FETCH, 1,
+ [Define to 1 if your compiler supports the __sync_sub_and_fetch() intrinsic.])
+fi
+
+AC_MSG_CHECKING([for __sync_val_compare_and_swap(temp, 1, 1)])
+AC_TRY_COMPILE([],[long *temp = 0; __sync_val_compare_and_swap(temp, 1, 1);],
+ [have_builtin_sync_val_compare_and_swap=yes],
+ [have_builtin_sync_val_compare_and_swap=no])
+AC_MSG_RESULT($have_builtin_sync_val_compare_and_swap)
+if test "x$have_builtin_sync_val_compare_and_swap" = "xyes"; then
+ AC_DEFINE(HAS_BUILTIN_SYNC_VAL_COMPARE_AND_SWAP, 1,
+ [Define to 1 if your compiler supports the __sync_val_compare_and_swap() intrinsic.])
+fi
+
# Add top source directory for all builds so we can use config.h
-INCLUDES="$INCLUDES -I\$(abs_top_srcdir)"
+INCLUDES="-I\$(abs_top_srcdir) $INCLUDES"
# Check inotify availability
AC_CHECK_HEADER([sys/inotify.h], AC_DEFINE([HAVE_INOTIFY],[1],[Define if we have inotify]),)
fi
USE_PULSE=0
else
- AC_CHECK_LIB([pulse], [main],,
- [if test "x$use_pulse" = "xyes"; then
- AC_MSG_ERROR($pulse_not_found)
- else
- use_pulse=no
- USE_PULSE=0
- AC_MSG_RESULT($pulse_not_found)
- fi])
+ AC_CHECK_LIB([pulse],[main],,pulse_found="no")
+ AC_CHECK_LIB([pulse-simple],[main],,pulse_found="no")
+
+ if test "x$pulse_found" != "xno"; then
USE_PULSE=1
+ elif test "x$use_pulse" = "xyes"; then
+ AC_MSG_ERROR($pulse_not_found)
+ else
+ use_pulse=no
+ USE_PULSE=0
+ AC_MSG_RESULT($pulse_not_found)
+ fi
fi
else
AC_MSG_RESULT($pulse_disabled)
# libshairport for AirTunes
USE_AIRTUNES=0
if test "x$use_airtunes" != "xno"; then
- AC_CHECK_HEADERS([shairport/shairport.h shairport/ao.h],,
+ 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
fi
if test "$use_asap" = "yes"; then
- AC_CHECK_PROG(HAVE_GDC,gdc,"yes","no")
+ AC_CHECK_PROGS(HAVE_GDC,gdc-4.4 gdc-4.3 gdc,"no")
if test "$HAVE_GDC" = "no"; then
AC_MSG_ERROR($missing_program);
fi
xbmc/visualizations/Goom/Makefile \
xbmc/visualizations/OpenGLSpectrum/Makefile \
xbmc/visualizations/WaveForm/Makefile \
- xbmc/visualizations/iTunes/Makefile \
lib/addons/library.xbmc.addon/Makefile \
lib/addons/library.xbmc.gui/Makefile \
lib/addons/library.xbmc.pvr/Makefile \
], [$SKIP_CONFIG_GTEST])
XB_CONFIG_MODULE([pvr-addons], [
+ if test "$USE_EXTERNAL_FFMPEG" = 1; then
+ PVR_EXT_FFMPEG="--enable-external-ffmpeg"
+ fi
./configure \
--prefix="${prefix}" \
--host=$host_alias \
--build=$build_alias \
--target=$target_alias \
+ $PVR_EXT_FFMPEG \
CC="$CC" \
CXX="$CXX" \
CFLAGS="$CFLAGS" \