add support for OSX 10.3 SDK support so build done on 10.3 can be run on
previous OS versions. Enabled with configure flag --with-macos-sdk=dir (bug 224161, r=bryner)
This commit is contained in:
Родитель
2cabccd5b2
Коммит
60aa753170
|
@ -260,7 +260,7 @@ XARGS = @XARGS@
|
|||
STRIP = @STRIP@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
MAKE = @MAKE@
|
||||
PBBUILD = @PBBUILD@
|
||||
PBBUILD_BIN = @PBBUILD@
|
||||
|
||||
ifdef MOZ_NATIVE_JPEG
|
||||
JPEG_CFLAGS = @JPEG_CFLAGS@
|
||||
|
@ -423,3 +423,4 @@ MOZ_STANDALONE_COMPOSER= @MOZ_STANDALONE_COMPOSER@
|
|||
MOZ_STATIC_MAIL_BUILD = @MOZ_STATIC_MAIL_BUILD@
|
||||
|
||||
MOZ_COMPONENTLIB = @MOZ_COMPONENTLIB@
|
||||
MACOS_SDK_DIR = @MACOS_SDK_DIR@
|
||||
|
|
|
@ -663,6 +663,10 @@ ifdef USE_PREBINDING
|
|||
export LD_PREBIND=1
|
||||
export LD_SEG_ADDR_TABLE=$(shell cd $(topsrcdir); pwd)/config/prebind-address-table
|
||||
endif
|
||||
ifdef MACOS_SDK_DIR
|
||||
export NEXT_ROOT=$(MACOS_SDK_DIR)
|
||||
endif
|
||||
PBBUILD=NEXT_ROOT= $(PBBUILD_BIN)
|
||||
endif
|
||||
|
||||
ifdef MOZ_NATIVE_MAKEDEPEND
|
||||
|
|
35
configure.in
35
configure.in
|
@ -445,6 +445,26 @@ AC_SUBST(GNU_LD)
|
|||
AC_SUBST(GNU_CC)
|
||||
AC_SUBST(GNU_CXX)
|
||||
|
||||
dnl ========================================================
|
||||
dnl = Mac OS X SDK support
|
||||
dnl ========================================================
|
||||
MACOS_SDK_DIR=
|
||||
MOZ_ARG_WITH_STRING(macos-sdk,
|
||||
[ --with-macos-sdk=dir Location of platform SDK to use (Mac OS X only)],
|
||||
MACOS_SDK_DIR=$withval)
|
||||
|
||||
AC_SUBST(MACOS_SDK_DIR)
|
||||
|
||||
if test "$MACOS_SDK_DIR"; then
|
||||
export NEXT_ROOT=$MACOS_SDK_DIR
|
||||
CFLAGS="-I${MACOS_SDK_DIR}/usr/include $CFLAGS"
|
||||
CXXFLAGS="-I${MACOS_SDK_DIR}/usr/include $CXXFLAGS"
|
||||
changequote(,)
|
||||
GCC_VERSION=`echo $CXX_VERSION | perl -pe "s/gcc version ([^ ]*).*/\1/"`
|
||||
changequote([,])
|
||||
LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION} -L${MACOS_SDK_DIR}/usr/lib $LIBS"
|
||||
fi
|
||||
|
||||
dnl ========================================================
|
||||
dnl Checks for programs.
|
||||
dnl ========================================================
|
||||
|
@ -3154,8 +3174,8 @@ photon)
|
|||
AC_DEFINE(MOZ_WIDGET_PHOTON)
|
||||
;;
|
||||
mac|cocoa)
|
||||
TK_LIBS='-framework Carbon /System/Library/Frameworks/Carbon.framework/Carbon'
|
||||
TK_CFLAGS="-I/Developer/Headers/FlatCarbon -F/System/Library/Frameworks"
|
||||
TK_LIBS='-framework Carbon'
|
||||
TK_CFLAGS="-I${MACOS_SDK_DIR}/Developer/Headers/FlatCarbon"
|
||||
CFLAGS="$CFLAGS $TK_CFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
|
||||
MOZ_USER_DIR="Mozilla"
|
||||
|
@ -4727,6 +4747,13 @@ MOZ_ARG_WITHOUT_BOOL(libIDL,
|
|||
if test "$SKIP_IDL_CHECK" = "no"
|
||||
then
|
||||
_LIBIDL_FOUND=
|
||||
if test "$MACOS_SDK_DIR"; then
|
||||
changequote(,)
|
||||
LIBS=`echo $LIBS|sed -e "s?-L${MACOS_SDK_DIR}/usr/lib[^ ]*??g"`
|
||||
changequote([,])
|
||||
unset NEXT_ROOT
|
||||
fi
|
||||
|
||||
if test "$MOZ_ENABLE_GTK2"; then
|
||||
PKG_CHECK_MODULES(LIBIDL, libIDL-2.0 >= 0.8.0,_LIBIDL_FOUND=1)
|
||||
fi
|
||||
|
@ -4754,6 +4781,10 @@ then
|
|||
AC_MSG_ERROR([libIDL not found.
|
||||
libIDL $LIBIDL_VERSION or higher is required.])
|
||||
fi
|
||||
if test "$MACOS_SDK_DIR"; then
|
||||
LIBS="-L${MACOS_SDK_DIR}/usr/lib/gcc/darwin/${GCC_VERSION} -L${MACOS_SDK_DIR}/usr/lib $LIBS"
|
||||
export NEXT_ROOT=$MACOS_SDK_DIR
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$CROSS_COMPILE"; then
|
||||
|
|
|
@ -1249,8 +1249,10 @@ nsCacheService::SetMemoryCacheCapacity(PRInt32 capacity)
|
|||
#elif defined(__hpux)
|
||||
#include <sys/pstat.h>
|
||||
#elif defined(XP_MACOSX)
|
||||
extern "C" {
|
||||
#include <mach/mach_init.h>
|
||||
#include <mach/mach_host.h>
|
||||
}
|
||||
#elif defined(XP_OS2)
|
||||
#define INCL_DOSMISC
|
||||
#include <os2.h>
|
||||
|
|
|
@ -79,5 +79,10 @@ HOST_CFLAGS += -DMDCPUCFG=$(HOST_NSPR_MDCPUCFG)
|
|||
endif
|
||||
endif
|
||||
|
||||
ifdef MACOS_SDK_DIR
|
||||
NEXT_ROOT=
|
||||
OS_LIBS := $(patsubst -L$(MACOS_SDK_DIR)/usr/lib%,,$(OS_LIBS))
|
||||
endif
|
||||
|
||||
export::
|
||||
@$(MAKE) libs
|
||||
|
|
|
@ -90,12 +90,16 @@ REZ_TOOL = /Developer/Tools/Rez
|
|||
SDEF_SRC = $(srcdir)/mozilla.sdef
|
||||
RES_DEST = mozillaSuite.r
|
||||
RSRC_DEST = mozillaSuite.rsrc
|
||||
PACKAGE_DIR = $(DIST)/package
|
||||
|
||||
$(RSRC_DEST): $(SDEF_SRC)
|
||||
$(SDP_TOOL) -fa -o $(RES_DEST) $(SDEF_SRC)
|
||||
$(RSRC_DEST): $(SDEF_SRC) $(PACKAGE_DIR)
|
||||
NEXT_ROOT= $(SDP_TOOL) -fa -o $(RES_DEST) $(SDEF_SRC)
|
||||
$(REZ_TOOL) -useDF -o $(RSRC_DEST) $(RES_DEST)
|
||||
cp $(RSRC_DEST) $(DIST)/package/
|
||||
rm -f $(RES_DEST) $(RSRC_DEST)
|
||||
cp $(RSRC_DEST) $(PACKAGE_DIR)
|
||||
rm -f $(RES_DEST)
|
||||
|
||||
$(PACKAGE_DIR):
|
||||
mkdir $(PACKAGE_DIR)
|
||||
|
||||
libs:: $(RSRC_DEST)
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче