-if test "x$wxUSE_MAC_ARCH" != xno; then
- OSX_ARCH_OPTS="-arch $wxUSE_MAC_ARCH"
-fi
-
-dnl Support the old --enable-universal_binary in case anyone was using it.
- if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
- dnl --enable-universal_binary uses a default SDK (currently 10.4u)
- dnl --enable-universal_binary=SDK names a path to an SDK
- if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
- # Implicitly turn on the new --with-macosx-sdk using the default
- # SDK which provides the behaviour this option has always had.
- if test "x$wxUSE_MACOSX_SDK" = "x"; then
- AC_MSG_WARN([Enabling default SDK due to --enable-universal_binary.])
- AC_MSG_WARN([If you don't want this, specify --without-macosx-sdk])
- wxUSE_MACOSX_SDK=yes
- fi
- else
- # Complain to user if he specified an argument to --enable-universal_binary
- # and also 1) specified --with-macosx-sdk using the default (yes) or
- # 2) specified --with-macosx-sdk using a path or 3) specified
- # --without-macosx-sdk (no).
- if test "x$wxUSE_MACOSX_SDK" != "x" ; then
- AC_MSG_FAILURE([Please specify the new --with-macosx-sdk=PATH and do not specify an arg to --enable-universal_binary])
- else
- # Put the SDK path into the wxUSE_MACOSX_SDK. We don't have to
- # special-case the empty string because the below test simply
- # converts "no" to the empty string anyway.
- wxUSE_MACOSX_SDK="$wxUSE_UNIVERSAL_BINARY"
- dnl Warn about deprecated usage.
- AC_MSG_WARN([Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument])
- fi
- fi
- dnl FIXME: I think it would be better to put this into CC, CXX, and LD rather than the flags.
- OSX_ARCH_OPTS="-arch ppc -arch i386"
- if test "$wxUSE_OSX_COCOA" = 1; then
- OSX_ARCH_OPTS="$OSX_ARCH_OPTS -arch x86_64"
+
+dnl Deal with architecture selection. By default, we compile for the current
+dnl architecture, whatever it is. With --enable-universal_binary the list of
+dnl architectures can be explicitly specified. If it isn't, we compile for all
+dnl supported ones.
+if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
+ if test "x$wxUSE_MAC_ARCH" != xno; then
+ AC_MSG_WARN([--enable-macosx_arch is ignored when --enable-universal_binary is used.])
+ fi
+
+ if test "x$wxUSE_UNIVERSAL_BINARY" != xyes; then
+ OSX_ARCH_OPTS=$wxUSE_UNIVERSAL_BINARY
+ else dnl Use all architectures supported
+ OSX_ARCH_OPTS="ppc,i386"
+ if test "$wxUSE_OSX_COCOA" = 1; then
+ OSX_ARCH_OPTS="$OSX_ARCH_OPTS,x86_64"