Changeset 87614 in vbox
- Timestamp:
- Feb 4, 2021 7:35:02 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/configure
r87584 r87614 194 194 { 195 195 rm -f $ODIR.tmp_src.cc $ODIR.tmp_src.c $ODIR.tmp_out $ODIR.test_execute.log 196 [ "$OS" = "darwin" ] && rm -rf $ODIR.tmp_out.dSYM 196 197 } 197 198 … … 635 636 fail 636 637 else 638 [ "$YASM" != "yasm" ] && cnf_append "PATH_TOOL_YASM" "`dirname $YASM`" 637 639 log_success "found version $yasm_ver" 638 640 fi … … 2218 2220 2219 2221 # 2222 # Determines the Darwin version. 2223 # 2224 check_darwinversion() 2225 { 2226 test_header "Darwin version" 2227 darwin_ver=`uname -r` 2228 case "$darwin_ver" in 2229 20\.*) 2230 darwin_ver="11.0" # Big Sur 2231 ;; 2232 19\.*) 2233 darwin_ver="10.15" # Catalina 2234 ;; 2235 18\.*) 2236 darwin_ver="10.14" # Mojave 2237 ;; 2238 17\.*) 2239 darwin_ver="10.13" # High Sierra 2240 ;; 2241 16\.*) 2242 darwin_ver="10.12" # Sierra 2243 ;; 2244 15\.*) 2245 darwin_ver="10.11" # El Capitan 2246 ;; 2247 14\.*) 2248 darwin_ver="10.10" # Yosemite 2249 ;; 2250 13\.*) 2251 darwin_ver="10.9" # Mavericks 2252 ;; 2253 *) 2254 echo " failed to determine Darwin version. (uname -r: $darwin_ver)" 2255 fail 2256 darwin_ver="unknown" 2257 ;; 2258 esac 2259 2260 log_success "found version $darwin_ver" 2261 } 2262 2263 # 2220 2264 # Check Xcode path 2221 2265 # 2222 check_xcode_ sdk_path()2266 check_xcode_path() 2223 2267 { 2224 2268 # Check if WITH_XCODE_DIR is set. 2225 2269 if [ -z "$WITH_XCODE_DIR" ]; then 2226 echo "Please specify --with-xcode-dir option." 2227 return 0 2270 if [ -d "/Library/Developer/CommandLineTools" -a -f "/Library/Developer/CommandLineTools/usr/bin/clang" ]; then 2271 return 1 2272 else 2273 echo "Please specify --with-xcode-dir option." 2274 return 0 2275 fi 2228 2276 fi 2229 2277 … … 2237 2285 } 2238 2286 2239 # 2240 # Determines the Darwin version. 2241 # @todo This should really check the Xcode/SDK version. 2242 # 2243 check_darwinversion() 2244 { 2245 test_header "Darwin version" 2246 darwin_ver=`uname -r` 2247 case "$darwin_ver" in 2248 19\.*) 2249 darwin_ver="10.15" # Catalina 2250 ;; 2251 18\.*) 2252 darwin_ver="10.14" # Mojave 2253 ;; 2254 17\.*) 2255 darwin_ver="10.13" # High Sierra 2256 ;; 2257 16\.*) 2258 darwin_ver="10.12" # Sierra 2259 ;; 2260 15\.*) 2261 darwin_ver="10.11" # El Capitan 2262 ;; 2263 14\.*) 2264 darwin_ver="10.10" # Yosemite 2265 ;; 2266 13\.*) 2267 darwin_ver="10.9" # Mavericks 2268 ;; 2269 *) 2270 echo " failed to determine Darwin version. (uname -r: $darwin_ver)" 2271 fail 2272 darwin_ver="unknown" 2273 ;; 2274 esac 2275 2276 check_xcode_sdk_path "$WITH_XCODE_DIR" 2287 check_xcode() 2288 { 2289 test_header "Xcode and SDK" 2290 check_xcode_path "$WITH_XCODE_DIR" 2277 2291 [ $? -eq 1 ] || fail 2278 2292 2279 2293 # Pick the oldest SDK offered by Xcode, to get maximum compatibility 2280 devel_subdir="$WITH_XCODE_DIR/Contents/Developer" 2281 sdk_subdir="$devel_subdir/Platforms/MacOSX.platform/Developer/SDKs" 2294 if [ -z "$WITH_XCODE_DIR" ]; then 2295 devel_subdir="/Library/Developer/CommandLineTools" 2296 sdk_subdir="$devel_subdir/SDKs" 2297 else 2298 devel_subdir="$WITH_XCODE_DIR/Contents/Developer" 2299 sdk_subdir="$devel_subdir/Platforms/MacOSX.platform/Developer/SDKs" 2300 fi 2282 2301 sdk_tries="$sdk_subdir"/MacOSX10.?.sdk" $sdk_subdir"/MacOSX10.??.sdk" $sdk_subdir"/MacOSX.sdk 2283 2302 for t in $sdk_tries; do … … 2292 2311 fail 2293 2312 fi 2294 2295 cnf_append "VBOX_WITH_MACOSX_COMPILERS_FROM_DEVEL" "1" 2296 cnf_append "PATH_TOOL_VBoxXcode62" "$devel_subdir" 2297 cnf_append "VBOX_PATH_MACOSX_DEVEL_ROOT" "$devel_subdir" 2313 xcode_ver=`$devel_subdir/usr/bin/clang --version | sed -n 's/^.*version \([0-9]\{1,\}\.[0-9]\{1,\}\.[0-9]\{1,\}\).*$/\1/p'` 2314 if [ $? -ne 0 -o -z "$xcode_ver" ]; then 2315 echo " failed to determine Xcode version." 2316 fail 2317 fi 2318 2319 if [ -z "$WITH_XCODE_DIR" ]; then 2320 cnf_append "VBOX_WITH_EVEN_NEWER_XCODE" "1" 2321 else 2322 cnf_append "VBOX_WITH_MACOSX_COMPILERS_FROM_DEVEL" "1" 2323 cnf_append "PATH_TOOL_VBoxXcode62" "$devel_subdir" 2324 cnf_append "VBOX_PATH_MACOSX_DEVEL_ROOT" "$devel_subdir" 2325 fi 2298 2326 cnf_append "VBOX_PATH_MACOSX_SDK" "$sdk" 2299 2327 if [ -n "$sdk_ver" ]; then … … 2302 2330 fi 2303 2331 2304 log_success "found version $ darwin_ver (SDK: $sdk)"2332 log_success "found version $xcode_ver (SDK: $sdk)" 2305 2333 } 2306 2334 … … 2373 2401 --with-kbuild=DIR kbuild directory [$KBUILDDIR] 2374 2402 --with-iasl=PATH location of the iasl compiler [$IASL] 2403 --with-yasm=PATH location of the iasl compiler [$YASM] 2375 2404 --with-makeself=PATH location of makeself [$MAKESELF] 2376 2405 EOF … … 2504 2533 IASL=`echo $option | cut -d'=' -f2` 2505 2534 ;; 2535 --with-yasm=*) 2536 YASM=`echo $option | cut -d'=' -f2` 2537 ;; 2506 2538 --with-xcode-dir=*) 2507 2539 WITH_XCODE_DIR=`echo $option | cut -d'=' -f2` 2508 echo $option2509 2540 ;; 2510 2541 --with-linux=*) … … 2791 2822 2792 2823 # Darwin-specific 2793 if [ "$OS" = "darwin" ]; then 2794 check_darwinversion 2795 fi 2824 [ "$OS" = "darwin" ] && check_darwinversion 2796 2825 # the tools 2797 check_gcc 2826 [ "$OS" != "darwin" ] && check_gcc 2827 [ "$OS" = "darwin" ] && check_xcode 2798 2828 if [ $ONLY_ADDITIONS -eq 0 ]; then 2799 2829 check_open_watcom
Note:
See TracChangeset
for help on using the changeset viewer.