X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=contrib%2Fbootstrap;h=f0bfe917f754163fab4b783895cfa1a3aaa36d13;hb=7696f44d85d0a6653ea92602b351e8bdd03289fa;hp=170b8f128988dcc958bddd1ad43532206360be67;hpb=a8fe060f3f5e17af2aa7b7bafb599b80e4a3181f;p=vlc diff --git a/contrib/bootstrap b/contrib/bootstrap index 170b8f1289..f0bfe917f7 100755 --- a/contrib/bootstrap +++ b/contrib/bootstrap @@ -27,7 +27,10 @@ usage() echo " --disable-FOO configure to not build package FOO" echo " --enable-FOO configure to build package FOO" echo " --disable-disc configure to not build optical discs packages" + echo " --disable-net configure to not build networking packages" echo " --disable-sout configure to not build stream output packages" + echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]" + echo " --disable-gpl configure to not build viral GPL code" } BUILD= @@ -36,7 +39,9 @@ PREFIX= PKGS_ENABLE= PKGS_DISABLE= BUILD_ENCODERS="1" +BUILD_NETWORK="1" BUILD_DISCS="1" +GPL="1" if test ! -f "../../contrib/src/main.mak" then @@ -63,9 +68,18 @@ do --disable-disc) BUILD_DISCS= ;; + --disable-net) + BUILD_NETWORK= + ;; --disable-sout) BUILD_ENCODERS= ;; + --enable-small) + ENABLE_SMALL=1 + ;; + --disable-gpl) + GPL= + ;; --disable-*) PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}" ;; @@ -109,7 +123,7 @@ fi # Prepare files # echo "Creating configuration file... config.mak" -exec 3>config.mak +exec 3>config.mak || exit $? cat >&3 << EOF # This file was automatically generated. # Any change will be overwritten if ../bootstrap is run again. @@ -139,15 +153,27 @@ add_make_enabled() check_macosx_sdk() { - [ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.5" && OSX_VERSION=10.5 - SDK="/Developer/SDKs/MacOSX${OSX_VERSION}.sdk" - if [ ! -d "${SDK}" ] + [ -z "${OSX_VERSION}" ] && echo "OSX_VERSION not specified, assuming 10.7" && OSX_VERSION=10.7 + if test -z "$SDKROOT" + then + SDKROOT=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk + echo "SDKROOT not specified, assuming $SDKROOT" + fi + + if [ ! -d "${SDKROOT}" ] + then + SDKROOT_NOT_FOUND=`xcode-select -print-path`/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$OSX_VERSION.sdk + SDKROOT=`xcode-select -print-path`/SDKs/MacOSX$OSX_VERSION.sdk + echo "SDKROOT not found at $SDKROOT_NOT_FOUND, trying $SDKROOT" + fi + + if [ ! -d "${SDKROOT}" ] then - echo " -*** ${SDK} does not exist, please install required SDK, or use export OSX_VERSION=10.6 *** -" - exit 1 + echo "*** ${SDKROOT} does not exist, please install required SDK, or set SDKROOT manually. ***" + exit 1 fi + + add_make "MACOSX_SDK=${SDKROOT}" add_make "OSX_VERSION ?= ${OSX_VERSION}" } @@ -155,12 +181,19 @@ check_android_sdk() { [ -z "${ANDROID_NDK}" ] && echo "You must set ANDROID_NDK environment variable" && exit 1 add_make "ANDROID_NDK := ${ANDROID_NDK}" - test -z "${NO_NEON}" && add_make_enabled "HAVE_NEON" + [ -z "${ANDROID_ABI}" ] && echo "You must set ANDROID_ABI environment variable" && exit 1 + add_make "ANDROID_ABI := ${ANDROID_ABI}" + [ ${ANDROID_ABI} = "armeabi-v7a" ] && add_make_enabled "HAVE_NEON" + [ ${ANDROID_ABI} = "armeabi-v7a" ] && add_make_enabled "HAVE_ARMV7A" + [ ${ANDROID_ABI} = "armeabi" -a -z "${NO_ARMV6}" ] && add_make_enabled "HAVE_ARMV6" } test -z "$PREFIX" || add_make "PREFIX := $PREFIX" test -z "$BUILD_DISCS" || add_make_enabled "BUILD_DISCS" test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS" +test -z "$BUILD_NETWORK" || add_make_enabled "BUILD_NETWORK" +test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL" +test -z "$GPL" || add_make_enabled "GPL" # # Checks @@ -168,18 +201,31 @@ test -z "$BUILD_ENCODERS" || add_make_enabled "BUILD_ENCODERS" OS="${HOST#*-}" # strip architecture case "${OS}" in apple-darwin*) - check_macosx_sdk - add_make_enabled "HAVE_MACOSX" "HAVE_DARWIN_OS" "HAVE_BSD" - ;; - *darwin*) - add_make_enabled "HAVE_DARWIN_OS" "HAVE_BSD" + if test -z "$BUILDFORIOS" + then + check_macosx_sdk + add_make_enabled "HAVE_MACOSX" "HAVE_DARWIN_OS" "HAVE_BSD" + else + add_make_enabled "HAVE_IOS" "HAVE_DARWIN_OS" "HAVE_BSD" "HAVE_NEON" "HAVE_ARMV7A" + fi ;; *bsd*) add_make_enabled "HAVE_BSD" ;; - linux-androideabi) + *android*) check_android_sdk add_make_enabled "HAVE_LINUX" "HAVE_ANDROID" + case "${HOST}" in + *arm*) + add_make "PLATFORM_SHORT_ARCH := arm" + ;; + *i686*) + add_make "PLATFORM_SHORT_ARCH := x86" + ;; + *mipsel*) + add_make "PLATFORM_SHORT_ARCH := mips" + ;; + esac ;; *linux*) add_make_enabled "HAVE_LINUX" @@ -196,7 +242,7 @@ esac # Results output # test -e Makefile && unlink Makefile -ln -sf ../../contrib/src/main.mak Makefile +ln -sf ../../contrib/src/main.mak Makefile || exit $? cat << EOF Bootstrap completed. @@ -204,12 +250,14 @@ Run "make" to start compilation. Other targets: * make install same as "make" + * make prebuilt fetch and install prebuilt binaries + * make list list packages * make fetch fetch required source tarballs * make fetch-all fetch all source tarballs * make distclean clean everything and undo bootstrap * make mostlyclean clean everything except source tarballs * make clean clean everything - * make list list packages + * make package prepare prebuilt packages EOF -mkdir -p ../../contrib/tarballs +mkdir -p ../../contrib/tarballs || exit $?