[droid] splash: adjust progressbar color
[vuplus_xbmc] / configure.in
index 3327487..beb58c1 100644 (file)
@@ -2,7 +2,7 @@
 # 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])
@@ -130,7 +130,8 @@ vtbdecoder_enabled="== VTBDecoder support enabled. =="
 vtbdecoder_disabled="== VTBDecoder support manually disabled. =="
 openmax_disabled="== OpenMax support manually disabled. =="
 openmax_not_found="== Could not find libnvomx. OpenMax support disabled. =="
-ssh_not_found="== Could not find libssh. SSH FTP VFS support disabled. =="
+ssh_not_found="== Could not find libssh. =="
+ssh_disabled="== SSH SFTP disabled. =="
 librtmp_not_found="== Could not find libRTMP. RTMP support disabled. =="
 librtmp_disabled="== RTMP support disabled. =="
 libnfs_not_found="== Could not find libnfs. NFS client support disabled. =="
@@ -331,6 +332,12 @@ AC_ARG_ENABLE([pulse],
   [use_pulse=$enableval],
   [use_pulse=no])
 
+AC_ARG_ENABLE([ssh],
+  [AS_HELP_STRING([--disable-ssh],
+  [disable SSH SFTP support (default is enabled)])],
+  [use_ssh=$enableval],
+  [use_ssh=yes])
+
 AC_ARG_ENABLE([rtmp],
   [AS_HELP_STRING([--enable-rtmp],
   [enable RTMP support via librtmp (default is auto)])],
@@ -582,13 +589,7 @@ case $host in
      use_dvdcss=no
      use_gles=yes
      use_cpu=cortex-a8
-     check_sdl_arch=[`file /opt/local/lib/libSDL_image.dylib | awk '{V=7; print $V}'`]
-     if test "x$check_sdl_arch" = "xi386"; then
-       use_texturepacker_native=yes
-       USE_TEXTUREPACKER_NATIVE_ROOT="/opt/local"
-     else
-       use_texturepacker=no
-     fi
+     use_texturepacker_native=yes
      ARCH="arm-osx"
      use_arch="arm"
      PYTHON_VERSION="2.6"
@@ -602,7 +603,6 @@ case $host in
      use_joystick=no
      use_vtbdecoder=no
      use_texturepacker_native=yes
-     USE_TEXTUREPACKER_NATIVE_ROOT="$prefix"
      ARCH="x86-osx"
      AC_SUBST(ARCH_DEFINES, "-DTARGET_POSIX -DTARGET_DARWIN -DTARGET_DARWIN_OSX -D_LINUX")
      ;;
@@ -717,8 +717,8 @@ if test "$use_optimizations" = "yes"; then
     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"
@@ -811,8 +811,39 @@ AC_CHECK_FUNCS([atexit dup2 fdatasync floor fs_stat_dev ftime ftruncate getcwd g
 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]),)
@@ -931,7 +962,6 @@ AC_CHECK_LIB([ssl],         [main],, AC_MSG_ERROR($missing_library))
 if test "$use_mysql" = "yes"; then
   AC_CHECK_LIB([mysqlclient], [main],, AC_MSG_ERROR($missing_library))
 fi
-AC_CHECK_LIB([ssh],         [sftp_tell64],, AC_MSG_RESULT([Could not find suitable version of libssh]))
 AC_CHECK_LIB([bluetooth],   [hci_devid],, AC_MSG_RESULT([Could not find suitable version of libbluetooth]))
 AC_CHECK_LIB([yajl],        [main],, AC_MSG_ERROR($missing_library))
 AC_CHECK_LIB([tinyxml],     [main],, AC_MSG_ERROR($missing_library))
@@ -1111,15 +1141,18 @@ if test "x$use_pulse" != "xno"; then
     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)
@@ -1242,6 +1275,14 @@ else
   USE_SKIN_TOUCHED=0
 fi
 
+# libssh
+if test "x$use_ssh" = "xno"; then
+  AC_MSG_NOTICE($ssh_disabled)
+  use_libssh="no"
+else
+  AC_CHECK_LIB([ssh], [sftp_tell64],, AC_MSG_ERROR($ssh_not_found))
+  AC_DEFINE([HAVE_LIBSSH], [1], [Whether to use libSSH library.])
+fi
 
 # libRTMP
 if test "$use_librtmp" != "no"; then
@@ -1344,7 +1385,7 @@ fi
 # 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
@@ -1442,9 +1483,9 @@ 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
     if test "x$use_libcec" != "xauto"; then
-      PKG_CHECK_MODULES([CEC],[libcec >= 1.8.0],,[use_libcec="no";AC_MSG_ERROR($libcec_disabled)])
+      PKG_CHECK_MODULES([CEC],[libcec >= 2.0.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)])
+      PKG_CHECK_MODULES([CEC],[libcec >= 2.0.0],,[use_libcec="no";AC_MSG_RESULT($libcec_disabled)])
     fi
 
     if test "x$use_libcec" != "xno"; then
@@ -2113,7 +2154,7 @@ else
 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
@@ -2144,6 +2185,12 @@ else
   USE_WEB_SERVER=0
 fi
 
+if test "$use_libssh" != "no"; then
+  final_message="$final_message\n  libssh support:\tYes"
+else
+  final_message="$final_message\n  libssh support:\tNo"
+fi
+
 if test "$use_librtmp" != "no"; then
   final_message="$final_message\n  libRTMP support:\tYes"
 else
@@ -2329,7 +2376,6 @@ OUTPUT_FILES="Makefile \
     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 \
@@ -2717,11 +2763,15 @@ XB_CONFIG_MODULE([lib/gtest], [
 ], [$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" \