Bug 459431 - port to comm-central: bug 454730, bug 455670, bug 454376, bug 450717, bug 454841, bug 457214, bug 445321, bug 457082, r=Standard8
authorRobert Kaiser <kairo@kairo.at>
Mon, 20 Oct 2008 16:25:41 +0200
changeset 643 32acc7b19dbe0ee23a0546421feade23d50c34ff
parent 642 e08fc2b03467b23316a2ff5b8f81afe56c966727
child 644 0e391b0e516043f02b256fa36b168e1127efecd8
push idunknown
push userunknown
push dateunknown
reviewersStandard8
bugs459431, 454730, 455670, 454376, 450717, 454841, 457214, 445321, 457082
Bug 459431 - port to comm-central: bug 454730, bug 455670, bug 454376, bug 450717, bug 454841, bug 457214, bug 445321, bug 457082, r=Standard8
config/autoconf.mk.in
config/static-config.mk
configure.in
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -474,17 +474,16 @@ TK_CFLAGS	= @TK_CFLAGS@
 TK_LIBS		= @TK_LIBS@
 
 MOZ_TOOLKIT_REGISTRY_CFLAGS = \
 	$(TK_CFLAGS)
 
 CAIRO_FT_CFLAGS		= @CAIRO_FT_CFLAGS@
 
 MOZ_ENABLE_CAIRO_FT	= @MOZ_ENABLE_CAIRO_FT@
-MOZ_ENABLE_GLITZ        = @MOZ_ENABLE_GLITZ@
 MOZ_ENABLE_GTK2		= @MOZ_ENABLE_GTK2@
 MOZ_ENABLE_QT		= @MOZ_ENABLE_QT@
 MOZ_ENABLE_PHOTON	= @MOZ_ENABLE_PHOTON@
 MOZ_ENABLE_COCOA	= @MOZ_ENABLE_COCOA@
 MOZ_ENABLE_XREMOTE	= @MOZ_ENABLE_XREMOTE@
 
 MOZ_GTK2_CFLAGS		= @MOZ_GTK2_CFLAGS@
 MOZ_GTK2_LIBS		= @MOZ_GTK2_LIBS@
@@ -497,18 +496,16 @@ MOZ_DBUS_GLIB_LIBS      = @MOZ_DBUS_GLIB
 MOZ_ENABLE_DBUS         = @MOZ_ENABLE_DBUS@
 
 MOZ_GTHREAD_CFLAGS      = @MOZ_GTHREAD_CFLAGS@
 MOZ_GTHREAD_LIBS        = @MOZ_GTHREAD_LIBS@
 
 FT2_CFLAGS             = @FT2_CFLAGS@
 FT2_LIBS               = @FT2_LIBS@
 
-MOZ_XFT_CFLAGS		= @MOZ_XFT_CFLAGS@
-MOZ_XFT_LIBS		= @MOZ_XFT_LIBS@
 MOZ_PANGO_CFLAGS        = @MOZ_PANGO_CFLAGS@
 MOZ_PANGO_LIBS          = @MOZ_PANGO_LIBS@
 
 MOZ_XIE_LIBS		= @MOZ_XIE_LIBS@
 XT_LIBS			= @XT_LIBS@
 
 GLIB_CFLAGS	= @GLIB_CFLAGS@
 GLIB_LIBS	= @GLIB_LIBS@
--- a/config/static-config.mk
+++ b/config/static-config.mk
@@ -83,17 +83,16 @@ STATIC_EXTRA_LIBS	+= \
 		$(LDAP_LIBS) \
 		$(NULL)
 endif
 
 STATIC_EXTRA_LIBS	+= $(MOZ_CAIRO_LIBS)
 
 ifdef MOZ_ENABLE_GTK2
 STATIC_EXTRA_LIBS	+= $(XLDFLAGS) $(XT_LIBS) -lgthread-2.0
-STATIC_EXTRA_LIBS	+= $(MOZ_XFT_LIBS)
 STATIC_EXTRA_LIBS	+= $(MOZ_PANGO_LIBS)
 endif
 
 ifdef MOZ_STORAGE
 STATIC_EXTRA_LIBS	+= $(SQLITE_LIBS)
 endif
 
 ifdef MOZ_ENABLE_STARTUP_NOTIFICATION
--- a/configure.in
+++ b/configure.in
@@ -126,17 +126,16 @@ NSS_VERSION=3
 
 dnl Set the minimum version of toolkit libs used by mozilla
 dnl ========================================================
 GLIB_VERSION=1.2.0
 LIBIDL_VERSION=0.6.3
 PERL_VERSION=5.006
 LIBART_VERSION=2.3.4
 CAIRO_VERSION=1.6.0
-GLITZ_VERSION=0.4.0
 PANGO_VERSION=1.10.0
 GTK2_VERSION=2.10.0
 MAKE_VERSION=3.78
 WINDRES_VERSION=2.14.90
 W32API_VERSION=3.8
 GNOMEVFS_VERSION=2.0
 GNOMEUI_VERSION=2.2.0
 GCONF_VERSION=1.2.1
@@ -2418,20 +2417,21 @@ alpha*-*-osf*)
 dnl the qsort routine under solaris is faulty
 *-solaris*) 
     AC_DEFINE(SOLARIS)
     TARGET_NSPR_MDCPUCFG='\"md/_solaris.cfg\"'
     SYSTEM_MAKEDEPEND=
     # $ORIGIN/.. is for shared libraries under components/ to locate shared
     # libraries one level up (e.g. libnspr4.so)
     LDFLAGS="$LDFLAGS -z ignore -R '\$\$ORIGIN:\$\$ORIGIN/..'"
+    LIBS="-lCrun -lCstd $LIBS"
     MOZ_MEMORY=1
     if test -z "$GNU_CC"; then
        NS_USE_NATIVE=1
-       MOZ_FIX_LINK_PATHS='-R $(LIBXUL_DIST)/bin'
+       MOZ_FIX_LINK_PATHS=
        AC_DEFINE(NSCAP_DISABLE_DEBUG_PTR_TYPES)
 
        if test "$CPU_ARCH" != "sparc"; then
           CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%all"
           CXXFLAGS="$CXXFLAGS -xlibmieee -xbuiltin=%all -features=tmplife -norunpath"
        else
           # Do not use -xbuiltin on SPARC to get around a bug of compiler
           CFLAGS="$CFLAGS -xlibmieee -xstrconst -xbuiltin=%none"
@@ -4240,26 +4240,16 @@ MOZ_ARG_ENABLE_BOOL(system-hunspell,
     SYSTEM_HUNSPELL=1 )
 
 if test -n "$SYSTEM_HUNSPELL"; then
     PKG_CHECK_MODULES(MOZ_HUNSPELL, hunspell)
 fi
 
 AC_SUBST(SYSTEM_HUNSPELL)
 
-dnl check whether to enable glitz
-dnl ========================================================
-MOZ_ARG_ENABLE_BOOL(glitz,
-[  --enable-glitz          Enable Glitz for use with Cairo],
-    MOZ_ENABLE_GLITZ=1,
-    MOZ_ENABLE_GLITZ= )
-if test "$MOZ_ENABLE_GLITZ"; then
-    AC_DEFINE(MOZ_ENABLE_GLITZ)
-fi
-
 dnl ========================================================
 dnl Use ARM userspace kernel helpers; tell NSPR to enable
 dnl their usage and use them in spidermonkey.
 dnl ========================================================
 MOZ_ARG_WITH_BOOL(arm-kuser,
 [  --with-arm-kuser         Use kuser helpers (Linux/ARM only -- requires kernel 2.6.13 or later)],
     USE_ARM_KUSER=1,
     USE_ARM_KUSER=)
@@ -4618,16 +4608,17 @@ cairo-gtk2)
     TK_LIBS='$(MOZ_GTK2_LIBS)'
     AC_DEFINE(MOZ_WIDGET_GTK2)
     ;;
 cairo-qt)
     MOZ_WIDGET_TOOLKIT=qt
     MOZ_GFX_TOOLKIT=cairo
     MOZ_ENABLE_QT=1
     MOZ_ENABLE_XREMOTE=1
+    USE_ELF_DYNSTR_GC=
     TK_CFLAGS='$(MOZ_QT_CFLAGS)'
     TK_LIBS='$(MOZ_QT_LIBS)'
     AC_DEFINE(MOZ_WIDGET_QT)
     ;;
 cairo-beos)
     MOZ_WIDGET_TOOLKIT=beos
     MOZ_GFX_TOOLKIT=cairo
     TK_CFLAGS='$(MOZ_CAIRO_CFLAGS)'
@@ -4750,17 +4741,16 @@ fi
 
 AC_SUBST(GTK_CONFIG)
 AC_SUBST(TK_CFLAGS)
 AC_SUBST(TK_LIBS)
 
 AC_SUBST(MOZ_ENABLE_GTK2)
 AC_SUBST(MOZ_ENABLE_PHOTON)
 AC_SUBST(MOZ_ENABLE_COCOA)
-AC_SUBST(MOZ_ENABLE_GLITZ)
 AC_SUBST(MOZ_ENABLE_QT)
 AC_SUBST(MOZ_ENABLE_XREMOTE)
 AC_SUBST(MOZ_GTK2_CFLAGS)
 AC_SUBST(MOZ_GTK2_LIBS)
 AC_SUBST(MOZ_QT_CFLAGS)
 AC_SUBST(MOZ_QT_LIBS)
 
 AC_SUBST(MOC)
@@ -4865,26 +4855,22 @@ MOZ_ARG_WITH_STRING(distribution-id,
 if test -z "$MOZ_DISTRIBUTION_ID"; then
    MOZ_DISTRIBUTION_ID="org.mozilla"
 fi
 
 AC_DEFINE_UNQUOTED(MOZ_DISTRIBUTION_ID,"$MOZ_DISTRIBUTION_ID")
 AC_SUBST(MOZ_DISTRIBUTION_ID)
 
 dnl ========================================================
-dnl = Xft and Pango
+dnl = Pango
 dnl ========================================================
 if test "$MOZ_ENABLE_GTK2"
 then
-    PKG_CHECK_MODULES(MOZ_XFT, xft)
-    AC_SUBST(MOZ_XFT_CFLAGS)
-    AC_SUBST(MOZ_XFT_LIBS)
-
     PKG_CHECK_MODULES(_PANGOCHK, pango >= $PANGO_VERSION)
-    PKG_CHECK_MODULES(MOZ_PANGO, pango >= $PANGO_VERSION pangocairo >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION)
+    PKG_CHECK_MODULES(MOZ_PANGO, pango >= $PANGO_VERSION pangoft2 >= $PANGO_VERSION)
     AC_SUBST(MOZ_PANGO_CFLAGS)
     AC_SUBST(MOZ_PANGO_LIBS)
 fi
 
 dnl ========================================================
 dnl = PostScript print module
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(postscript,
@@ -5008,17 +4994,17 @@ fi
 AC_SUBST(MOZ_ENABLE_GNOMEUI)
 AC_SUBST(MOZ_GNOMEUI_CFLAGS)
 AC_SUBST(MOZ_GNOMEUI_LIBS)
 
 dnl ========================================================
 dnl = dbus support
 dnl ========================================================
 
-if test "$MOZ_ENABLE_GTK2" || "$MOZ_ENABLE_QT"
+if test "$MOZ_ENABLE_GTK2" || test "$MOZ_ENABLE_QT"
 then
     MOZ_ENABLE_DBUS=1
 
     MOZ_ARG_DISABLE_BOOL(dbus,
     [  --disable-dbus       Disable dbus support ],
         MOZ_ENABLE_DBUS=,
         MOZ_ENABLE_DBUS=1)
 
@@ -5091,17 +5077,17 @@ dnl ====================================
 MOZ_ARG_DISABLE_BOOL(accessibility,
 [  --disable-accessibility Disable accessibility support (off by default on OS X)],
     ACCESSIBILITY=,
     ACCESSIBILITY=1 )
 if test "$ACCESSIBILITY"; then
     AC_DEFINE(ACCESSIBILITY)
 fi
 
-if test -n "$ACCESSIBILITY"; then
+if test -n "$ACCESSIBILITY" -a "$COMPILE_ENVIRONMENT" = "1"; then
 case "$target" in
 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
     if test "$ac_cv_header_atlbase_h" = "no"; then
         AC_MSG_ERROR([System header atlbase.h is not available. See http://developer.mozilla.org/en/docs/atlbase.h for details on fixing this problem.])
     fi
     if test "$ac_cv_header_oleacc_idl" = "no"; then
         AC_MSG_ERROR([System header oleacc.idl is not available. See http://developer.mozilla.org/en/docs/oleacc.idl for details on fixing this problem.])
     fi
@@ -5397,25 +5383,27 @@ MOZ_ARG_DISABLE_BOOL(activex-scripting,
     MOZ_ACTIVEX_SCRIPTING_SUPPORT=1)
 AC_SUBST(MOZ_ACTIVEX_SCRIPTING_SUPPORT)
 
 if test -n "$MOZ_NO_ACTIVEX_SUPPORT" -a -n "$MOZ_ACTIVEX_SCRIPTING_SUPPORT";
 then
     AC_MSG_ERROR([Cannot enable ActiveX scripting support when ActiveX support is disabled.])
 fi
 
+if test "$COMPILE_ENVIRONMENT" = "1"; then
 if test -n "$XPC_IDISPATCH_SUPPORT" -o -n "$MOZ_ACTIVEX_SCRIPTING_SUPPORT" -o -z "$MOZ_NO_ACTIVEX_SUPPORT"; then
 case "$target" in
 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
     if test "$ac_cv_header_atlbase_h" = "no"; then
         AC_MSG_ERROR([System header atlbase.h is not available. See http://developer.mozilla.org/en/docs/atlbase.h for details on fixing this problem.])
     fi
     ;;
 esac
 fi
+fi
 
 dnl ========================================================
 dnl leaky
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(leaky,
 [  --enable-leaky          Build leaky memory tool],
     MOZ_LEAKY=1,
     MOZ_LEAKY=)
@@ -5453,32 +5441,34 @@ fi
 dnl ========================================================
 dnl Vista SDK specific api
 dnl ========================================================
 MOZ_ARG_DISABLE_BOOL(vista-sdk-requirements,
 [  --disable-vista-sdk-requirements
                            Do not build Vista SDK specific code],
    MOZ_DISABLE_VISTA_SDK_REQUIREMENTS=1,
    MOZ_DISABLE_VISTA_SDK_REQUIREMENTS=)
+if test -n "$COMPILE_ENVIRONMENT"; then
 if test -n "$MOZ_DISABLE_VISTA_SDK_REQUIREMENTS"; then
     AC_MSG_WARN([Resulting builds will not be compatible with Windows Vista. (bug 428970)])
     AC_DEFINE(MOZ_DISABLE_VISTA_SDK_REQUIREMENTS)
     if test -z "$MOZ_DISABLE_PARENTAL_CONTROLS"; then
         AC_DEFINE(MOZ_DISABLE_PARENTAL_CONTROLS)
     fi
     MOZ_DISABLE_PARENTAL_CONTROLS=1
 else
 case "$target" in
 *-mingw*|*-cygwin*|*-msvc*|*-mks*)
     if test "$ac_cv_header_wpcapi_h" = "no"; then
         AC_MSG_ERROR([System header wpcapi.h is not available. See updated http://developer.mozilla.org/en/docs/wpcapi.h for details on fixing this problem.])
     fi
     ;;
 esac
 fi
+fi
 AC_SUBST(MOZ_DISABLE_PARENTAL_CONTROLS)
 AC_SUBST(MOZ_DISABLE_VISTA_SDK_REQUIREMENTS)
 
 dnl ========================================================
 dnl =
 dnl = Module specific options
 dnl =
 dnl ========================================================
@@ -6603,19 +6593,19 @@ MOZ_ARG_DISABLE_BOOL(md,
    fi
   dnl Default is to use -xM if using Sun Studio on Solaris
    if test -z "$GNU_CC" && test -z "$GNU_CXX" && test "$OS_ARCH" = "SunOS"; then
      _cpp_md_flag=1
    fi])
 if test "$_cpp_md_flag"; then
   COMPILER_DEPEND=1
   if test "$OS_ARCH" = "OpenVMS"; then
-    _DEPEND_CFLAGS='$(subst =, ,$(filter-out %/.pp,-MM=-MD=-MF=$(MDDEPDIR)/$(*F).pp))'
+    _DEPEND_CFLAGS='$(subst =, ,$(filter-out %/.pp,-MM=-MD=-MF=$(MDDEPDIR)/$(basename $(@F)).pp))'
   else
-    _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(*F).pp)'
+    _DEPEND_CFLAGS='$(filter-out %/.pp,-Wp,-MD,$(MDDEPDIR)/$(basename $(@F)).pp)'
   fi
   dnl Sun Studio on Solaris use -xM instead of -MD, see config/rules.mk
   if test -z "$GNU_CC" && test -z "$GNU_CXX" && test "$OS_ARCH" = "SunOS"; then
     _DEPEND_CFLAGS=
   fi
 else
   COMPILER_DEPEND=
   _USE_CPP_INCLUDE_FLAG=
@@ -6825,17 +6815,21 @@ if test -n "$CROSS_COMPILE"; then
     else
         HOST_LIBIDL_CFLAGS="$LIBIDL_CFLAGS"
         HOST_LIBIDL_LIBS="$LIBIDL_LIBS"
     fi
 fi
 
 if test -z "$SKIP_PATH_CHECKS"; then
 if test -z "${GLIB_CFLAGS}" || test -z "${GLIB_LIBS}" ; then
-    PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.7 gobject-2.0)
+    if test "$MOZ_ENABLE_GTK2" || test "$USE_ELF_DYNSTR_GC" ; then
+        PKG_CHECK_MODULES(GLIB, glib-2.0 >= 1.3.7 gobject-2.0)
+    else
+        AM_PATH_GLIB(${GLIB_VERSION})
+fi
 fi
 fi
 
 if test -z "${GLIB_GMODULE_LIBS}" -a -n "${GLIB_CONFIG}"; then
     GLIB_GMODULE_LIBS=`$GLIB_CONFIG gmodule --libs`
 fi
 
 AC_SUBST(LIBIDL_CFLAGS)
@@ -6892,19 +6886,16 @@ if test "$MOZ_TREE_CAIRO"; then
     if test "$MOZ_WIDGET_TOOLKIT" = "os2"; then
         OS2_SURFACE_FEATURE="#define CAIRO_HAS_OS2_SURFACE 1"
         FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
         PDF_SURFACE_FEATURE="#define CAIRO_HAS_PDF_SURFACE 1"
         MOZ_ENABLE_CAIRO_FT=1
         CAIRO_FT_CFLAGS="-I${MZFTCFGFT2}/include"
         CAIRO_FT_LIBS="-L${MZFTCFGFT2}/lib -lmozft -lmzfntcfg"
     fi
-    if test "$MOZ_ENABLE_GLITZ"; then
-        GLITZ_SURFACE_FEATURE="#define CAIRO_HAS_GLITZ_SURFACE 1"
-    fi
     if test "$MOZ_WIDGET_TOOLKIT" = "beos"; then
         PKG_CHECK_MODULES(CAIRO_FT, fontconfig freetype2)
         BEOS_SURFACE_FEATURE="#define CAIRO_HAS_BEOS_SURFACE 1"
         FT_FONT_FEATURE="#define CAIRO_HAS_FT_FONT 1"
         MOZ_ENABLE_CAIRO_FT=1
     fi
     AC_SUBST(MOZ_ENABLE_CAIRO_FT)
     AC_SUBST(CAIRO_FT_CFLAGS)
@@ -6923,44 +6914,30 @@ if test "$MOZ_TREE_CAIRO"; then
     AC_SUBST(XLIB_SURFACE_FEATURE)
     AC_SUBST(XLIB_XRENDER_SURFACE_FEATURE)
     AC_SUBST(QUARTZ_SURFACE_FEATURE)
     AC_SUBST(QUARTZ_IMAGE_SURFACE_FEATURE)
     AC_SUBST(XCB_SURFACE_FEATURE)
     AC_SUBST(WIN32_SURFACE_FEATURE)
     AC_SUBST(OS2_SURFACE_FEATURE)
     AC_SUBST(BEOS_SURFACE_FEATURE)
-    AC_SUBST(GLITZ_SURFACE_FEATURE)
     AC_SUBST(DIRECTFB_SURFACE_FEATURE)
     AC_SUBST(FT_FONT_FEATURE)
     AC_SUBST(WIN32_FONT_FEATURE)
     AC_SUBST(QUARTZ_FONT_FEATURE)
     AC_SUBST(PNG_FUNCTIONS_FEATURE)
 
     if test "$_WIN32_MSVC"; then
         MOZ_CAIRO_LIBS='$(DEPTH)/mozilla/gfx/cairo/cairo/src/mozcairo.lib $(DEPTH)/mozilla/gfx/cairo/libpixman/src/mozlibpixman.lib'
-        if test "$MOZ_ENABLE_GLITZ"; then
-            MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'$(DEPTH)/mozilla/gfx/cairo/glitz/src/mozglitz.lib $(DEPTH)/mozilla/gfx/cairo/glitz/src/wgl/mozglitzwgl.lib'
-        fi
     else
         MOZ_CAIRO_LIBS='$(DEPTH)/mozilla/gfx/cairo/cairo/src/$(LIB_PREFIX)mozcairo.$(LIB_SUFFIX) $(DEPTH)/mozilla/gfx/cairo/libpixman/src/$(LIB_PREFIX)mozlibpixman.$(LIB_SUFFIX)'" $CAIRO_FT_LIBS"
 
         if test "$MOZ_X11"; then
             MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS -lXrender -lfreetype -lfontconfig"
         fi
-
-        if test "$MOZ_ENABLE_GLITZ"; then
-            MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'-L$(DEPTH)/mozilla/gfx/cairo/glitz/src -lmozglitz'
-            if test "$MOZ_X11"; then
-                MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'-L$(DEPTH)/mozilla/gfx/cairo/glitz/src/glx -lmozglitzglx -lGL'
-            fi
-            if test "$MOZ_WIDGET_TOOLKIT" = "windows"; then
-                MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS "'-L$(DEPTH)/mozilla/gfx/cairo/glitz/src/wgl -lmozglitzwgl'
-            fi
-        fi
     fi
 else
    PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION freetype2 fontconfig)
    MOZ_CAIRO_CFLAGS=$CAIRO_CFLAGS
    MOZ_CAIRO_LIBS=$CAIRO_LIBS
    if test "$MOZ_X11"; then
         PKG_CHECK_MODULES(CAIRO_XRENDER, cairo-xlib-xrender >= $CAIRO_VERSION)
         MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS"