Bug 567750 - Build option to use the system Pixman. r=khuey. a=dougt
authorDoug Turner <dougt@dougt.org>
Mon, 20 Sep 2010 21:16:37 -0700
changeset 54391 ae8d6fa8a42e5cff73c04548ab9761d33ec07e7f
parent 54390 814f092ecaf92dc7ecf746b718115787f6767e92
child 54392 16d5ab7e1e47a5cdec972e30220a8d9792460b21
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskhuey, dougt
bugs567750
milestone2.0b7pre
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 567750 - Build option to use the system Pixman. r=khuey. a=dougt
config/autoconf.mk.in
configure.in
gfx/cairo/Makefile.in
gfx/cairo/cairo/src/Makefile.in
toolkit/toolkit-makefiles.sh
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -230,16 +230,17 @@ MOZ_NATIVE_LIBEVENT = @MOZ_NATIVE_LIBEVE
 MOZ_LIBEVENT_LIBS = @MOZ_LIBEVENT_LIBS@
 MOZ_LIBEVENT_INCLUDES = @MOZ_LIBEVENT_INCLUDES@
 
 MOZ_NATIVE_ZLIB	= @SYSTEM_ZLIB@
 MOZ_NATIVE_BZ2	= @SYSTEM_BZ2@
 MOZ_NATIVE_JPEG	= @SYSTEM_JPEG@
 MOZ_NATIVE_PNG	= @SYSTEM_PNG@
 MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@
+MOZ_TREE_PIXMAN = @MOZ_TREE_PIXMAN@
 
 MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@
 MOZ_MATHML = @MOZ_MATHML@
 MOZ_PERMISSIONS = @MOZ_PERMISSIONS@
 MOZ_XTF = @MOZ_XTF@
 MOZ_SVG = @MOZ_SVG@
 MOZ_CAIRO_CFLAGS = @MOZ_CAIRO_CFLAGS@
 MOZ_SMIL = @MOZ_SMIL@
--- a/configure.in
+++ b/configure.in
@@ -8359,16 +8359,22 @@ dnl ====================================
 MOZ_CAIRO_CFLAGS='-I$(LIBXUL_DIST)/include/cairo'
 
 MOZ_TREE_CAIRO=1
 MOZ_ARG_ENABLE_BOOL(system-cairo,
 [  --enable-system-cairo   Use system cairo (located with pkgconfig)],
 MOZ_TREE_CAIRO=,
 MOZ_TREE_CAIRO=1 )
 
+MOZ_TREE_PIXMAN=1
+MOZ_ARG_ENABLE_BOOL(system-pixman,
+[ --enable-system-pixman Use system pixman (located with pkgconfig)],
+MOZ_TREE_PIXMAN=,
+MOZ_TREE_PIXMAN=1 )
+
 # Check for headers defining standard int types.
 AC_CHECK_HEADERS(stdint.h inttypes.h sys/int_types.h)
 
 if test "$MOZ_TREE_CAIRO"; then
     AC_DEFINE(MOZ_TREE_CAIRO)
 
     # For now we assume that we will have a uint64_t available through
     # one of the above headers or mozstdint.h.
@@ -8490,17 +8496,26 @@ if test "$MOZ_TREE_CAIRO"; then
     AC_SUBST(FC_FONT_FEATURE)
     AC_SUBST(WIN32_FONT_FEATURE)
     AC_SUBST(WIN32_DWRITE_FONT_FEATURE)
     AC_SUBST(WIN32_D2D_SURFACE_FEATURE)
     AC_SUBST(QUARTZ_FONT_FEATURE)
     AC_SUBST(PNG_FUNCTIONS_FEATURE)
     AC_SUBST(QT_SURFACE_FEATURE)
 
-    MOZ_CAIRO_LIBS='$(call EXPAND_LIBNAME_PATH,mozcairo,$(DEPTH)/gfx/cairo/cairo/src) $(call EXPAND_LIBNAME_PATH,mozlibpixman,$(DEPTH)/gfx/cairo/libpixman/src)'" $CAIRO_FT_LIBS"
+    MOZ_CAIRO_LIBS='$(call EXPAND_LIBNAME_PATH,mozcairo,$(DEPTH)/gfx/cairo/cairo/src)'" $CAIRO_FT_LIBS"
+
+    if test "$MOZ_TREE_PIXMAN"; then
+        MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS"' $(call EXPAND_LIBNAME_PATH,mozlibpixman,$(DEPTH)/gfx/cairo/libpixman/src)'
+    else
+        PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.3)
+        MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $PIXMAN_CFLAGS"
+        MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $PIXMAN_LIBS"
+    fi
+
     if test "$MOZ_X11"; then
         MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS -lXrender -lfreetype -lfontconfig"
     fi
 
     CAIRO_FEATURES_H=gfx/cairo/cairo/src/cairo-features.h
     mv -f $CAIRO_FEATURES_H "$CAIRO_FEATURES_H".orig 2> /dev/null
 
 else
@@ -8512,16 +8527,17 @@ else
         MOZ_CAIRO_LIBS="$MOZ_CAIRO_LIBS $XLDFLAGS $CAIRO_XRENDER_LIBS"
         MOZ_CAIRO_CFLAGS="$MOZ_CAIRO_CFLAGS $CAIRO_XRENDER_CFLAGS"
    fi
 fi
 
 AC_SUBST(MOZ_TREE_CAIRO)
 AC_SUBST(MOZ_CAIRO_CFLAGS)
 AC_SUBST(MOZ_CAIRO_LIBS)
+AC_SUBST(MOZ_TREE_PIXMAN)
 
 dnl ========================================================
 dnl qcms
 dnl ========================================================
 
 QCMS_LIBS='$(call EXPAND_LIBNAME_PATH,mozqcms,$(DEPTH)/gfx/qcms)'
 AC_SUBST(QCMS_LIBS)
 
--- a/gfx/cairo/Makefile.in
+++ b/gfx/cairo/Makefile.in
@@ -37,12 +37,16 @@
 
 DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-DIRS = libpixman/src cairo/src
+DIRS = cairo/src
+
+ifdef MOZ_TREE_PIXMAN
+DIRS += libpixman/src
+endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/gfx/cairo/cairo/src/Makefile.in
+++ b/gfx/cairo/cairo/src/Makefile.in
@@ -252,10 +252,15 @@ DEFINES += -DPACKAGE_VERSION="\"moz\"" -
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 DEFINES += -DCAIRO_WIN32_STATIC_BUILD
 endif
 
 ifdef MOZ_TREE_CAIRO
 DEFINES += -DMOZ_TREE_CAIRO
 endif
 
+ifndef MOZ_TREE_PIXMAN
+CFLAGS += $(MOZ_CAIRO_CFLAGS)
+CXXFLAGS += $(MOZ_CAIRO_CFLAGS)
+endif
+
 cairo-features.h: $(srcdir)/cairo-features.h.in $(GLOBAL_DEPS)
 	$(PERL) $(AUTOCONF_TOOLS)/make-makefile -t $(topsrcdir) -d $(DEPTH) ./$@
--- a/toolkit/toolkit-makefiles.sh
+++ b/toolkit/toolkit-makefiles.sh
@@ -999,20 +999,25 @@ if [ "$MOZ_STORAGE" ]; then
     storage/build/Makefile
     storage/test/Makefile
   "
 fi
 
 if [ "$MOZ_TREE_CAIRO" ] ; then
   add_makefiles "
     gfx/cairo/Makefile
-    gfx/cairo/libpixman/src/Makefile
     gfx/cairo/cairo/src/Makefile
     gfx/cairo/cairo/src/cairo-features.h
   "
+  if [ "$MOZ_TREE_PIXMAN" ] ; then
+    add_makefiles "
+      gfx/cairo/libpixman/src/Makefile
+    "
+  fi
+
 fi
 
 if [ "$MOZ_UNIVERSALCHARDET" ] ; then
   add_makefiles "
     extensions/universalchardet/Makefile
     extensions/universalchardet/src/Makefile
     extensions/universalchardet/src/base/Makefile
     extensions/universalchardet/src/xpcom/Makefile