[47706] trunk/base

toby at macports.org toby at macports.org
Tue Mar 3 20:43:46 PST 2009


Revision: 47706
          http://trac.macports.org/changeset/47706
Author:   toby at macports.org
Date:     2009-03-03 20:43:46 -0800 (Tue, 03 Mar 2009)
Log Message:
-----------
use sw_vers -productVersion (breaks jaguar compatibility)
fix universal target/sdkroot detection on 10.x.>0 releases

Modified Paths:
--------------
    trunk/base/aclocal.m4
    trunk/base/configure
    trunk/base/configure.ac

Modified: trunk/base/aclocal.m4
===================================================================
--- trunk/base/aclocal.m4	2009-03-04 03:52:14 UTC (rev 47705)
+++ trunk/base/aclocal.m4	2009-03-04 04:43:46 UTC (rev 47706)
@@ -494,15 +494,17 @@
     AC_ARG_WITH(universal-sysroot,[AC_HELP_STRING([--with-universal-sysroot=SDK], [Universal SDK sysroot (with complete path)])], UNIVERSAL_SYSROOT=${withval})
     AC_ARG_WITH(universal-archs,[AC_HELP_STRING([--with-universal-archs="CPU"], [Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
 
+	MACOSX_MAJOR_VERSION=`$SW_VERS -productVersion | cut -f-2 -d.`
+
 	if test "x$UNIVERSAL_TARGET" = "x"; then
-	    UNIVERSAL_TARGET=${MACOSX_VERSION}
+	    UNIVERSAL_TARGET=${MACOSX_MAJOR_VERSION}
 	fi
 
 	if test "x$UNIVERSAL_SYSROOT" = "x"; then
-	    if test "${MACOSX_VERSION}" = "10.4"; then
-		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_VERSION}u.sdk
+	    if test "${MACOSX_MAJOR_VERSION}" = "10.4"; then
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}u.sdk
 	    else
-		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_VERSION}.sdk
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}.sdk
 	    fi
 	fi
 

Modified: trunk/base/configure
===================================================================
--- trunk/base/configure	2009-03-04 03:52:14 UTC (rev 47705)
+++ trunk/base/configure	2009-03-04 04:43:46 UTC (rev 47706)
@@ -2247,7 +2247,7 @@
 if test "x$SW_VERS" != "x"; then
   { $as_echo "$as_me:$LINENO: checking Mac OS X version" >&5
 $as_echo_n "checking Mac OS X version... " >&6; }
-  MACOSX_VERSION=`$SW_VERS | sed -n "s/^ProductVersion:[[:space:]]//p" | cut -f 1-3 -d.`
+  MACOSX_VERSION=`$SW_VERS -productVersion`
   { $as_echo "$as_me:$LINENO: result: $MACOSX_VERSION" >&5
 $as_echo "$MACOSX_VERSION" >&6; }
 fi
@@ -7205,15 +7205,17 @@
 fi
 
 
+	MACOSX_MAJOR_VERSION=`$SW_VERS -productVersion | cut -f-2 -d.`
+
 	if test "x$UNIVERSAL_TARGET" = "x"; then
-	    UNIVERSAL_TARGET=${MACOSX_VERSION}
+	    UNIVERSAL_TARGET=${MACOSX_MAJOR_VERSION}
 	fi
 
 	if test "x$UNIVERSAL_SYSROOT" = "x"; then
-	    if test "${MACOSX_VERSION}" = "10.4"; then
-		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_VERSION}u.sdk
+	    if test "${MACOSX_MAJOR_VERSION}" = "10.4"; then
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}u.sdk
 	    else
-		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_VERSION}.sdk
+		UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}.sdk
 	    fi
 	fi
 

Modified: trunk/base/configure.ac
===================================================================
--- trunk/base/configure.ac	2009-03-04 03:52:14 UTC (rev 47705)
+++ trunk/base/configure.ac	2009-03-04 04:43:46 UTC (rev 47706)
@@ -19,7 +19,7 @@
 AC_CHECK_PROGS(SW_VERS, sw_vers)
 if test "x$SW_VERS" != "x"; then
   AC_MSG_CHECKING(Mac OS X version)
-  MACOSX_VERSION=`$SW_VERS | sed -n "s/^ProductVersion:[[[:space:]]]//p" | cut -f 1-3 -d.`
+  MACOSX_VERSION=`$SW_VERS -productVersion`
   AC_MSG_RESULT([$MACOSX_VERSION])
 fi
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090303/78f3eac9/attachment.html>


More information about the macports-changes mailing list