+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
+ # SDK which provides the behavior this option has always had.
+ if test "x$wxUSE_MACOSX_SDK" = "x"; then
+ { echo "$as_me:$LINENO: WARNING: Enabling default SDK due to --enable-universal_binary." >&5
+echo "$as_me: WARNING: Enabling default SDK due to --enable-universal_binary." >&2;}
+ { echo "$as_me:$LINENO: WARNING: If you don't want this, specify --without-macosx-sdk" >&5
+echo "$as_me: WARNING: If you don't want this, specify --without-macosx-sdk" >&2;}
+ 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
+ { { echo "$as_me:$LINENO: error: Please specify the new --with-macosx-sdk=PATH and do not specify an arg to --enable-universal_binary
+See \`config.log' for more details." >&5
+echo "$as_me: error: Please specify the new --with-macosx-sdk=PATH and do not specify an arg to --enable-universal_binary
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ 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"
+ { echo "$as_me:$LINENO: WARNING: Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument" >&5
+echo "$as_me: WARNING: Please use --with-macosx-sdk=PATH and --enable-universal_binary without an argument" >&2;}
+ fi
+ fi
+ OSX_UNIV_OPTS="-arch ppc -arch i386"
+ CXXFLAGS="$OSX_UNIV_OPTS $CXXFLAGS"
+ CFLAGS="$OSX_UNIV_OPTS $CFLAGS"
+ LDFLAGS="$OSX_UNIV_OPTS $LDFLAGS"
+ retest_macosx_linking=yes
+
+ { echo "$as_me:$LINENO: WARNING: Disabling precompiled headers due to universal binary build." >&5
+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=
+elif test "x$wxUSE_MACOSX_SDK" = "xyes"; then
+ # TODO: Search for most recent SDK and use it.
+ wxUSE_MACOSX_SDK="/Developer/SDKs/MacOSX10.4u.sdk"
+fi
+
+
+if test "x$wxUSE_MACOSX_SDK" != "x"; then
+ { echo "$as_me:$LINENO: checking for SDK directory $wxUSE_MACOSX_SDK" >&5
+echo $ECHO_N "checking for SDK directory $wxUSE_MACOSX_SDK... $ECHO_C" >&6; }
+ if ! test -d "$wxUSE_MACOSX_SDK"; then
+ { { echo "$as_me:$LINENO: error: not found
+See \`config.log' for more details." >&5
+echo "$as_me: error: not found
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ { echo "$as_me:$LINENO: result: exists" >&5
+echo "${ECHO_T}exists" >&6; }
+ fi
+ MACOSX_SDK_OPTS="-isysroot $wxUSE_MACOSX_SDK"
+ eval "CC=\"$CC $MACOSX_SDK_OPTS\""
+ eval "CXX=\"$CXX $MACOSX_SDK_OPTS\""
+ eval "LD=\"$LD $MACOSX_SDK_OPTS\""
+ retest_macosx_linking=yes
+ fi
+
+if test "x$wxUSE_MACOSX_VERSION_MIN" = "xno"; then
+ wxUSE_MACOSX_VERSION_MIN=
+elif test "x$wxUSE_MACOSX_VERSION_MIN" = "xyes"; then
+ if test "x$wxUSE_MACOSX_SDK" != "x"; then
+ { echo "$as_me:$LINENO: checking SDK deployment version" >&5
+echo $ECHO_N "checking SDK deployment version... $ECHO_C" >&6; }
+
+ MACOSX_SDK_PLIST_VERSION_MIN=`defaults read "$wxUSE_MACOSX_SDK/SDKSettings" buildSettings | grep '^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}[^"]*"\{0,1\}; *$' | sed 's/^ *"\{0,1\}MACOSX_DEPLOYMENT_TARGET"\{0,1\} *= *"\{0,1\}\([^"]*\)"\{0,1\} *; *$/\1/'`
+
+ if test "x$MACOSX_SDK_PLIST_VERSION_MIN" != "x"; then
+ wxUSE_MACOSX_VERSION_MIN=$MACOSX_SDK_PLIST_VERSION_MIN
+ { echo "$as_me:$LINENO: result: $wxUSE_MACOSX_VERSION_MIN" >&5
+echo "${ECHO_T}$wxUSE_MACOSX_VERSION_MIN" >&6; }
+ else
+ { echo "$as_me:$LINENO: WARNING: Could not determine deployment target from SDKSettings.plist" >&5
+echo "$as_me: WARNING: Could not determine deployment target from SDKSettings.plist" >&2;}
+ wxUSE_MACOSX_VERSION_MIN=
+ fi
+ else
+ wxUSE_MACOSX_VERSION_MIN=
+ fi
+fi
+
+if test "x$wxUSE_MACOSX_VERSION_MIN" != "x"; then
+ MACOSX_VERSION_MIN_OPTS="-mmacosx-version-min=$wxUSE_MACOSX_VERSION_MIN"
+ eval "CC=\"$CC $MACOSX_VERSION_MIN_OPTS\""
+ eval "CXX=\"$CXX $MACOSX_VERSION_MIN_OPTS\""
+ eval "LD=\"$LD $MACOSX_VERSION_MIN_OPTS\""
+ retest_macosx_linking=yes
+fi
+
+if test "x$retest_macosx_linking" = "xyes"; then
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ { echo "$as_me:$LINENO: checking if C compiler works with SDK/version options" >&5
+echo $ECHO_N "checking if C compiler works with SDK/version options... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { { echo "$as_me:$LINENO: error: no. Try a different SDK
+See \`config.log' for more details." >&5
+echo "$as_me: error: no. Try a different SDK
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; exit 1
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+
+ { echo "$as_me:$LINENO: checking if C++ compiler works with SDK/version options" >&5
+echo $ECHO_N "checking if C++ compiler works with SDK/version options... $ECHO_C" >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_cxx_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ { echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; }
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { { echo "$as_me:$LINENO: error: no. Try a different SDK
+See \`config.log' for more details." >&5
+echo "$as_me: error: no. Try a different SDK
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; exit 1
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+