diff options
author | ulion <ulion2002@gmail.com> | 2013-01-26 11:17:22 +0800 |
---|---|---|
committer | ulion <ulion2002@gmail.com> | 2013-01-26 12:38:21 +0800 |
commit | e92ec3f656d17a5b85c6c1cfeb3380dab45b180d (patch) | |
tree | 75246a372670c40914b14400f4620ce54844499d | |
parent | c950be79577655dad75e89e9939517516756a745 (diff) |
fix the configure script to retrieve correct xcode path if xcode not installed
in the default location.
-rw-r--r-- | tools/darwin/depends/configure.in | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/tools/darwin/depends/configure.in b/tools/darwin/depends/configure.in index 6f3ed79570..4159ed7d90 100644 --- a/tools/darwin/depends/configure.in +++ b/tools/darwin/depends/configure.in @@ -19,12 +19,18 @@ AC_ARG_WITH([sdk], use_staging="/Users/Shared/xbmc-depends" -# find xcodebuild, test in Xcode.app, if not there, fall back to normal location -use_xcodepath="/Applications/Xcode.app/Contents/Developer" -use_xcodebuild="/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild" -if [[ ! -f "$use_xcodebuild" ]]; then - use_xcodepath="/Developer" - use_xcodebuild="/usr/bin/xcodebuild" +# find xcodebuild and xcodepath by xcode-select +# else test in Xcode.app, if not there, fall back to normal location +if [[ -f "/usr/bin/xcode-select" ]]; then + use_xcodepath=`/usr/bin/xcode-select -print-path` + use_xcodebuild="$use_xcodepath/usr/bin/xcodebuild" +else + use_xcodepath="/Applications/Xcode.app/Contents/Developer" + use_xcodebuild="/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild" + if [[ ! -f "$use_xcodebuild" ]]; then + use_xcodepath="/Developer" + use_xcodebuild="/usr/bin/xcodebuild" + fi fi AC_MSG_RESULT(found xcodebuild at $use_xcodebuild) use_xcode=[`$use_xcodebuild -version | grep Xcode | awk '{ print $2}'`] |