--- old/common/autoconf/spec.gmk.in 2013-02-14 16:57:24.468468856 +0100 +++ new/common/autoconf/spec.gmk.in 2013-02-14 16:57:24.378453277 +0100 @@ -282,6 +282,9 @@ X_LIBS:=@X_LIBS@ OPENWIN_HOME:=@OPENWIN_HOME@ +# The lowest required version of macosx to enforce compatiblity for +MACOSX_REQUIRED_VERSION=@MACOSX_REQUIRED_VERSION@ + # There are two types: CC or CL # CC is gcc and others behaving reasonably similar. # CL is cl.exe only. --- old/common/autoconf/toolchain.m4 2013-02-14 16:57:24.878539819 +0100 +++ new/common/autoconf/toolchain.m4 2013-02-14 16:57:24.778522515 +0100 @@ -876,6 +876,10 @@ fi if test "x$OPENJDK_TARGET_OS" = xmacosx; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMACOSX -D_ALLBSD_SOURCE" + # Adding these macros will make it an error to link to mac APIs newer than OS version 10.7 + MACOSX_REQUIRED_VERSION=1070 + AC_SUBST(MACOSX_REQUIRED_VERSION) + CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=\$(MACOSX_REQUIRED_VERSION)" fi if test "x$OPENJDK_TARGET_OS" = xbsd; then CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DBSD -D_ALLBSD_SOURCE"