Commit 15575cf8 authored by chak@cse.unsw.edu.au.'s avatar chak@cse.unsw.edu.au.

Add configure option --with-macos-deployment-target

parent eb389b71
......@@ -1091,6 +1091,35 @@ AC_DEFUN([CHECK_GMP],
AC_REQUIRE([AC_PROG_CC])
])
# FP_MACOS_DEPLOYMENT_TARGET
# --------------------------
AC_DEFUN([FP_MACOS_DEPLOYMENT_TARGET],
[
if test "x$TargetOS_CPP-$TargetVendor_CPP" = "xdarwin-apple"; then
AC_MSG_CHECKING([Mac OS X deployment target])
case $MACOS_DEPLOYMENT_TARGET in
none) ;;
10.4) MACOS_DEPLOYMENT_VERSION=10.4
MACOS_DEPLOYMENT_SDK=/Developer/SDKs/MacOSX10.4u.sdk
;;
10.4u) MACOS_DEPLOYMENT_VERSION=10.4
MACOS_DEPLOYMENT_SDK=/Developer/SDKs/MacOSX10.4u.sdk
;;
*) MACOS_DEPLOYMENT_VERSION=$MACOS_DEPLOYMENT_TARGET
MACOS_DEPLOYMENT_SDK=/Developer/SDKs/MacOSX${MACOS_DEPLOYMENT_TARGET}.sdk
;;
esac
if test "x$MACOS_DEPLOYMENT_TARGET" = "xnone"; then
AC_MSG_RESULT(none)
else
if test ! -d $MACOS_DEPLOYMENT_SDK; then
AC_MSG_ERROR([Unknown deployment target $MACOS_DEPLOYMENT_TARGET])
fi
AC_MSG_RESULT([${MACOS_DEPLOYMENT_VERSION} (${MACOS_DEPLOYMENT_SDK})])
fi
fi
])
# --------------------------------------------------------------
# Calculate absolute path to build tree
# --------------------------------------------------------------
......
......@@ -819,6 +819,23 @@ AC_ARG_ENABLE(dotnet,
)
AC_SUBST(DotnetSupport)
dnl ** Mac OS X: explicit deployment target
dnl --------------------------------------------------------------
AC_ARG_WITH([macos-deployment-target],
[AC_HELP_STRING([--macos-deployment-target=VERSION],
[Build for Mac OS VERSION and higher [default= version of build host]])],
[MACOS_DEPLOYMENT_TARGET="$withval"
if test "x$TargetOS_CPP-$TargetVendor_CPP" != "xdarwin-apple"; then
# ignore everywhere, but on Mac OS
AC_MSG_WARN([--macos-deployment-target is only available on Mac OS X])
MACOS_DEPLOYMENT_TARGET=none
fi],
[MACOS_DEPLOYMENT_TARGET=none]
)
FP_MACOS_DEPLOYMENT_TARGET
AC_SUBST(MACOS_DEPLOYMENT_VERSION)
AC_SUBST(MACOS_DEPLOYMENT_SDK)
dnl --------------------------------------------------------------
dnl End of configure script option section
dnl --------------------------------------------------------------
......
......@@ -185,6 +185,11 @@ BootingFromUnregisterisedHc = @BootingFromUnregisterisedHc@
#
XMLDocWays=
# Mac OS X deployment target (to cross-compile for older OS versions)
#
MACOS_DEPLOYMENT_VERSION = @MACOS_DEPLOYMENT_VERSION@
MACOS_DEPLOYMENT_SDK = @MACOS_DEPLOYMENT_SDK@
################################################################################
#
# Variables that control how the compiler itself is built
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment