>From 532abecb72f12c83c2b2f129fbc5f56387f5895c Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sat, 1 Dec 2018 13:36:58 +0000 Subject: [PATCH] ; Add notes about cross-compiling macOS versions --- etc/NEWS | 3 +++ nextstep/INSTALL | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/etc/NEWS b/etc/NEWS index 399508cacc..103dbf127e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -178,6 +178,9 @@ optional argument to do so. * Changes in Emacs 26.2 on Non-Free Operating Systems +** macOS features can now be detected at at run-time as well as at +build-time. See nextstep/INSTALL for details. + * Installation Changes in Emacs 26.1 diff --git a/nextstep/INSTALL b/nextstep/INSTALL index 64f8f8fcf7..726a897c37 100644 --- a/nextstep/INSTALL +++ b/nextstep/INSTALL @@ -45,6 +45,35 @@ files will be installed under whatever 'prefix' is set to (defaults to require 'sudo' for "make install"). +Targeting different macOS versions +---------------------------------- + +The Emacs build process automatically enables or disables macOS +features according to the version of macOS it is being built on. It +is possible to override this automatic configuration if you are +targeting a different version of macOS, or wish to build one +executable that is able to enable or disable features at run-time. + +To build a version compatible with an older version of macOS use this +flag: + + -DMAC_OS_X_VERSION_MIN_REQUIRED=x + +and to build for a newer version of macOS: + + -DMAC_OS_X_VERSION_MAX_ALLOWED=x + +For example, to enable run-time checks for features available between +macOS 10.6, and 10.12 inclusive: + + ./configure --with-ns CFLAGS="-DMAC_OS_X_VERSION_MIN_REQUIRED=1060 \ + -DMAC_OS_X_VERSION_MAX_ALLOWED=101200 -g3 -O2" + +The macOS version numbers are formatted as 10x0 for macOS up to 10.10, +and 10xx00 for macOS 10.10 and above. A full list is provided in +/usr/include/AvailabilityMacros.h. + + Installation ------------ -- 2.19.1