From: Rafaël Carré Date: Sat, 26 Nov 2011 18:38:16 +0000 (-0500) Subject: contrib: error out early if MacOSX SDK doesn't exist X-Git-Tag: 1.3.0-git~37 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=7d7b602579db4b59a321b243bba882596e9f277f;p=vlc contrib: error out early if MacOSX SDK doesn't exist --- diff --git a/contrib/bootstrap b/contrib/bootstrap index b24310f041..e997007532 100755 --- a/contrib/bootstrap +++ b/contrib/bootstrap @@ -137,6 +137,20 @@ 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}" +} + 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" @@ -147,6 +161,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*) diff --git a/contrib/src/main.mak b/contrib/src/main.mak index 815f18a19c..7f10e76aad 100644 --- a/contrib/src/main.mak +++ b/contrib/src/main.mak @@ -90,7 +90,6 @@ endif endif ifdef HAVE_MACOSX -OSX_VERSION?=10.5 MACOSX_SDK=/Developer/SDKs/MacOSX$(OSX_VERSION).sdk CC=gcc-4.2 CXX=g++-4.2