#! /bin/sh
-# From configure.in Id: configure.in 61278 2009-07-02 09:00:20Z VZ .
+# From configure.in Id.
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.61 for wxWidgets 2.9.1.
#
fi
fi
+
+if test "$wxUSE_MAC" = 1; then
+
retest_macosx_linking=no
-#if test "$wxUSE_MAC" = 1; then
if test "x$wxUSE_UNIVERSAL_BINARY" != xno ; then
if test "x$wxUSE_UNIVERSAL_BINARY" == xyes; then
# Implicitly turn on the new --with-macosx-sdk using the default
echo "$as_me: WARNING: Disabling precompiled headers due to universal binary build." >&2;}
bk_use_pch=no
fi
-#fi
if test "x$wxUSE_MACOSX_SDK" = "xno"; then
wxUSE_MACOSX_SDK=
wxUSE_MACOSX_VERSION_MIN=
fi
elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then
- if test "$wxUSE_MAC" = 1; then
+ OSX_VERSION=`sw_vers -productVersion | grep 10.[0-9]`
+ if test "$wxUSE_OSX_CARBON" = 1 -o "x$OSX_VERSION" = "x10.4"; then
# otherwise configure stops on leopard for universal_binary
wxUSE_MACOSX_VERSION_MIN=10.4
+ else
+ # for OS X Cocoa, use 10.5 so we can get 64-bit compile on Snow Leopard
+ wxUSE_MACOSX_VERSION_MIN=10.5
+ fi
+fi
+
+NEEDS_GCC40="no"
+if test "x$wxUSE_MACOSX_VERSION_MIN" == "x10.4"; then
+ NEEDS_GCC40="yes"
+fi
+
+if test "$wxUSE_OSX_CARBON" = 1; then
+ NEEDS_GCC40="yes"
+fi
+
+if test "x$NEEDS_GCC40" == "xyes"; then
+ # gcc 4.2 cannot compile 10.4 compatible code, so if the user is using it
+ # and wants 10.4 compatible code, then 'downgrade' to 4.0
+ # This is also the simplest way to get 32-bit binaries on Snow Leopard.
+ if test "x$CC" = "xgcc"; then
+ CCVERSION=`$CC --version | grep 4.[2-9].`
+ if test "x$CCVERSION" != "x"; then
+ echo "$as_me:$LINENO: WARNING: gcc >= 4.2 cannot compile 10.4 compatible code. Using gcc 4.0 instead."
+ CC="/usr/bin/gcc-4.0"
+ fi
+ fi
+
+ if test "x$CXX" = "xg++"; then
+ CCVERSION=`$CXX --version | grep 4.[2-9].`
+ if test "x$CCVERSION" != "x"; then
+ CXX="/usr/bin/g++-4.0"
+ fi
fi
fi
fi
-
+fi
case "${host}" in
*-*-darwin* )