Changeset 34314


Ignore:
Timestamp:
Feb 21, 2008, 12:24:40 PM (12 years ago)
Author:
afb@…
Message:

autoconf all universal options

Location:
trunk/base
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/base/aclocal.m4

    r33757 r34314  
    398398        AC_MSG_RESULT([$MPFRAMEWORKSDIR])
    399399    AC_SUBST(MPFRAMEWORKSDIR)
     400])
     401
     402
     403# MP_UNIVERSAL_OPTIONS
     404#---------------------------------------
     405AC_DEFUN([MP_UNIVERSAL_OPTIONS],[
     406
     407    AC_ARG_WITH(universal-target,[AC_HELP_STRING([--with-universal-target=MDT], [Universal MACOSX_DEPLOYMENT_TARGET version])], UNIVERSAL_TARGET=${withval})
     408    AC_ARG_WITH(universal-sysroot,[AC_HELP_STRING([--with-universal-sysroot=SDK], [Universal SDK sysroot (with complete path)])], UNIVERSAL_SYSROOT=${withval})
     409    AC_ARG_WITH(universal-archs,[AC_HELP_STRING([--with-universal-archs="CPU"], [Universal CPU architectures (space separated)])], UNIVERSAL_ARCHS=${withval})
     410
     411        if test "x$UNIVERSAL_TARGET" = "x"; then
     412            if [test -d /Developer/SDKs/MacOSX10.5.sdk]; then
     413                UNIVERSAL_TARGET=10.5
     414                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk
     415            else
     416                UNIVERSAL_TARGET=10.4
     417                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk
     418            fi
     419        else
     420            if test "x$UNIVERSAL_SYSROOT" = "x"; then
     421                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${UNIVERSAL_TARGET}.sdk
     422            fi
     423        fi
     424
     425        if test "x$UNIVERSAL_ARCHS" = "x"; then
     426                #UNIVERSAL_ARCHS="ppc ppc64 i386 x86_64"
     427                UNIVERSAL_ARCHS="ppc i386"
     428        fi
     429   
     430    AC_MSG_CHECKING([for Universal MDT version])
     431    AC_MSG_RESULT([$UNIVERSAL_TARGET])
     432    AC_SUBST(UNIVERSAL_TARGET)
     433
     434    AC_MSG_CHECKING([for Universal SDK sysroot])
     435    AC_MSG_RESULT([$UNIVERSAL_SYSROOT])
     436    AC_SUBST(UNIVERSAL_SYSROOT)
     437
     438    AC_MSG_CHECKING([for Universal CPU architectures])
     439    AC_MSG_RESULT([$UNIVERSAL_ARCHS])
     440    AC_SUBST(UNIVERSAL_ARCHS)
    400441])
    401442
  • trunk/base/configure

    r34257 r34314  
    731731MPAPPLICATIONSDIR
    732732MPFRAMEWORKSDIR
     733UNIVERSAL_TARGET
     734UNIVERSAL_SYSROOT
     735UNIVERSAL_ARCHS
    733736CPP
    734737READLINK_IS_NOT_P1003_1A
     
    14011404  --with-applications-dir Applications installation directory.
    14021405  --with-frameworks-dir   Frameworks installation directory.
     1406  --with-universal-target=MDT
     1407                          Universal MACOSX_DEPLOYMENT_TARGET version
     1408  --with-universal-sysroot=SDK
     1409                          Universal SDK sysroot (with complete path)
     1410  --with-universal-archs="CPU"
     1411                          Universal CPU architectures (space separated)
    14031412  --with-x11-prefix=PREFIX
    14041413                          use PREFIX as the X11 base dir (default autodetect)
     
    68106819        { echo "$as_me:$LINENO: result: $MPFRAMEWORKSDIR" >&5
    68116820echo "${ECHO_T}$MPFRAMEWORKSDIR" >&6; }
     6821
     6822
     6823
     6824# Check for universal options
     6825
     6826
     6827
     6828# Check whether --with-universal-target was given.
     6829if test "${with_universal_target+set}" = set; then
     6830  withval=$with_universal_target; UNIVERSAL_TARGET=${withval}
     6831fi
     6832
     6833
     6834# Check whether --with-universal-sysroot was given.
     6835if test "${with_universal_sysroot+set}" = set; then
     6836  withval=$with_universal_sysroot; UNIVERSAL_SYSROOT=${withval}
     6837fi
     6838
     6839
     6840# Check whether --with-universal-archs was given.
     6841if test "${with_universal_archs+set}" = set; then
     6842  withval=$with_universal_archs; UNIVERSAL_ARCHS=${withval}
     6843fi
     6844
     6845
     6846        if test "x$UNIVERSAL_TARGET" = "x"; then
     6847            if test -d /Developer/SDKs/MacOSX10.5.sdk; then
     6848                UNIVERSAL_TARGET=10.5
     6849                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX10.5.sdk
     6850            else
     6851                UNIVERSAL_TARGET=10.4
     6852                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk
     6853            fi
     6854        else
     6855            if test "x$UNIVERSAL_SYSROOT" = "x"; then
     6856                UNIVERSAL_SYSROOT=/Developer/SDKs/MacOSX${UNIVERSAL_TARGET}.sdk
     6857            fi
     6858        fi
     6859
     6860        if test "x$UNIVERSAL_ARCHS" = "x"; then
     6861                #UNIVERSAL_ARCHS="ppc ppc64 i386 x86_64"
     6862                UNIVERSAL_ARCHS="ppc i386"
     6863        fi
     6864
     6865    { echo "$as_me:$LINENO: checking for Universal MDT version" >&5
     6866echo $ECHO_N "checking for Universal MDT version... $ECHO_C" >&6; }
     6867    { echo "$as_me:$LINENO: result: $UNIVERSAL_TARGET" >&5
     6868echo "${ECHO_T}$UNIVERSAL_TARGET" >&6; }
     6869
     6870
     6871    { echo "$as_me:$LINENO: checking for Universal SDK sysroot" >&5
     6872echo $ECHO_N "checking for Universal SDK sysroot... $ECHO_C" >&6; }
     6873    { echo "$as_me:$LINENO: result: $UNIVERSAL_SYSROOT" >&5
     6874echo "${ECHO_T}$UNIVERSAL_SYSROOT" >&6; }
     6875
     6876
     6877    { echo "$as_me:$LINENO: checking for Universal CPU architectures" >&5
     6878echo $ECHO_N "checking for Universal CPU architectures... $ECHO_C" >&6; }
     6879    { echo "$as_me:$LINENO: result: $UNIVERSAL_ARCHS" >&5
     6880echo "${ECHO_T}$UNIVERSAL_ARCHS" >&6; }
    68126881
    68136882
     
    1306213131MPAPPLICATIONSDIR!$MPAPPLICATIONSDIR$ac_delim
    1306313132MPFRAMEWORKSDIR!$MPFRAMEWORKSDIR$ac_delim
     13133UNIVERSAL_TARGET!$UNIVERSAL_TARGET$ac_delim
     13134UNIVERSAL_SYSROOT!$UNIVERSAL_SYSROOT$ac_delim
     13135UNIVERSAL_ARCHS!$UNIVERSAL_ARCHS$ac_delim
    1306413136CPP!$CPP$ac_delim
    1306513137READLINK_IS_NOT_P1003_1A!$READLINK_IS_NOT_P1003_1A$ac_delim
     
    1310913181_ACEOF
    1311013182
    13111   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 62; then
     13183  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 65; then
    1311213184    break
    1311313185  elif $ac_last_try; then
  • trunk/base/configure.ac

    r34257 r34314  
    143143MP_PATH_FRAMEWORKS
    144144
     145# Check for universal options
     146MP_UNIVERSAL_OPTIONS
     147
    145148# Check for standard header files.
    146149AC_HEADER_STDC
  • trunk/base/doc/macports.conf.in

    r34311 r34314  
    7979
    8080# MACOSX_DEPLOYMENT_TARGET
    81 universal_target        10.4
     81universal_target        @UNIVERSAL_TARGET@
    8282
    8383# the SDK "sysroot" to use
    84 universal_sysroot       /Developer/SDKs/MacOSX10.4u.sdk
     84universal_sysroot       @UNIVERSAL_SYSROOT@
    8585
    8686# machine architectures
    87 universal_archs         ppc i386
     87universal_archs         @UNIVERSAL_ARCHS@
    8888
    8989# Options for generated startup items
Note: See TracChangeset for help on using the changeset viewer.