VirtualBox

Changeset 51645 in vbox


Ignore:
Timestamp:
Jun 18, 2014 11:29:10 AM (10 years ago)
Author:
vboxsync
Message:

Request to specify custom Xcode path in ./configure script (for Mountain Lion+ hosts).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/configure

    r50261 r51645  
    21172117
    21182118#
     2119# Check Xcode path
     2120#
     2121check_xcode_sdk_path()
     2122{
     2123    # Check if WITH_XCODE_DIR is set.
     2124    if [ -z "$WITH_XCODE_DIR" ]; then
     2125        echo "Please specify --with-xcode-dir option."
     2126        return 0
     2127    fi
     2128
     2129    # Check if specified path exists and is a directory.
     2130    if [ -d "$1" ]; then
     2131        return 1
     2132    else
     2133        echo "Xcode path [$1] not found."
     2134        return 0
     2135    fi
     2136}
     2137
     2138#
    21192139# Determines the Darwin version.
    21202140# @todo This should really check the Xcode/SDK version.
     
    21252145  darwin_ver=`uname -r`
    21262146  case "$darwin_ver" in
     2147    14\.*)
     2148      check_xcode_sdk_path "$WITH_XCODE_SDK_DIR"
     2149      [ $? -eq 1 ] || fail
     2150      darwin_ver="10.10" # Yosemite
     2151      sdk=$WITH_XCODE_DIR/Developer/SDKs/MacOSX10.6.sdk
     2152      cnf_append "VBOX_WITH_MACOSX_COMPILERS_FROM_DEVEL" "1"
     2153      cnf_append "VBOX_PATH_MACOSX_DEVEL_ROOT" "$WITH_XCODE_DIR/Developer"
     2154      ;;
     2155    13\.*)
     2156      check_xcode_sdk_path "$WITH_XCODE_DIR"
     2157      [ $? -eq 1 ] || fail
     2158      darwin_ver="10.9" # Mavericks
     2159      sdk=$WITH_XCODE_DIR/Developer/SDKs/MacOSX10.6.sdk
     2160      cnf_append "VBOX_WITH_MACOSX_COMPILERS_FROM_DEVEL" "1"
     2161      cnf_append "VBOX_PATH_MACOSX_DEVEL_ROOT" "$WITH_XCODE_DIR/Developer"
     2162      ;;
     2163    12\.*)
     2164      darwin_ver="10.8" # Mountain Lion
     2165      if [ ! -z "$WITH_XCODE_DIR" ]; then
     2166        sdk=$WITH_XCODE_DIR/Developer/SDKs/MacOSX10.6.sdk
     2167        cnf_append "VBOX_WITH_MACOSX_COMPILERS_FROM_DEVEL" "1"
     2168        cnf_append "VBOX_PATH_MACOSX_DEVEL_ROOT" "$WITH_XCODE_DIR/Developer"
     2169      else
     2170        sdk=/Developer/SDKs/MacOSX10.6.sdk
     2171      fi
     2172      CXX_FLAGS="-mmacosx-version-min=10.6 -isysroot $sdk -Wl,-syslibroot,$sdk"
     2173      ;;
    21272174    11\.*)
    21282175      darwin_ver="10.7" # Lion
     
    22592306  --with-makeself=PATH     location of makeself [$MAKESELF]
    22602307EOF
     2308[ "$OS"   = "darwin" ] && echo "  --with-xcode-dir=DIR     custom path to Xcode root directory; it is assumed that Xcode"
     2309[ "$OS"   = "darwin" ] && echo "                           contains OS X 10.6 SDK (required for Mountain Lion and newer hosts"
     2310[ "$OS"   = "darwin" ] && echo "                           only, ignored for the rest)"
    22612311[ "$OS"    = "linux" ] && echo "  --with-linux=DIR         Linux kernel source directory [$LINUX]"
    22622312[ $WITH_QT4    -eq 1 ] && echo "  --with-qt-dir=DIR        directory for Qt4 headers/libraries [pkgconfig]"
     
    23042354  [ $OSE -eq 1 ] || BUILD_LIBCURL=1
    23052355  [ $OSE -eq 1 ] && WITH_LIBVPX=0
     2356  WITH_XCODE_DIR=""
    23062357elif [ "$OS" = "haiku" ]; then
    23072358  #WITH_SDL=0
     
    23272378
    23282379# scan command line options
    2329 for option in $*; do
     2380for option in "$@"; do
    23302381  case "$option" in
    23312382    --help|-help|-h)
     
    23712422    --with-iasl=*)
    23722423      IASL=`echo $option | cut -d'=' -f2`
     2424      ;;
     2425    --with-xcode-dir=*)
     2426      WITH_XCODE_DIR=`echo $option | cut -d'=' -f2`
     2427      echo $option
    23732428      ;;
    23742429    --with-linux=*)
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette