summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure23
1 files changed, 14 insertions, 9 deletions
diff --git a/configure b/configure
index 73679de621..bf37224d24 100755
--- a/configure
+++ b/configure
@@ -234,7 +234,7 @@ macSDKify()
sdk=$(getSingleQMakeVariable "QMAKE_MAC_SDK" "$1")
if [ -z "$sdk" ]; then echo "QMAKE_MAC_SDK must be set when building on Mac" >&2; exit 1; fi
- sysroot=$(/usr/bin/xcodebuild -sdk $sdk -version Path 2>/dev/null)
+ sysroot=$(/usr/bin/xcrun --sdk $sdk --show-sdk-path 2>/dev/null)
if [ -z "$sysroot" ]; then echo "Failed to resolve SDK path for '$sdk'" >&2; exit 1; fi
case "$sdk" in
@@ -322,18 +322,23 @@ fi
if [ "$BUILD_ON_MAC" = "yes" ]; then
if ! /usr/bin/xcode-select --print-path >/dev/null 2>&1; then
echo >&2
- echo " No Xcode is selected. Use xcode-select -switch to choose an Xcode" >&2
- echo " version. See the xcode-select man page for more information." >&2
+ echo " No Xcode selected. Please install Xcode via the App Store, " >&2
+ echo " or the command line developer tools via xcode-select --install, " >&2
+ echo " and use xcode-select --switch to choose the right installation. " >&2
+ echo " See the xcode-select man page for more information." >&2
echo >&2
exit 2
fi
- if ! /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
- echo >&2
- echo " Xcode not set up properly. You may need to confirm the license" >&2
- echo " agreement by running /usr/bin/xcodebuild without arguments." >&2
- echo >&2
- exit 2
+ # In the else case we are probably using a Command Line Tools installation
+ if /usr/bin/xcrun -find xcodebuild >/dev/null 2>&1; then
+ if ! /usr/bin/xcrun xcodebuild -license check 2>/dev/null; then
+ echo >&2
+ echo " Xcode setup not complete. You need to confirm the license" >&2
+ echo " agreement by running 'sudo xcrun xcodebuild -license accept'." >&2
+ echo >&2
+ exit 2
+ fi
fi
fi