Bug 1256988 - Move MOZ_WIDGET_* defines to moz.configure. r=chmanchester
authorMike Hommey <mh+mozilla@glandium.org>
Wed, 16 Mar 2016 14:14:25 +0900
changeset 326952 0acd12e7da2a4b50965f95951c922f3e8d0478ee
parent 326951 5d3e4758be9db53a8b4553e5adce180d889534c7
child 326953 0d152cfe1c2786b7bbf8e15dc60f086fa10b43f2
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1256988
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1256988 - Move MOZ_WIDGET_* defines to moz.configure. r=chmanchester
old-configure.in
toolkit/moz.configure
--- a/old-configure.in
+++ b/old-configure.in
@@ -3431,83 +3431,76 @@ windows)
 gtk3)
     MOZ_ENABLE_XREMOTE=1
     MOZ_GL_DEFAULT_PROVIDER=GLX
 
     AC_DEFINE(MOZ_X11)
     MOZ_X11=1
     USE_FC_FREETYPE=1
 
-    AC_DEFINE_UNQUOTED(MOZ_WIDGET_GTK,3)
     MOZ_PDF_PRINTING=1
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 gtk2)
     MOZ_ENABLE_XREMOTE=1
     MOZ_GL_DEFAULT_PROVIDER=GLX
 
     AC_DEFINE(MOZ_X11)
     MOZ_X11=1
     USE_FC_FREETYPE=1
 
-    AC_DEFINE_UNQUOTED(MOZ_WIDGET_GTK,2)
     MOZ_PDF_PRINTING=1
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 qt)
     MOZ_ENABLE_QT=1
     if test -z "$WITHOUT_X11"; then
       MOZ_ENABLE_XREMOTE=1
       MOZ_GL_DEFAULT_PROVIDER=GLX
       MOZ_X11=1
       AC_DEFINE(MOZ_X11)
       XT_LIBS=
     fi
 
     USE_FC_FREETYPE=1
-    AC_DEFINE(MOZ_WIDGET_QT)
     MOZ_PDF_PRINTING=1
     AC_DEFINE(QT_NO_KEYWORDS)
     ;;
 
 cocoa)
-    AC_DEFINE(MOZ_WIDGET_COCOA)
     LDFLAGS="$LDFLAGS -framework Cocoa -lobjc"
     # Use -Wl as a trick to avoid -framework and framework names from
     # being separated by AC_SUBST_LIST.
     TK_LIBS='-Wl,-framework,CoreLocation -Wl,-framework,QuartzCore -Wl,-framework,Carbon -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,AudioUnit -Wl,-framework,AddressBook -Wl,-framework,OpenGL'
     TK_CFLAGS="-DNO_X11"
     CFLAGS="$CFLAGS $TK_CFLAGS"
     CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
     MOZ_USER_DIR="Mozilla"
     MOZ_FS_LAYOUT=bundle
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 uikit)
-    AC_DEFINE(MOZ_WIDGET_UIKIT)
     LDFLAGS="$LDFLAGS -framework UIKit -lobjc"
     TK_CFLAGS="-DNO_X11"
     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'
     CFLAGS="$CFLAGS $TK_CFLAGS"
     CXXFLAGS="$CXXFLAGS $TK_CFLAGS"
     MOZ_USER_DIR="Mozilla"
     MOZ_FS_LAYOUT=bundle
     ;;
 
 android)
-    AC_DEFINE(MOZ_WIDGET_ANDROID)
     MOZ_PDF_PRINTING=1
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 gonk)
-    AC_DEFINE(MOZ_WIDGET_GONK)
     AC_DEFINE(MOZ_TOUCH)
     MOZ_PDF_PRINTING=1
     MOZ_TOUCH=1
     MOZ_INSTRUMENT_EVENT_LOOP=1
     ;;
 
 esac
 
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -56,9 +56,16 @@ def toolkit(value, target, gonkdir):
 def toolkit(toolkit):
     if toolkit == 'cairo-gtk2-x11':
         widget_toolkit = 'gtk2'
     else:
         widget_toolkit = toolkit.replace('cairo-', '')
     set_config('MOZ_WIDGET_TOOLKIT', widget_toolkit)
     add_old_configure_assignment('MOZ_WIDGET_TOOLKIT', widget_toolkit)
 
+    if widget_toolkit == 'gtk2':
+        set_define('MOZ_WIDGET_GTK', '2')
+    elif widget_toolkit == 'gtk3':
+        set_define('MOZ_WIDGET_GTK', '3')
+    elif widget_toolkit != 'windows':
+        set_define('MOZ_WIDGET_%s' % widget_toolkit.upper(), '1')
+
     return widget_toolkit