Ticket #21222: patch-universal-flags.diff

File patch-universal-flags.diff, 1.3 KB (added by Veence (Vincent), 15 years ago)
  • configure.in

    old new  
    6969AC_SUBST(CONFIG_ARGS)
    7070CONFIG_ARGS="$ac_configure_args"
    7171
     72AC_MSG_CHECKING(for --with-universal-arch-flags)
     73AC_ARG_WITH(universal-arch-flags,
     74        AC_HELP_STRING(--with-universal-arch-flags=FLAGS,
     75                directly select architectures to build on Mac OS),
     76[
     77        AC_MSG_RESULT($withval)
     78        UNIVERSAL_ARCH_FLAGS="$withval"
     79],[
     80        AC_MSG_RESULT(None) ])
     81AC_SUBST(UNIVERSAL_ARCH_FLAGS)
     82
    7283AC_ARG_ENABLE(universalsdk,
    7384        AC_HELP_STRING(--enable-universalsdk@<:@=SDKDIR@:>@, Build against Mac OS X 10.4u SDK (ppc/i386)),
    7485[
     
    869880
    870881AC_SUBST(BASECFLAGS)
    871882
    872 # The -arch flags for universal builds on OSX
    873 UNIVERSAL_ARCH_FLAGS=
    874 AC_SUBST(UNIVERSAL_ARCH_FLAGS)
    875883
    876884# tweak BASECFLAGS based on compiler and platform
    877885case $GCC in
     
    913921
    914922
    915923            if test "${enable_universalsdk}"; then
    916                 UNIVERSAL_ARCH_FLAGS=""
     924                if test ! "${UNIVERSAL_ARCH_FLAGS}"; then
    917925                if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
    918926                   UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
    919927                   ARCH_RUN_32BIT=""
     
    930938                   AC_MSG_ERROR([proper usage is --with-universalarch=32-bit|64-bit|all])
    931939
    932940                 fi
     941                 fi
    933942
    934943
    935944                BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"