Skip to content
This repository
Browse code

fix the configure script to retrieve correct xcode path if xcode not …

…installed

in the default location.
  • Loading branch information...
commit e92ec3f656d17a5b85c6c1cfeb3380dab45b180d 1 parent c950be7
ulion authored January 26, 2013

Showing 1 changed file with 12 additions and 6 deletions. Show diff stats Hide diff stats

  1. 18  tools/darwin/depends/configure.in
18  tools/darwin/depends/configure.in
@@ -19,12 +19,18 @@ AC_ARG_WITH([sdk],
19 19
 
20 20
 use_staging="/Users/Shared/xbmc-depends"
21 21
 
22  
-# find xcodebuild, test in Xcode.app, if not there, fall back to normal location
23  
-use_xcodepath="/Applications/Xcode.app/Contents/Developer"
24  
-use_xcodebuild="/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild"
25  
-if [[ ! -f "$use_xcodebuild" ]]; then
26  
-  use_xcodepath="/Developer"
27  
-  use_xcodebuild="/usr/bin/xcodebuild"  
  22
+# find xcodebuild and xcodepath by xcode-select
  23
+# else test in Xcode.app, if not there, fall back to normal location
  24
+if [[ -f "/usr/bin/xcode-select" ]]; then
  25
+  use_xcodepath=`/usr/bin/xcode-select -print-path`
  26
+  use_xcodebuild="$use_xcodepath/usr/bin/xcodebuild"
  27
+else
  28
+  use_xcodepath="/Applications/Xcode.app/Contents/Developer"
  29
+  use_xcodebuild="/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild"
  30
+  if [[ ! -f "$use_xcodebuild" ]]; then
  31
+    use_xcodepath="/Developer"
  32
+    use_xcodebuild="/usr/bin/xcodebuild"  
  33
+  fi
28 34
 fi
29 35
 AC_MSG_RESULT(found xcodebuild at $use_xcodebuild)
30 36
 use_xcode=[`$use_xcodebuild -version | grep Xcode | awk '{ print $2}'`]

0 notes on commit e92ec3f

Please sign in to comment.
Something went wrong with that request. Please try again.