From d4a4c6607215837dd5d6df21d1950a9c9ca90fb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 26 Jan 2012 13:54:07 +0100 Subject: Make Clang the default makespec on Mac OS 10.7 (Lion) if Clang >= 3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibeb1db0eca2fb6d843d85c3f48c5f23a81230745 Reviewed-by: Bradley T. Hughes Reviewed-by: Zeno Albisser Reviewed-by: João Abecasis Reviewed-by: Oswald Buddenhagen Reviewed-by: Marius Storm-Olsen Reviewed-by: Sergio Ahumada Reviewed-by: Lars Knoll Reviewed-by: Morten Johan Sørvig --- configure | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'configure') diff --git a/configure b/configure index 8b92585ecc..dd014efb30 100755 --- a/configure +++ b/configure @@ -2488,8 +2488,21 @@ if [ -z "$PLATFORM" ]; then case "$UNAME_SYSTEM:$UNAME_RELEASE" in Darwin:*) if [ "$PLATFORM_MAC" = "yes" -o "$PLATFORM_QPA" = "yes" ]; then - PLATFORM=macx-g++ - # PLATFORM=macx-xcode + OSX_VERSION=`uname -r | cut -d. -f1` + if [ "$OSX_VERSION" -ge 11 ]; then + # We're on Lion or above. Check if we have a supported Clang version + case "$(clang -v 2>&1 | grep -Po '(?<=version )\d[\d.]+')" in + 3.*) + PLATFORM=macx-clang + PLATFORM_NOTES="\n - Also available for Mac OS X: macx-g++\n" + ;; + *) + PLATFORM=macx-g++ + ;; + esac + else + PLATFORM=macx-g++ + fi else PLATFORM=darwin-g++ fi -- cgit v1.2.3