]> git.saurik.com Git - wxWidgets.git/blobdiff - configure.in
Create work-around for wxGetEnvMap on OpenVMS (correction)
[wxWidgets.git] / configure.in
index da733e0626ff695fb222b229988ad7aa80d518cd..1eae0beda81292f65673d36071eba6d5b16b82d2 100644 (file)
@@ -398,6 +398,7 @@ DEFAULT_wxUSE_UNICODE_UTF8_LOCALE=no
 
 dnl Mac/Cocoa users need to enable building universal binaries explicitly
 DEFAULT_wxUSE_UNIVERSAL_BINARY=no
+DEFAULT_wxUSE_MAC_ARCH=no
 
 DEFAULT_wxUSE_OFFICIAL_BUILD=no
 
@@ -717,7 +718,9 @@ WX_ARG_ENABLE(no_exceptions, [  --enable-no_exceptions  create code without C++
 WX_ARG_ENABLE(permissive,    [  --enable-permissive     compile code disregarding strict ANSI], wxUSE_PERMISSIVE)
 WX_ARG_ENABLE(no_deps,       [  --enable-no_deps        create code without dependency information], wxUSE_NO_DEPS)
 WX_ARG_DISABLE(vararg_macros,[  --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS)
-WX_ARG_ENABLE_PARAM(universal_binary, [[  --enable-universal_binary  create Mac PowerPC and Intel Universal binary]], wxUSE_UNIVERSAL_BINARY)
+
+WX_ARG_ENABLE_PARAM(universal_binary, [[  --enable-universal_binary  create universal binary with Mac PPC and i386 (and x86_64 if using Cocoa) architectures ]], wxUSE_UNIVERSAL_BINARY)
+WX_ARG_ENABLE_PARAM(macosx_arch,      [[  --enable-macosx_arch=ARCH  build for just the specified architecture]], wxUSE_MAC_ARCH)
 
 WX_ARG_ENABLE(compat26,      [  --enable-compat26       enable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6)
 WX_ARG_DISABLE(compat28,     [  --disable-compat28      disable wxWidgets 2.8 compatibility], WXWIN_COMPATIBILITY_2_8)
@@ -1116,6 +1119,11 @@ if test "$wxUSE_MAC" = 1; then
 
 retest_macosx_linking=no
 
+OSX_ARCH_OPTS=""
+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)
@@ -1145,12 +1153,13 @@ dnl Support the old --enable-universal_binary in case anyone was using it.
             fi
         fi
         dnl FIXME: I think it would be better to put this into CC, CXX, and LD rather than the flags.
-        OSX_UNIV_OPTS="-arch ppc -arch i386"
-        CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
-        CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
-        OBJCXXFLAGS="$OSX_UNIV_OPTS $OBJCXXFLAGS"
-        OBJCFLAGS="$OSX_UNIV_OPTS $OBJCFLAGS"
-        LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
+        OSX_ARCH_OPTS="-arch ppc -arch i386"
+       if test "$wxUSE_OSX_COCOA" = 1; then
+            OSX_ARCH_OPTS="$OSX_ARCH_OPTS -arch x86_64"
+        fi
+        AC_MSG_CHECKING([for universal binary architectures])
+       AC_MSG_RESULT([$OSX_ARCH_OPTS])
+
         dnl NOTE: Only the compiler driver needs arch flags.  The link editor
         dnl is incapable of using them but the compiler driver (which we use
         dnl as LD when building dynamic libraries) uses them to invoke the
@@ -1174,6 +1183,12 @@ dnl Support the old --enable-universal_binary in case anyone was using it.
         bk_use_pch=no
     fi
 
+CXXFLAGS="$OSX_ARCH_OPTS $CXXFLAGS"
+CFLAGS="$OSX_ARCH_OPTS $CFLAGS"
+OBJCXXFLAGS="$OSX_ARCH_OPTS $OBJCXXFLAGS"
+OBJCFLAGS="$OSX_ARCH_OPTS $OBJCFLAGS"
+LDFLAGS="$OSX_ARCH_OPTS $LDFLAGS"
+
 dnl Set up the Mac OS X SDK.  We do this early so configure tests will occur
 dnl with the SDK in place.
 dnl NOTE: We clobber wxUSE_MACOSX_SDK with the SDK path
@@ -2962,7 +2977,7 @@ if test "$wxUSE_GUI" = "yes"; then
                     dnl we need to cache GTK_CFLAGS and GTK_LIBS for the
                     dnl subsequent runs
                     wx_cv_cflags_gtk=$GTK_CFLAGS
-                    wx_cv_libs_gtk=`echo $GTK_LIBS | sed -e 's/ -l[[^ ]]*cairo[[^ ]]*//g'`
+                    wx_cv_libs_gtk=$GTK_LIBS
                 fi
             ]
         )