]> git.sesse.net Git - vlc/blobdiff - contrib/bootstrap
Contrib: UPNP: enable IPv6 and re-enable webserver (broken in 1.6.17).
[vlc] / contrib / bootstrap
index 32db64292d0588c56223cfa05651dbbb6fad40df..a0a7244c1032f898d3c40335515eba9ea9a42cc5 100755 (executable)
@@ -143,23 +143,46 @@ 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.6" && OSX_VERSION=10.6
+   if test -z "$SDKROOT"
    then
-          echo "
-*** ${SDK} does not exist, please install required SDK, or use export OSX_VERSION=10.6 ***
-"
-          exit 1
+      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
+      echo "*** ${SDKROOT} does not exist, please install required SDK, or set SDKROOT manually. ***"
+      exit 1
+   fi
+
    add_make "OSX_VERSION ?= ${OSX_VERSION}"
 }
 
+check_ios_sdk()
+{
+       if test -z "$SDKROOT"
+       then
+               SDKROOT=`xcode-select -print-path`/Platforms/iPhone${PLATFORM}.platform/Developer/SDKs/iPhone${PLATFORM}${SDK_VERSION}.sdk
+               echo "SDKROOT not specified, assuming $SDKROOT"
+       else
+               SDKROOT="$SDKROOT"
+       fi
+
+       if [ ! -d "${SDKROOT}" ]
+       then
+               echo "*** ${SDKROOT} does not exist, please install required SDK, or set SDKROOT manually. ***"
+               exit 1
+       fi
+       add_make "SDKROOT=${SDKROOT}"
+}
+
 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 -n "${TEGRA2}" && add_make_enabled "HAVE_TEGRA2"
 }
 
 test -z "$PREFIX" || add_make "PREFIX := $PREFIX"
@@ -173,11 +196,14 @@ test -z "$ENABLE_SMALL" || add_make_enabled "ENABLE_SMALL"
 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
+                       check_ios_sdk
+                       add_make_enabled "HAVE_IOS" "HAVE_DARWIN_OS" "HAVE_BSD"
+               fi
                ;;
        *bsd*)
                add_make_enabled "HAVE_BSD"