X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=contrib%2Fbootstrap;h=32db64292d0588c56223cfa05651dbbb6fad40df;hb=3ce29fe10e2e9813452abbbd1a0aaaea07a57411;hp=b24310f04194fdb33df6a2a8e87d2b97128162ac;hpb=0b6859731361d6fea1c1249453ea428168b4b477;p=vlc diff --git a/contrib/bootstrap b/contrib/bootstrap index b24310f041..32db64292d 100755 --- a/contrib/bootstrap +++ b/contrib/bootstrap @@ -28,6 +28,7 @@ usage() echo " --enable-FOO configure to build package FOO" echo " --disable-disc configure to not build optical discs packages" echo " --disable-sout configure to not build stream output packages" + echo " --enable-small optimize libraries for size with slight speed decrease [DANGEROUS]" } BUILD= @@ -66,6 +67,9 @@ do --disable-sout) BUILD_ENCODERS= ;; + --enable-small) + ENABLE_SMALL=1 + ;; --disable-*) PKGS_DISABLE="${PKGS_DISABLE} ${1#--disable-}" ;; @@ -137,9 +141,31 @@ add_make_enabled() done } +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}" ] + then + echo " +*** ${SDK} does not exist, please install required SDK, or use export OSX_VERSION=10.6 *** +" + exit 1 + fi + add_make "OSX_VERSION ?= ${OSX_VERSION}" +} + +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" +} + 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 "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL" # # Checks @@ -147,6 +173,7 @@ 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*) @@ -155,6 +182,11 @@ case "${OS}" in *bsd*) add_make_enabled "HAVE_BSD" ;; + linux-androideabi) + check_android_sdk + add_make_enabled "HAVE_LINUX" "HAVE_ANDROID" + add_make "PATH = ${ANDROID_NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin/:${PATH}" + ;; *linux*) add_make_enabled "HAVE_LINUX" ;; @@ -174,19 +206,18 @@ ln -sf ../../contrib/src/main.mak Makefile cat << EOF Bootstrap completed. -The following packages were selected: -$PKGS - 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