diff options
author | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2008-02-19 03:17:55 +0000 |
---|---|---|
committer | Manuel M T Chakravarty <chak@cse.unsw.edu.au> | 2008-02-19 03:17:55 +0000 |
commit | 15575cf8f17fee0fdd3151c5dbb0a0f89b01c708 (patch) | |
tree | 642982c6c7808c809ff6c18186424a687be84914 /aclocal.m4 | |
parent | eb389b71b13d8a661cbb9d890f6033530723e21a (diff) | |
download | haskell-15575cf8f17fee0fdd3151c5dbb0a0f89b01c708.tar.gz |
Add configure option --with-macos-deployment-target
Diffstat (limited to 'aclocal.m4')
-rw-r--r-- | aclocal.m4 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/aclocal.m4 b/aclocal.m4 index d30b10146d..c72d15d9ac 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 # -------------------------------------------------------------- |