diff --git a/js/xpconnect/shell/moz.build b/js/xpconnect/shell/moz.build index 92ba77713945..55f9356af95e 100644 --- a/js/xpconnect/shell/moz.build +++ b/js/xpconnect/shell/moz.build @@ -63,6 +63,11 @@ if CONFIG["OS_ARCH"] == "WINNT": # only enable it for processes that are not using JIT in xul.dll. LINK_FLAGS["CETCOMPAT"] = [] +if CONFIG["OS_TARGET"] == "Darwin": + OS_LIBS += [ + "-framework Foundation", + ] + CFLAGS += CONFIG["TK_CFLAGS"] CXXFLAGS += CONFIG["TK_CFLAGS"] OS_LIBS += CONFIG["TK_LIBS"] diff --git a/old-configure.in b/old-configure.in index 59687ece84b4..a7b99c5115ef 100644 --- a/old-configure.in +++ b/old-configure.in @@ -1259,22 +1259,6 @@ dnl ======================================================== dnl = Enable the toolkit as needed = dnl ======================================================== -case "$MOZ_WIDGET_TOOLKIT" in - -cocoa) - # Use -Wl as a trick to avoid -framework and framework names from - # being separated by AC_SUBST_LIST. - TK_LIBS='-Wl,-framework,Foundation -Wl,-framework,CoreFoundation -Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,CoreVideo -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL -Wl,-framework,Security -Wl,-framework,ServiceManagement -Wl,-framework,CoreServices -Wl,-framework,ApplicationServices -Wl,-framework,AppKit -Wl,-framework,CoreMIDI' - TK_CFLAGS="" - ;; - -uikit) - TK_CFLAGS="" - TK_LIBS='-Wl,-framework,Foundation -Wl,-framework,CoreFoundation -Wl,-framework,CoreGraphics -Wl,-framework,CoreText -Wl,-framework,AVFoundation -Wl,-framework,AudioToolbox -Wl,-framework,CoreMedia -Wl,-framework,CoreVideo -Wl,-framework,OpenGLES -Wl,-framework,QuartzCore' - ;; - -esac - dnl there are a lot of tests on MOZ_ENABLE_GTK below, that are more convenient dnl to keep that way than testing against MOZ_WIDGET_TOOLKIT case "$MOZ_WIDGET_TOOLKIT" in diff --git a/toolkit/library/moz.build b/toolkit/library/moz.build index 2c3f86948ed1..5d70297a1313 100644 --- a/toolkit/library/moz.build +++ b/toolkit/library/moz.build @@ -198,9 +198,6 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" or CONFIG["MOZ_TREE_FREETYPE"]: "freetype", ] -if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": - CXXFLAGS += CONFIG["TK_CFLAGS"] - if CONFIG["MOZ_WEBRTC"]: if CONFIG["OS_TARGET"] == "WINNT": OS_LIBS += [ @@ -216,7 +213,23 @@ if CONFIG["MOZ_WEBRTC"]: if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": OS_LIBS += [ + "-framework Foundation", + "-framework CoreFoundation", + "-framework CoreLocation", + "-framework QuartzCore", + "-framework Carbon", + "-framework CoreAudio", + "-framework CoreVideo", + "-framework AudioToolbox", + "-framework AudioUnit", + "-framework AddressBook", "-framework OpenGL", + "-framework Security", + "-framework ServiceManagement", + "-framework CoreServices", + "-framework ApplicationServices", + "-framework AppKit", + "-framework CoreMIDI", "-framework SystemConfiguration", "-framework AVFoundation", "-framework CoreMedia", @@ -227,6 +240,20 @@ if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": "cups", ] +if CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit": + OS_LIBS += [ + "-framework Foundation", + "-framework CoreFoundation", + "-framework CoreGraphics", + "-framework CoreText", + "-framework AVFoundation", + "-framework AudioToolbox", + "-framework CoreMedia", + "-framework CoreVideo", + "-framework OpenGLES", + "-framework QuartzCore", + ] + if CONFIG["MOZ_WMF"]: OS_LIBS += [ "mfuuid", @@ -283,9 +310,6 @@ if CONFIG["HAVE_CLOCK_MONOTONIC"]: OS_LIBS += CONFIG["ICONV_LIBS"] -if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "uikit"): - OS_LIBS += CONFIG["TK_LIBS"] - if CONFIG["OS_ARCH"] == "OpenBSD": OS_LIBS += [ "sndio", diff --git a/widget/cocoa/moz.build b/widget/cocoa/moz.build index b150e85ab786..e664203564fc 100644 --- a/widget/cocoa/moz.build +++ b/widget/cocoa/moz.build @@ -178,8 +178,6 @@ RESOURCE_FILES.__setattr__( ], ) -CXXFLAGS += CONFIG["TK_CFLAGS"] - OS_LIBS += [ "-framework IOSurface", ] diff --git a/xpcom/build/moz.build b/xpcom/build/moz.build index 886f80c84c05..d86af97cfe0e 100755 --- a/xpcom/build/moz.build +++ b/xpcom/build/moz.build @@ -105,6 +105,3 @@ if CONFIG["MOZ_VPX"]: LOCAL_INCLUDES += [ "/media/libvpx", ] - -if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa": - CXXFLAGS += CONFIG["TK_CFLAGS"]