]> git.sesse.net Git - vlc/blobdiff - extras/contrib/bootstrap
Fluidsynth: revector initialization, no functional changes
[vlc] / extras / contrib / bootstrap
index c93ef31330891f081b05191350d8e246f6c41282..f45a7217f70d9f6847f3d36fef7a1d6f8dd38d2d 100755 (executable)
@@ -192,6 +192,9 @@ case $TARGET in
     *wince*)
         add_enabled_makefile_cfg "HAVE_WINCE"
     ;;
+    *symbian*)
+        add_enabled_makefile_cfg "HAVE_SYMBIAN"
+    ;;
 esac
 
 # Figure out the correct distro to use
@@ -207,9 +210,6 @@ case $TARGET in
 
         CFLAGS_TUNING=" -arch ppc -mtune=G4"
         EXTRA_LDFLAGS=" -arch ppc"
-
-        # FIXME - this one seems to be redundant?
-        LD="ld -arch ppc -syslibroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
     ;;
     i686-apple-darwin*)
         hint_distro macosx32
@@ -259,12 +259,10 @@ case $TARGET in
     ;;
     arm-none-linux-gnueabi)
         if test -f /etc/maemo_version; then
-            hint_distro maemo
+            hint_distro maemo5
             EXTRA_CFLAGS=" -mcpu=cortex-a8 -mtune=cortex-a8 -march=armv7-a"
             EXTRA_CFLAGS="$EXTRA_CFLAGS -mfpu=neon -mfloat-abi=softfp"
             EXTRA_CFLAGS="$EXTRA_CFLAGS -O3 -fno-tree-vectorize"
-        else
-            EXTRA_CFLAGS="-msoft-float"
         fi
     ;;
     *86_64*linux*)
@@ -294,7 +292,7 @@ if test -z "${DISTRO}" -a "$TARGET" = "$BUILD"; then
     if test -f /etc/fedora-release; then
         hint_distro fedora
     elif test -f /etc/maemo_version; then
-        hint_distro maemo
+        hint_distro maemo5
     elif test -f /etc/debian_version; then
         # NOTE: check for Debian *after* its derivatives
         hint_distro debian
@@ -322,12 +320,16 @@ case "$DISTRO" in
     add_makefile_cfg "IOS_SDK_ROOT = ${IOS_SDK_ROOT}"
     ;;
   macosx*)
-    SDK_TARGET=10.5
+    SDK_TARGET=10.6
     HAVE_MACOSX_DARWIN_9=1
     EXTRA_LDFLAGS="${EXTRA_LDFLAGS} -isysroot \${MACOSX_SDK} -Wl,-syslibroot,\${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
     EXTRA_CFLAGS="${EXTRA_CFLAGS} -D\${ENVP} -isysroot \${MACOSX_SDK} -mmacosx-version-min=\${SDK_TARGET}"
-    CC="/usr/bin/gcc-4.2"
-    CXX="/usr/bin/g++-4.2"
+    CC="/usr/bin/clang"
+    CXX="/usr/bin/clang++"
+    LD="ld"
+    RANLIB="ranlib"
+    AR=
+    STRIP="strip"
     add_makefile_cfg "PATH = /bin:/usr/bin:/usr/local/bin"
     add_makefile_cfg "SDK_TARGET = ${SDK_TARGET}"
     add_makefile_cfg "ENVP = MACOSX_DEPLOYMENT_TARGET=${SDK_TARGET}"
@@ -358,8 +360,8 @@ case "$DISTRO" in
     fi
     # The given host (arm-eabi) is not the real one (arm-linux-androideabi)
     ln -sfn $TARGET hosts/arm-linux-androideabi
-    CC="arm-linux-androideabi-gcc -nostdlib -lc -lgcc"
-    CXX="arm-linux-androideabi-g++ -nostdlib -lc -lgcc"
+    CC="arm-linux-androideabi-gcc --sysroot=$ANDROID_NDK/platforms/android-9/arch-arm"
+    CXX="arm-linux-androideabi-g++ --sysroot=$ANDROID_NDK/platforms/android-9/arch-arm"
     NM=arm-linux-androideabi-nm
     AR=arm-linux-androideabi-ar
     LD=arm-linux-androideabi-ld
@@ -368,7 +370,18 @@ case "$DISTRO" in
     # Add the PATH to the NDK
     add_makefile_cfg "ANDROID_NDK = ${ANDROID_NDK}"
     add_makefile_cfg "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}"
+
     add_enabled_makefile_cfg "HAVE_LINUX"
+    if test -z "$NO_NEON"; then
+        add_enabled_makefile_cfg "HAVE_NEON"
+        ARM_EABI=armeabi-v7a
+    else
+        ARM_EABI=armeabi
+    fi
+    # make sure android toolchain can build C++
+    EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -D__STDC_VERSION__=199901L"
+    EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/include"
+    EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++/libs/$ARM_EABI/include"
 esac
 
 # Save passed flags
@@ -399,18 +412,24 @@ add_makefile_cfg "EXTRA_LDFLAGS = ${EXTRA_LDFLAGS}"
 add_makefile_cfg "EXTRA_PATH = ${EXTRA_PATH}"
 
 #CMAKE
-if test "$TARGET" != "$BUILD"; then
-    toolchain_cmake="${BUILDDIR}/toolchain.cmake"
-    if test ${DISTRO} = "win32"; then
-        echo "SET(CMAKE_SYSTEM_NAME Windows)" >> "${toolchain_cmake}"
-    fi
-    echo "SET(CMAKE_C_COMPILER ${CC})" >> "${toolchain_cmake}"
-    echo "SET(CMAKE_CXX_COMPILER ${CXX})" >> "${toolchain_cmake}"
-    echo "SET(CMAKE_FIND_ROOT_PATH  `pwd` )" >> "${toolchain_cmake}"
-    echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> "${toolchain_cmake}"
-    echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> "${toolchain_cmake}"
-    echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> "${toolchain_cmake}"
+toolchain_cmake="${BUILDDIR}/toolchain.cmake"
+rm -f ${BUILDDIR}/toolchain.cmake
+if test ${DISTRO} = "win32"; then
+    echo "SET(CMAKE_SYSTEM_NAME Windows)" >> "${toolchain_cmake}"
+    echo "SET(CMAKE_RC_COMPILER ${TARGET}-windres)" >> "${toolchain_cmake}"
 fi
+case "$DISTRO" in macosx*)
+    echo "SET(CMAKE_SYSTEM_NAME Darwin)" >> "${toolchain_cmake}"
+    echo "set(CMAKE_C_FLAGS ${CFLAGS_TUNING} ${EXTRA_CFLAGS})" >> "${toolchain_cmake}"
+    echo "set(CMAKE_CXX_FLAGS ${CFLAGS_TUNING} ${EXTRA_CFLAGS})" >> "${toolchain_cmake}"
+    echo "set(CMAKE_LD_FLAGS ${EXTRA_LDFLAGS})" >> "${toolchain_cmake}"
+esac
+echo "SET(CMAKE_C_COMPILER ${CC})" >> "${toolchain_cmake}"
+echo "SET(CMAKE_CXX_COMPILER ${CXX})" >> "${toolchain_cmake}"
+echo "SET(CMAKE_FIND_ROOT_PATH  `pwd` )" >> "${toolchain_cmake}"
+echo "set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)" >> "${toolchain_cmake}"
+echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)" >> "${toolchain_cmake}"
+echo "set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)" >> "${toolchain_cmake}"
 
 if wget --version >/dev/null 2>&1; then
     add_makefile_cfg "WGET = \"`which wget`\" -c --passive"
@@ -444,26 +463,26 @@ fi
 
 if test $HAVE_MACOSX_DARWIN_9; then
     add_enabled_makefile_cfg "HAVE_MACOSX_DARWIN_9"
-    if ! /usr/bin/gcc-4.2 --version>/dev/null 2>&1; then
-        error "You do not have GCC-4.2 installed in /usr/bin, compilation WILL FAIL."
+    if ! /usr/bin/gcc --version>/dev/null 2>&1; then
+        error "You do not have GCC installed in /usr/bin, compilation WILL FAIL."
     fi
 fi
 
 if test "$DISTRO" = "macosx32"; then
     info "*****************************************************************"
-    info "* VLC will be compiled in 32bit mode.                           *"
+    info "* VLC will be compiled in 32bit mode using the 10.5 & later SDK.*"
     info "*                                                               *"
-    info "* Re-run with the x86_64-apple-darwin* argument to turn on      *"
+    info "* Re-run with the -t x86_64-apple-darwin* argument to turn on   *"
     info "* 64bit compilation for Intel-based Macs, whereas * is either   *"
     info "* 9 or 10 depending on your Darwin version.                     *"
-    info "* There is NO PPC64 support right now.                          *"
+    info "* There is no PPC64 support.                                    *"
     info "*****************************************************************"
 fi
 
 if test "$DISTRO" = "macosx64"; then
     info
     info "*****************************************************************"
-    info "* VLC will be compiled in 64bit mode using the 10.5 SDK.        *"
+    info "* VLC will be compiled in 64bit mode using the 10.5 & later SDK.*"
     info "*****************************************************************"
 fi
 
@@ -471,9 +490,9 @@ case `uname` in
     Linux)
         CPUS=`grep -c ^processor /proc/cpuinfo`
      ;;
-    Darwin)
-        CPUS=`sysctl hw.ncpu|cut -d: -f2`
-    ;;
+#    Darwin)
+#        CPUS=`sysctl hw.ncpu|cut -d: -f2`
+#    ;;
     *)
         CPUS=1  # default
      ;;