Test for sw_vers availability before calling it in configure.

There is no sw_vers when cross-compiling, just assume 10.4 system in this
case and point the user to --with-macosx-version-min which can be used to
override this.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62869 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-12-13 12:52:47 +00:00
parent f10f4c8785
commit 06a0867994
2 changed files with 65 additions and 7 deletions

View File

@@ -1205,7 +1205,15 @@ dnl We need to quote the next line where we don't need macros and do need [] in
wxUSE_MACOSX_VERSION_MIN=
fi
elif test "x$wxUSE_MACOSX_VERSION_MIN" = "x"; then
OSX_VERSION=`sw_vers -productVersion | grep 10.[[0-9]]`
AC_CHECK_PROGS(OSX_SW_VERS, sw_vers)
if test "$OSX_SW_VERS" != ""; then
OSX_VERSION=`sw_vers -productVersion | grep 10.[[0-9]]`
else
dnl can't determine it (happens e.g. when cross-compiling) so use a
dnl conservative default
AC_MSG_WARN([Assuming OS X 10.4, use --with-macosx-version-min to override.])
OSX_VERSION="10.4"
fi
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