Add support for building against X11-based toolkits on OS X.

Bug #191447 r=pavlov
This commit is contained in:
seawood%netscape.com 2003-03-04 04:06:33 +00:00
parent d76e9fd54a
commit ec26667992
7 changed files with 448 additions and 412 deletions

807
configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -831,17 +831,8 @@ case "$target" in
STRIP="$STRIP -x -S"
case "${target_cpu}" in
powerpc*)
AC_DEFINE(XP_MACOSX)
AC_DEFINE(TARGET_CARBON)
AC_DEFINE(TARGET_API_MAC_CARBON)
no_x=yes
MACOSX=1
_PLATFORM_DEFAULT_TOOLKIT='mac'
DSO_LDOPTS="$DSO_LDOPTS -arch ppc"
TK_LIBS='-framework Carbon /System/Library/Frameworks/Carbon.framework/Carbon'
TK_CFLAGS="-I/Developer/Headers/FlatCarbon -F/System/Library/Frameworks"
CFLAGS="$CFLAGS $TK_CFLAGS"
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
MOZ_ENABLE_POSTSCRIPT=
;;
esac
@ -1762,6 +1753,7 @@ esac
AC_CHECK_HEADERS(sys/byteorder.h compat.h getopt.h)
AC_CHECK_HEADERS(sys/bitypes.h memory.h unistd.h)
AC_CHECK_HEADERS(gnu/libc-version.h nl_types.h)
AC_CHECK_HEADERS(malloc.h)
AC_CHECK_HEADERS(X11/XKBlib.h)
dnl These are all the places some variant of statfs can be hiding.
@ -3062,9 +3054,18 @@ photon)
MOZ_ENABLE_PHOTON=1
AC_DEFINE(MOZ_WIDGET_PHOTON)
;;
cocoa)
MOZ_ENABLE_COCOA=1
AC_DEFINE(MOZ_WIDGET_COCOA)
mac|cocoa)
TK_LIBS='-framework Carbon /System/Library/Frameworks/Carbon.framework/Carbon'
TK_CFLAGS="-I/Developer/Headers/FlatCarbon -F/System/Library/Frameworks"
CFLAGS="$CFLAGS $TK_CFLAGS"
CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
AC_DEFINE(XP_MACOSX)
AC_DEFINE(TARGET_CARBON)
AC_DEFINE(TARGET_API_MAC_CARBON)
if test "$MOZ_WIDGET_TOOLKIT" = "cocoa"; then
MOZ_ENABLE_COCOA=1
AC_DEFINE(MOZ_WIDGET_COCOA)
fi
;;
esac
@ -3141,6 +3142,7 @@ if test "$MOZ_ENABLE_GTK" \
|| test "$MOZ_ENABLE_GTK2"
then
AC_DEFINE(MOZ_X11)
_X11_TOOLKIT=1
fi
@ -3246,7 +3248,7 @@ MOZ_ARG_DISABLE_BOOL(postscript,
dnl ========================================================
dnl = Xprint print module
dnl ========================================================
if test "$no_x" != "yes"
if test "$_X11_TOOLKIT"
then
MOZ_ENABLE_XPRINT=1

View File

@ -85,7 +85,7 @@ ifeq ($(MOZ_WIDGET_TOOLKIT),os2)
CPPSRCS += nsPluginsDirOS2.cpp
CPPSRCS += nsPluginNativeWindowOS2.cpp
else
ifeq ($(OS_ARCH),Darwin)
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
CPPSRCS += nsPluginsDirDarwin.cpp
CPPSRCS += nsPluginNativeWindow.cpp
else
@ -145,13 +145,8 @@ EXTRA_DSO_LDOPTS += -lgtkxtbin $(XLDFLAGS) $(XT_LIBS) $(MOZ_GTK2_LIBS) $(XLIBS)
endif #MOZ_ENABLE_GTK2
ifdef MOZ_ENABLE_XLIB
EXTRA_DSO_LDOPTS += -lxlibxtbin -lxlibrgb $(XLDFLAGS) $(XT_LIBS)
ifndef MOZ_MONOLITHIC_TOOLKIT
EXTRA_DSO_LDOPTS += -lxlibxtbin -lxlibrgb $(XLDFLAGS) $(XT_LIBS) $(XLIBS)
CXXFLAGS += $(MOZ_XLIB_CFLAGS)
CFLAGS += $(MOZ_XLIB_CFLAGS)
else
CXXFLAGS += $(TK_CFLAGS)
CFLAGS += $(TK_CFLAGS)
endif #MOZ_MONOLITHIC_TOOLKIT
endif #MOZ_ENABLE_XLIB

View File

@ -3,7 +3,7 @@
FILE: icalerror.c
CREATOR: eric 16 May 1999
$Id: icalerror.c,v 1.4 2002/11/06 21:22:28 mostafah%oeone.com Exp $
$Id: icalerror.c,v 1.5 2003/03/04 04:06:00 seawood%netscape.com Exp $
$Locker: $
@ -30,9 +30,7 @@
#endif
#include "icalerror.h"
#ifdef XP_MAC
#include <string.h>
#endif
icalerrorenum icalerrno;

View File

@ -5,7 +5,7 @@
DESCRIPTION:
$Id: icallangbind.c,v 1.8 2002/12/11 04:14:41 seawood%netscape.com Exp $
$Id: icallangbind.c,v 1.9 2003/03/04 04:06:01 seawood%netscape.com Exp $
$Locker: $
(C) COPYRIGHT 1999 Eric Busboom
@ -25,12 +25,10 @@
#include <string.h>
#ifdef XP_MAC
#include <extras.h> /* for malloc */
#include <stdlib.h> /* for free */
#elif defined(XP_MACOSX)
#include <stdlib.h>
#else
#elif defined(HAVE_MALLOC_H)
#include <malloc.h>
#endif
#include <stdlib.h> /* for free */
#ifdef WIN32
#define snprintf _snprintf

View File

@ -200,7 +200,7 @@ include $(topsrcdir)/config/static-rules.mk
endif # BUILD_STATIC_LIBS
ifeq ($(OS_ARCH),Darwin)
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
LOCAL_INCLUDES += -I$(topsrcdir)/widget/src/mac
ifdef BUILD_STATIC_LIBS
EXTRA_LIBS += -framework QuickTime

View File

@ -307,7 +307,9 @@ endif
ifeq ($(OS_ARCH),Darwin)
EXTRA_DSO_LDOPTS := $(subst -dynamiclib -install_name @executable_path/\$@ -compatibility_version 1 -current_version 1,-execute,$(EXTRA_DSO_LDOPTS))
endif
ifneq (,$(filter mac cocoa,$(MOZ_WIDGET_TOOLKIT)))
ifdef BUILD_STATIC_LIBS
LIBS += -framework QuickTime
endif