Skip to content

Instantly share code, notes, and snippets.

@veprbl
Created May 16, 2014 17:08
Show Gist options
  • Save veprbl/9ab33daa07b68c28671c to your computer and use it in GitHub Desktop.
Save veprbl/9ab33daa07b68c28671c to your computer and use it in GitHub Desktop.
0001-OSX-allow-.-configure-with-only-Command-Line-Tools.patch
From 1b59f4b4edbc66c1afce60dc4c50302259bd8687 Mon Sep 17 00:00:00 2001
From: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
Date: Tue, 13 May 2014 21:15:29 +0400
Subject: [PATCH] OSX: allow ./configure with only Command Line Tools
As it is now, ROOT can't be built with Cocoa and ./configure without full Xcode
installation. The problem is that Command Line Tools don't provide SDK the way
Xcode does. This patch allows detecting system-wide frameworks available at
/System/... .
---
configure | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/configure b/configure
index 10e658b..141730b 100755
--- a/configure
+++ b/configure
@@ -2655,18 +2655,26 @@ if test "x$enable_cocoa" = "xyes"; then
hascocoa="define"
enable_x11="no"
result "yes"
- message "Checking for OSX SDK"
+ message "Checking for Xcode OSX SDK"
xcodepath=`/usr/bin/xcode-select -print-path`
- osxsdk=$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$macosxvers.sdk
- result "$osxsdk"
- if [ ! -d $osxsdk ]; then
- result "`basename $0`: no OSX SDK found at $osxsdk"
+ xcodesdk=$xcodepath/Platforms/MacOSX.platform/Developer/SDKs/MacOSX$macosxvers.sdk
+ if [ -d $xcodesdk ]; then
+ osxsdk=$xcodesdk
+ else
+ result "no"
+ message "Checking for system OSX SDK"
+ osxsdk=""
+ fi
+ openglincdir=${osxsdk}/System/Library/Frameworks/OpenGL.framework/Headers
+ opengllibdir=${osxsdk}/System/Library/Frameworks/OpenGL.framework/Libraries
+ if [ -d $openglincdir ] && [ -d $opengllibdir ]; then
+ result "yes"
+ else
+ result "no"
+ result "`basename $0`: no Xcode OSX SDK found at $xcodesdk"
result "Run "xcode-select" to update the developer directory path"
result "or make sure the desired SDK version is installed"
exit 1
- else
- openglincdir=${osxsdk}/System/Library/Frameworks/OpenGL.framework/Headers
- opengllibdir=${osxsdk}/System/Library/Frameworks/OpenGL.framework/Libraries
fi
fi
--
1.9.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment