- for ac_prog in sw_vers
-do
- # Extract the first word of "$ac_prog", so it can be a program name with args.
-set dummy $ac_prog; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OSX_SW_VERS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OSX_SW_VERS"; then
- ac_cv_prog_OSX_SW_VERS="$OSX_SW_VERS" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_OSX_SW_VERS="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OSX_SW_VERS=$ac_cv_prog_OSX_SW_VERS
-if test -n "$OSX_SW_VERS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OSX_SW_VERS" >&5
-$as_echo "$OSX_SW_VERS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$OSX_SW_VERS" && break
-done
-
- if test "$OSX_SW_VERS" != ""; then
- OSX_VERSION=`sw_vers -productVersion | grep 10.[0-9]`
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Assuming OS X 10.4, use --with-macosx-version-min to override." >&5
-$as_echo "$as_me: WARNING: Assuming OS X 10.4, use --with-macosx-version-min to override." >&2;}
- OSX_VERSION="10.4"
- fi
-
- case "$OSX_VERSION" in
- 10.4* )
- wxUSE_MACOSX_VERSION_MIN=10.4
- ;;
-
- * )
- if test "$wxUSE_OSX_CARBON" = 1; then
- # otherwise configure stops on leopard for universal_binary
- wxUSE_MACOSX_VERSION_MIN=10.4
- else
- # for Cocoa, use 10.5 to be able to compile it in 64 bits too
- wxUSE_MACOSX_VERSION_MIN=10.5
- fi
- ;;
- esac
-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="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="g++-4.0"
- fi
- fi