Bug 877626 - Port GTK2 to GTK3 - build config. r=glandium

This commit is contained in:
Martin Stransky 2013-06-05 08:02:52 -04:00
parent 1475b46109
commit e7c88a6233

View File

@ -62,6 +62,7 @@ PERL_VERSION=5.006
CAIRO_VERSION=1.10
PANGO_VERSION=1.14.0
GTK2_VERSION=2.10.0
GTK3_VERSION=3.0.0
WINDRES_VERSION=2.14.90
W32API_VERSION=3.14
GNOMEVFS_VERSION=2.0
@ -4478,6 +4479,7 @@ MOZ_ARG_HEADER(Toolkit Options)
OS/2 - cairo-os2
Win32 - cairo-windows
* - cairo-gtk2
* - cairo-gtk3
* - cairo-qt],
[ _DEFAULT_TOOLKIT=$enableval ],
[ _DEFAULT_TOOLKIT=$_PLATFORM_DEFAULT_TOOLKIT])
@ -4485,6 +4487,7 @@ MOZ_ARG_HEADER(Toolkit Options)
if test "$_DEFAULT_TOOLKIT" = "cairo-windows" \
-o "$_DEFAULT_TOOLKIT" = "cairo-gtk2" \
-o "$_DEFAULT_TOOLKIT" = "cairo-gtk2-x11" \
-o "$_DEFAULT_TOOLKIT" = "cairo-gtk3" \
-o "$_DEFAULT_TOOLKIT" = "cairo-qt" \
-o "$_DEFAULT_TOOLKIT" = "cairo-os2" \
-o "$_DEFAULT_TOOLKIT" = "cairo-cocoa" \
@ -4521,8 +4524,29 @@ cairo-windows)
fi
;;
cairo-gtk3)
MOZ_WIDGET_TOOLKIT=gtk3
MOZ_ENABLE_GTK=1
MOZ_ENABLE_GTK3=1
MOZ_ENABLE_XREMOTE=1
MOZ_WEBGL=1
MOZ_GL_DEFAULT_PROVIDER=GLX
AC_DEFINE(MOZ_X11)
MOZ_X11=1
USE_FC_FREETYPE=1
TK_CFLAGS='$(MOZ_GTK3_CFLAGS)'
TK_LIBS='$(MOZ_GTK3_LIBS)'
MOZ_WIDGET_GTK=3
AC_DEFINE_UNQUOTED(MOZ_WIDGET_GTK,$MOZ_WIDGET_GTK)
MOZ_PDF_PRINTING=1
MOZ_INSTRUMENT_EVENT_LOOP=1
;;
cairo-gtk2|cairo-gtk2-x11)
MOZ_WIDGET_TOOLKIT=gtk2
MOZ_ENABLE_GTK=1
MOZ_ENABLE_GTK2=1
MOZ_ENABLE_XREMOTE=1
MOZ_WEBGL=1
@ -4638,6 +4662,9 @@ if test "$MOZ_INSTRUMENT_EVENT_LOOP"; then
fi
if test "$COMPILE_ENVIRONMENT"; then
if test "$MOZ_ENABLE_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)
fi
if test "$MOZ_ENABLE_GTK2"; then
if test "$MOZ_X11"; then
GDK_PACKAGES=gdk-x11-2.0
@ -4665,7 +4692,7 @@ dnl ========================================================
dnl = startup-notification support module
dnl ========================================================
if test "$MOZ_ENABLE_GTK2"
if test "$MOZ_ENABLE_GTK"
then
MOZ_ENABLE_STARTUP_NOTIFICATION=
@ -4805,6 +4832,8 @@ AC_SUBST(TK_CFLAGS)
AC_SUBST(TK_LIBS)
AC_SUBST(MOZ_ENABLE_GTK2)
AC_SUBST(MOZ_ENABLE_GTK3)
AC_SUBST(MOZ_ENABLE_GTK)
AC_SUBST(MOZ_ENABLE_QT)
AC_SUBST(MOZ_ENABLE_QTNETWORK)
AC_SUBST(MOZ_ENABLE_QMSYSTEM2)
@ -4812,6 +4841,8 @@ AC_SUBST(MOZ_ENABLE_QTMOBILITY)
AC_SUBST(MOZ_ENABLE_XREMOTE)
AC_SUBST(MOZ_GTK2_CFLAGS)
AC_SUBST(MOZ_GTK2_LIBS)
AC_SUBST(MOZ_GTK3_CFLAGS)
AC_SUBST(MOZ_GTK3_LIBS)
AC_SUBST(MOZ_WIDGET_GTK)
AC_SUBST(MOZ_QT_CFLAGS)
AC_SUBST(MOZ_QT_LIBS)
@ -4904,7 +4935,7 @@ MOZ_ARG_DISABLE_BOOL(pango,
dnl ========================================================
dnl = Pango
dnl ========================================================
if test "$MOZ_ENABLE_GTK2" -o "$MOZ_ENABLE_QT"
if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
then
AC_SUBST(MOZ_PANGO)
@ -4931,7 +4962,7 @@ if test "$MOZ_X11"
then
dnl build the GIO extension by default only when the
dnl GTK2 toolkit is in use.
if test "$MOZ_ENABLE_GTK2"
if test "$MOZ_ENABLE_GTK"
then
MOZ_ENABLE_GIO=1
MOZ_ENABLE_GCONF=1
@ -4972,7 +5003,7 @@ then
MOZ_ENABLE_GIO=,
MOZ_ENABLE_GIO=force)
if test "$MOZ_ENABLE_GIO" -a "$MOZ_ENABLE_GTK2"
if test "$MOZ_ENABLE_GIO" -a "$MOZ_ENABLE_GTK"
then
PKG_CHECK_MODULES(_GTKCHECK, gtk+-2.0 >= 2.14, ,
[AC_MSG_ERROR([* * * Could not find gtk+-2.0 > 2.14. Required for build with gio.])])
@ -5028,7 +5059,7 @@ dnl ========================================================
dnl = libproxy support
dnl ========================================================
if test "$MOZ_ENABLE_GTK2" -o "$MOZ_ENABLE_QT"
if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
then
MOZ_ENABLE_LIBPROXY=
@ -5061,7 +5092,7 @@ dnl ========================================================
dnl = libgnomeui support module
dnl ========================================================
if test "$MOZ_ENABLE_GTK2"
if test "$MOZ_ENABLE_GTK"
then
MOZ_ARG_ENABLE_BOOL(gnomeui,
[ --enable-gnomeui Enable libgnomeui instead of GIO & GTK for icon theme support ],
@ -5094,7 +5125,7 @@ dnl ========================================================
dnl = dbus support
dnl ========================================================
if test "$MOZ_ENABLE_GTK2" -o "$MOZ_ENABLE_QT"
if test "$MOZ_ENABLE_GTK" -o "$MOZ_ENABLE_QT"
then
MOZ_ENABLE_DBUS=1
@ -5977,7 +6008,7 @@ i?86-apple-darwin*|x86_64-apple-darwin*)
MOZ_CRASHREPORTER=1
;;
i?86-*-linux*|x86_64-*-linux*|arm-*-linux*)
if test "$MOZ_ENABLE_GTK2"; then
if test "$MOZ_ENABLE_GTK"; then
MOZ_CRASHREPORTER=1
fi
;;
@ -9001,7 +9032,7 @@ if test "$MOZ_DEBUG"; then
AC_DEFINE(MOZ_REFLOW_PERF_DSP)
fi
if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK2" ; then
if test "$ACCESSIBILITY" -a "$MOZ_ENABLE_GTK" ; then
AC_DEFINE(MOZ_ACCESSIBILITY_ATK)
ATK_FULL_VERSION=`$PKG_CONFIG --modversion atk`
ATK_MAJOR_VERSION=`echo ${ATK_FULL_VERSION} | $AWK -F\. '{ print $1 }'`