diff --git a/accessible/atk/moz.build b/accessible/atk/moz.build index dae3f86a6049..e177383eec04 100644 --- a/accessible/atk/moz.build +++ b/accessible/atk/moz.build @@ -43,7 +43,7 @@ LOCAL_INCLUDES += [ FINAL_LIBRARY = 'xul' -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: CFLAGS += CONFIG['TK_CFLAGS'] CXXFLAGS += CONFIG['TK_CFLAGS'] diff --git a/accessible/base/moz.build b/accessible/base/moz.build index 4e5f6a904c82..c8c6c2f22098 100644 --- a/accessible/base/moz.build +++ b/accessible/base/moz.build @@ -73,10 +73,11 @@ LOCAL_INCLUDES += [ '/layout/xul/tree/', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: LOCAL_INCLUDES += [ '/accessible/atk', ] + CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': LOCAL_INCLUDES += [ '/accessible/windows/ia2', @@ -93,7 +94,4 @@ else: FINAL_LIBRARY = 'xul' -if CONFIG['MOZ_ENABLE_GTK']: - CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS'] - include('/ipc/chromium/chromium-config.mozbuild') diff --git a/accessible/generic/moz.build b/accessible/generic/moz.build index f1a260388829..28b65335aada 100644 --- a/accessible/generic/moz.build +++ b/accessible/generic/moz.build @@ -36,7 +36,7 @@ LOCAL_INCLUDES += [ '/layout/xul', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: LOCAL_INCLUDES += [ '/accessible/atk', ] diff --git a/accessible/html/moz.build b/accessible/html/moz.build index 0575247f5f17..057b9e168d14 100644 --- a/accessible/html/moz.build +++ b/accessible/html/moz.build @@ -24,7 +24,7 @@ LOCAL_INCLUDES += [ '/layout/xul', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: LOCAL_INCLUDES += [ '/accessible/atk', ] diff --git a/accessible/ipc/moz.build b/accessible/ipc/moz.build index 822340225346..f7c3a7a859b4 100644 --- a/accessible/ipc/moz.build +++ b/accessible/ipc/moz.build @@ -27,7 +27,7 @@ if CONFIG['ACCESSIBILITY']: '../xpcom', ] - if CONFIG['MOZ_ENABLE_GTK']: + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: LOCAL_INCLUDES += [ '/accessible/atk', ] diff --git a/accessible/moz.build b/accessible/moz.build index 993d2202937f..3e8485aff6c5 100644 --- a/accessible/moz.build +++ b/accessible/moz.build @@ -6,7 +6,7 @@ toolkit = CONFIG['MOZ_WIDGET_TOOLKIT'] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in toolkit: DIRS += ['atk'] elif toolkit == 'windows': DIRS += ['windows'] diff --git a/accessible/xpcom/moz.build b/accessible/xpcom/moz.build index 42d940316d89..38c96e81116c 100644 --- a/accessible/xpcom/moz.build +++ b/accessible/xpcom/moz.build @@ -33,7 +33,7 @@ LOCAL_INCLUDES += [ '/accessible/generic', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: LOCAL_INCLUDES += [ '/accessible/atk', ] diff --git a/accessible/xul/moz.build b/accessible/xul/moz.build index 37ba0059ca6b..a1dafd9b1953 100644 --- a/accessible/xul/moz.build +++ b/accessible/xul/moz.build @@ -29,7 +29,7 @@ LOCAL_INCLUDES += [ '/layout/xul/tree', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: LOCAL_INCLUDES += [ '/accessible/atk', ] diff --git a/chrome/moz.build b/chrome/moz.build index 724f39cb32e1..18a060211743 100644 --- a/chrome/moz.build +++ b/chrome/moz.build @@ -36,5 +36,5 @@ LOCAL_INCLUDES += [ '/xpcom/components' ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: CXXFLAGS += CONFIG['TK_CFLAGS'] diff --git a/dom/plugins/base/moz.build b/dom/plugins/base/moz.build index 1706160ebfea..4bdda2ca94d2 100644 --- a/dom/plugins/base/moz.build +++ b/dom/plugins/base/moz.build @@ -72,7 +72,7 @@ else: UNIFIED_SOURCES += [ 'nsPluginsDirUnix.cpp', ] - if CONFIG['MOZ_ENABLE_GTK']: + if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: # This file cannot be built in unified mode because of name clashes in X11 headers. SOURCES += [ 'nsPluginNativeWindowGtk.cpp', diff --git a/old-configure.in b/old-configure.in index 4c6862913156..85b8a842b94b 100644 --- a/old-configure.in +++ b/old-configure.in @@ -3431,7 +3431,6 @@ windows) ;; gtk3) - MOZ_ENABLE_GTK=1 MOZ_ENABLE_XREMOTE=1 MOZ_GL_DEFAULT_PROVIDER=GLX @@ -3446,7 +3445,6 @@ gtk3) ;; gtk2) - MOZ_ENABLE_GTK=1 MOZ_ENABLE_XREMOTE=1 MOZ_GL_DEFAULT_PROVIDER=GLX @@ -3532,6 +3530,14 @@ if test "$MOZ_INSTRUMENT_EVENT_LOOP"; then AC_DEFINE(MOZ_INSTRUMENT_EVENT_LOOP) fi +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 +gtk*) + MOZ_ENABLE_GTK=1 + ;; +esac + if test "$COMPILE_ENVIRONMENT"; then if test "$MOZ_WIDGET_TOOLKIT" = gtk3; then PKG_CHECK_MODULES(MOZ_GTK3, gtk+-3.0 >= $GTK3_VERSION gtk+-unix-print-3.0 glib-2.0 gobject-2.0 $GDK_PACKAGES) @@ -3792,7 +3798,6 @@ AC_SUBST(GTK_CONFIG) AC_SUBST_LIST(TK_CFLAGS) AC_SUBST_LIST(TK_LIBS) -AC_SUBST(MOZ_ENABLE_GTK) AC_SUBST(MOZ_ENABLE_QT) AC_SUBST(MOZ_ENABLE_QTNETWORK) AC_SUBST(MOZ_ENABLE_QMSYSTEM2) diff --git a/toolkit/components/remote/moz.build b/toolkit/components/remote/moz.build index e1ba3cecc078..5b81eab78180 100644 --- a/toolkit/components/remote/moz.build +++ b/toolkit/components/remote/moz.build @@ -14,7 +14,7 @@ SOURCES += [ 'nsXRemoteService.cpp', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: SOURCES += [ 'nsGTKRemoteService.cpp', ] diff --git a/toolkit/crashreporter/client/moz.build b/toolkit/crashreporter/client/moz.build index 8d8e96e4399d..1df3f186666b 100644 --- a/toolkit/crashreporter/client/moz.build +++ b/toolkit/crashreporter/client/moz.build @@ -49,7 +49,7 @@ elif CONFIG['OS_ARCH'] == 'SunOS': 'breakpad_solaris_common_s', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: UNIFIED_SOURCES += [ 'crashreporter_gtk_common.cpp', 'crashreporter_linux.cpp', diff --git a/toolkit/mozapps/update/updater/updater-common.build b/toolkit/mozapps/update/updater/updater-common.build index f4b40ccae9c1..1f238a4952f6 100644 --- a/toolkit/mozapps/update/updater/updater-common.build +++ b/toolkit/mozapps/update/updater/updater-common.build @@ -67,7 +67,7 @@ else: 'bz2', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: have_progressui = 1 srcs += [ 'progressui_gtk.cpp', diff --git a/toolkit/system/gnome/moz.build b/toolkit/system/gnome/moz.build index 0ecde073653e..e8ca72d3a89f 100644 --- a/toolkit/system/gnome/moz.build +++ b/toolkit/system/gnome/moz.build @@ -33,7 +33,7 @@ CXXFLAGS += CONFIG['MOZ_GIO_CFLAGS'] CXXFLAGS += CONFIG['GLIB_CFLAGS'] CXXFLAGS += CONFIG['MOZ_DBUS_GLIB_CFLAGS'] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: CXXFLAGS += CONFIG['TK_CFLAGS'] if CONFIG['GNU_CXX']: diff --git a/toolkit/toolkit.mozbuild b/toolkit/toolkit.mozbuild index a4194d66c996..5cad0f681380 100644 --- a/toolkit/toolkit.mozbuild +++ b/toolkit/toolkit.mozbuild @@ -155,7 +155,7 @@ DIRS += [ '/toolkit/library', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: DIRS += ['/toolkit/system/gnome'] DIRS += ['/addon-sdk'] diff --git a/toolkit/xre/moz.build b/toolkit/xre/moz.build index 002987c5fdf2..098e160bf8f1 100644 --- a/toolkit/xre/moz.build +++ b/toolkit/xre/moz.build @@ -52,7 +52,7 @@ elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': 'nsNativeAppSupportQt.cpp', 'nsQAppInstance.cpp', ] -elif CONFIG['MOZ_ENABLE_GTK']: +elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: UNIFIED_SOURCES += [ 'nsNativeAppSupportUnix.cpp', ] diff --git a/uriloader/exthandler/moz.build b/uriloader/exthandler/moz.build index b2aaa70660f6..13e1a999f86e 100644 --- a/uriloader/exthandler/moz.build +++ b/uriloader/exthandler/moz.build @@ -78,7 +78,7 @@ else: osdir + '/nsOSHelperAppService.cpp', ] -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: UNIFIED_SOURCES += [ 'unix/nsGNOMERegistry.cpp', 'unix/nsMIMEInfoUnix.cpp', diff --git a/widget/moz.build b/widget/moz.build index 953afe9de6fe..f7ef2b3b270f 100644 --- a/widget/moz.build +++ b/widget/moz.build @@ -49,7 +49,7 @@ TEST_DIRS += ['tests'] # multiple implementations of widget can be built on the same # source tree. # -if CONFIG['MOZ_ENABLE_GTK']: +if 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']: DIRS += ['gtk'] if CONFIG['MOZ_X11']: