Kaydet (Commit) c7225093 authored tarafından Herbert Dürr's avatar Herbert Dürr

#114728# use 10.7 SDK as default, but allow newer SDK in configure

Patch by: Juergen Schmidt <jsc@apache.org>
üst 8028df6f
......@@ -937,6 +937,10 @@ AC_ARG_WITH(rat-scan,
a separately installed library.
],with_rat_scan=$withval,)
AC_ARG_WITH(macosx-sdk-version,
[ --with-macosx-sdk-version=<version> Specify the MacOSX platform SDK version, default is 10.7. Only 10.7 or higher is supported.
],,)
BUILD_TYPE="OOo"
ADDITIONAL_REPOSITORIES="../ext_libraries"
SCPDEFS=""
......@@ -1142,6 +1146,12 @@ case "$build_os" in
echo "Disabling gtk-quickstarter - not supported on Mac. Use --disable-systray" >>warn
enable_systray=no
fi
if test ! -n "$CC"; then
CC="`xcrun -f clang` -arch x86_64"
fi
if test ! -n "$CXX"; then
CXX="`xcrun -f clang++` -arch x86_64 -std=c++11"
fi
;;
os2*)
test_x=no
......@@ -3895,6 +3905,44 @@ AC_SUBST(SYSTEM_LIBXML)
AC_SUBST(LIBXML_CFLAGS)
AC_SUBST(LIBXML_LIBS)
dnl ===================================================================
dnl Checks for MacOS platform SDK. Default is 10.7
dnl ===================================================================
if test "$_os" = "Darwin"; then
AC_MSG_CHECKING([checking MacOS platform SDK])
sdk_version=10.7
if test -n "$with_macosx_sdk_version"; then
sdk_version=$with_macosx_sdk_version
fi
sdk_minor=`echo $sdk_version | cut -d"." -f2`
if test "$sdk_minor" -lt "7"; then
AC_MSG_ERROR([SDK version < 10.7 is not longer supported])
else
AC_MSG_RESULT([yes])
if test "$sdk_minor" -ge "7"; then
MACOSX_DEPLOYMENT_TARGET=$sdk_version
fi
sdk_path=`xcodebuild -version -sdk macosx$MACOSX_DEPLOYMENT_TARGET Path`
AC_MSG_CHECKING([for $sdk_path])
if test -d "$sdk_path"; then
AC_MSG_RESULT([yes])
else
AC_MSG_ERROR([No proper MacOS platform SDK, not found])
fi
MACOSX_SDK_PATH=$sdk_path
fi
fi
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
AC_SUBST(MACOSX_SDK_PATH)
dnl ===================================================================
dnl Check for system python
dnl ===================================================================
......@@ -3919,10 +3967,10 @@ if test "$_os" = "Darwin" && test "$with_system_python" != "no"; then
if test -d "/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"; then
PYTHON_CFLAGS="-I/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
elif test -d "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/python$_python_ver"; then
PYTHON_CFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/usr/include/python$_python_ver"
elif test -d "$MACOSX_SDK_PATH/usr/include/python$_python_ver"; then
PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/usr/include/python$_python_ver"
else
PYTHON_CFLAGS="-I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
PYTHON_CFLAGS="-I$MACOSX_SDK_PATH/System/Library/Frameworks/Python.framework/Versions/$_python_ver/include/python$_python_ver"
fi
else
AC_MSG_ERROR([Python 2.7.1 or higher is required])
......@@ -4782,6 +4830,7 @@ AC_SUBST(SYSTEM_GRAPHITE)
AC_SUBST(GRAPHITE_LIBS)
AC_SUBST(GRAPHITE_CFLAGS)
dnl ===================================================================
dnl Checks for libraries.
dnl ===================================================================
......
......@@ -96,7 +96,7 @@ my ( $oldPATH, $SRC_ROOT, $SO_HOME, $JAVA_HOME, $JDK, $JAVAFLAGS, $OOO_SHELL,
$SOLARSRC, $DEVROOT, $SOLARVER, $SOLARVERSION, $WORKDIR, $OUTDIR, $SOLARENV,
$STAR_INIROOT, $STAR_INIROOTOLD, $STAR_STANDLST, $STAR_SSCOMMON, $STAR_SSOLARINI,
$DMAKEROOT, $CLASSPATH, $XCLASSPATH, $COMPATH, $CXX_X64_BINARY, $LINK_X64_BINARY, $LIBMGR_X64_BINARY,
$MSPDB_PATH, $MIDL_PATH, $CSC_PATH, $SDK_PATH,
$MSPDB_PATH, $MIDL_PATH, $CSC_PATH, $MACOSX_DEPLOYMENT_TARGET, $MACOSX_SDK_PATH,
$PATH, $SOLAREXTRAINC, $SOLAREXTRALIB, $SOLARLIB,
$SOLARINC, $LOCALINI, $FRAMEWORKSHOME, $COMEX, $PERL,
$COMP_ENV, $ILIB, $JAVAHOME, $PSDK_HOME, $DIRECTXSDK_LIB, $USE_NEW_SDK, $FRAME_HOME,
......@@ -1440,8 +1440,7 @@ elsif ($platform =~ m/cygwin/)
}
elsif ($platform =~ m/darwin/)
{
$SDK_PATH = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk";
$FRAMEWORKSHOME = $SDK_PATH."/System/Library/Frameworks";
$FRAMEWORKSHOME = "@MACOSX_SDK_PATH@/System/Library/Frameworks";
my $STLINC .= $I."/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/c++/v1/";
$SOLARINC .= $STLINC . $I.$FRAMEWORKSHOME.$ds."JavaVM.framework".$ds."Headers";
$GUIBASE = "aqua";
......@@ -1675,11 +1674,10 @@ if ( $platform =~ m/darwin/ )
{
# MAXOSX_DEPLOYMENT_TARGET : The minimum version required to run the build,
# build can assume functions/libraries of that version to be available
# unless you want to do runtime checks for 10.5 api, you also want to use the 10.7 sdk
# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
# http://developer.apple.com/technotes/tn2002/tn2064.html
ToFile( "MACOSX_DEPLOYMENT_TARGET", "10.7", "e" );
ToFile( "SDK_PATH", $SDK_PATH, "e" );
ToFile( "MACOSX_DEPLOYMENT_TARGET", "@MACOSX_DEPLOYMENT_TARGET@", "e" );
ToFile( "MACOSX_SDK_PATH", "@MACOSX_SDK_PATH@", "e" );
}
#
......
......@@ -71,9 +71,9 @@ gb_CPUDEFS := -DX86_64
endif
ifeq ($(strip $(SYSBASE)),)
gb_SDKDIR := $(SDK_PATH)
gb_SDKDIR := $(MACOSX_SDK_PATH)
else
gb_SDKDIR := $(SYSBASE)/MacOSX10.7.sdk
gb_SDKDIR := $(SYSBASE)/MacOSX$(MACOSX_DEPLOYMENT_TARGET).sdk
endif
......
......@@ -40,10 +40,8 @@ CDEFS+=-DGLIBC=2 -D_PTHREADS -D_REENTRANT -DNO_PTHREAD_PRIORITY $(PROCESSOR_DEFI
# (safer/easier than dealing with the MAC_OS_X_VERSION_MAX_ALLOWED macro)
# http://developer.apple.com/technotes/tn2002/tn2064.html
# done in setsolar/configure now. left here for documentation
#MACOSX_DEPLOYMENT_TARGET=10.7
#.EXPORT: MACOSX_DEPLOYMENT_TARGET
CDEFS+=-DQUARTZ
EXTRA_CDEFS*=-isysroot $(SDK_PATH)
EXTRA_CDEFS*=-isysroot $(MACOSX_SDK_PATH)
# Name of library where static data members are initialized
# STATICLIBNAME=static$(DLLPOSTFIX)
......@@ -169,7 +167,7 @@ LINK*=$(CXX)
LINKC*=$(CC)
###LINKFLAGSDEFS*=-Wl,-multiply_defined,suppress
EXTRA_LINKFLAGS*=-L$(SDK_PATH)
EXTRA_LINKFLAGS*=-L$(MACOSX_SDK_PATH)
# Very long install_names are needed so that install_name_tool -change later on
# does not complain that "larger updated load commands do not fit:"
LINKFLAGSRUNPATH_URELIB=-install_name '@__________________________________________________URELIB/$(@:f)'
......
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