Changeset 47706


Ignore:
Timestamp:
Mar 4, 2009, 4:43:46 AM (12 years ago)
Author:
toby@…
Message:

use sw_vers -productVersion (breaks jaguar compatibility)
fix universal target/sdkroot detection on 10.x.>0 releases

Location:
trunk/base
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/aclocal.m4

    r47703 r47706  
    495495    AC_ARG_WITH(universal-archs,[AC_HELP_STRING([--with-universal-archs="CPU"], [Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
    496496
     497        MACOSX_MAJOR_VERSION=`$SW_VERS -productVersion | cut -f-2 -d.`
     498
    497499        if test "x$UNIVERSAL_TARGET" = "x"; then
    498             UNIVERSAL_TARGET=${MACOSX_VERSION}
     500            UNIVERSAL_TARGET=${MACOSX_MAJOR_VERSION}
    499501        fi
    500502
    501503        if test "x$UNIVERSAL_SYSROOT" = "x"; then
    502             if test "${MACOSX_VERSION}" = "10.4"; then
    503                 UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_VERSION}u.sdk
     504            if test "${MACOSX_MAJOR_VERSION}" = "10.4"; then
     505                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}u.sdk
    504506            else
    505                 UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_VERSION}.sdk
     507                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}.sdk
    506508            fi
    507509        fi
  • trunk/base/configure

    r47703 r47706  
    22482248  { $as_echo "$as_me:$LINENO: checking Mac OS X version" >&5
    22492249$as_echo_n "checking Mac OS X version... " >&6; }
    2250   MACOSX_VERSION=`$SW_VERS | sed -n "s/^ProductVersion:[[:space:]]//p" | cut -f 1-3 -d.`
     2250  MACOSX_VERSION=`$SW_VERS -productVersion`
    22512251  { $as_echo "$as_me:$LINENO: result: $MACOSX_VERSION" >&5
    22522252$as_echo "$MACOSX_VERSION" >&6; }
     
    72067206
    72077207
     7208        MACOSX_MAJOR_VERSION=`$SW_VERS -productVersion | cut -f-2 -d.`
     7209
    72087210        if test "x$UNIVERSAL_TARGET" = "x"; then
    7209             UNIVERSAL_TARGET=${MACOSX_VERSION}
     7211            UNIVERSAL_TARGET=${MACOSX_MAJOR_VERSION}
    72107212        fi
    72117213
    72127214        if test "x$UNIVERSAL_SYSROOT" = "x"; then
    7213             if test "${MACOSX_VERSION}" = "10.4"; then
    7214                 UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_VERSION}u.sdk
     7215            if test "${MACOSX_MAJOR_VERSION}" = "10.4"; then
     7216                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}u.sdk
    72157217            else
    7216                 UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_VERSION}.sdk
     7218                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${MACOSX_MAJOR_VERSION}.sdk
    72177219            fi
    72187220        fi
  • trunk/base/configure.ac

    r46954 r47706  
    2020if test "x$SW_VERS" != "x"; then
    2121  AC_MSG_CHECKING(Mac OS X version)
    22   MACOSX_VERSION=`$SW_VERS | sed -n "s/^ProductVersion:[[[:space:]]]//p" | cut -f 1-3 -d.`
     22  MACOSX_VERSION=`$SW_VERS -productVersion`
    2323  AC_MSG_RESULT([$MACOSX_VERSION])
    2424fi
Note: See TracChangeset for help on using the changeset viewer.