diff --git a/Makefile.in b/Makefile.in index d03c8f9907b2..4abf8d6b851b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -472,13 +472,13 @@ endif # Map mozilla targets to standard automake target clobber realclean clobber_all:: -ifndef MOZ_SYSTEM_CAIRO +ifdef MOZ_TREE_CAIRO $(MAKE) -C gfx/cairo/libpixman clean $(MAKE) -C gfx/cairo/cairo clean endif clean distclean:: -ifndef MOZ_SYSTEM_CAIRO +ifdef MOZ_TREE_CAIRO $(MAKE) -C gfx/cairo/libpixman $@ $(MAKE) -C gfx/cairo/cairo $@ endif @@ -533,7 +533,7 @@ ifdef MOZ_LDAP_XPCOM endif cairo: -ifndef MOZ_SYSTEM_CAIRO +ifdef MOZ_TREE_CAIRO $(MAKE) -C gfx/cairo/libpixman install $(MAKE) -C gfx/cairo/cairo install ifneq ($(OS_ARCH),Darwin) diff --git a/config/autoconf.mk.in b/config/autoconf.mk.in index 695d335bff7a..0b1c3aaee539 100644 --- a/config/autoconf.mk.in +++ b/config/autoconf.mk.in @@ -170,7 +170,7 @@ NECKO_COOKIES = @NECKO_COOKIES@ MOZ_NATIVE_ZLIB = @SYSTEM_ZLIB@ MOZ_NATIVE_JPEG = @SYSTEM_JPEG@ MOZ_NATIVE_PNG = @SYSTEM_PNG@ -MOZ_SYSTEM_CAIRO = @MOZ_SYSTEM_CAIRO@ +MOZ_TREE_CAIRO = @MOZ_TREE_CAIRO@ MOZ_UPDATE_XTERM = @MOZ_UPDATE_XTERM@ MOZ_MATHML = @MOZ_MATHML@ diff --git a/configure.in b/configure.in index 16251305a03f..ab4dc5a432e0 100644 --- a/configure.in +++ b/configure.in @@ -5658,19 +5658,20 @@ if test -z "$MACOSX"; then fi; if test "$MOZ_SVG_RENDERER_CAIRO" -o "$MOZ_ENABLE_CAIRO" ; then + MOZ_TREE_CAIRO=1 MOZ_ARG_ENABLE_BOOL(system-cairo, [ --enable-system-cairo Use system cairo (located with pkgconfig)], - MOZ_SYSTEM_CAIRO=1, - MOZ_SYSTEM_CAIRO= ) + MOZ_TREE_CAIRO=, + MOZ_TREE_CAIRO=1 ) - if test "$MOZ_SYSTEM_CAIRO"; then + if test -z "$MOZ_TREE_CAIRO"; then PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION) MOZ_CAIRO_CFLAGS=$CAIRO_CFLAGS MOZ_CAIRO_LIBS=$CAIRO_LIBS fi fi -AC_SUBST(MOZ_SYSTEM_CAIRO) +AC_SUBST(MOZ_TREE_CAIRO) AC_SUBST(MOZ_CAIRO_CFLAGS) AC_SUBST(MOZ_CAIRO_LIBS) @@ -6426,32 +6427,29 @@ if test "$MOZ_LDAP_XPCOM"; then ac_configure_args="$_SUBDIR_CONFIG_ARGS" fi -if test "$MOZ_SVG_RENDERER_CAIRO" -o "$MOZ_ENABLE_CAIRO" ; then - if test -z "$MOZ_SYSTEM_CAIRO"; then - # these subdirs may not yet have been created in the build tree. - # don't use the "-p" switch to mkdir, since not all platforms have it - # - if test ! -d "gfx/cairo"; then - mkdir "gfx/cairo" - fi - if test ! -d "gfx/cairo/libpixman"; then - mkdir "gfx/cairo/libpixman" - fi - if test ! -d "gfx/cairo/cairo"; then - mkdir "gfx/cairo/cairo" - fi - - ac_configure_args="$_SUBDIR_CONFIG_ARGS --prefix=$MOZ_BUILD_ROOT/dist --includedir=$MOZ_BUILD_ROOT/dist/include/cairo" - AC_OUTPUT_SUBDIRS(gfx/cairo/libpixman) - - export PKG_CONFIG_PATH=$MOZ_BUILD_ROOT/gfx/cairo/libpixman - ac_configure_args="$_SUBDIR_CONFIG_ARGS --prefix=$MOZ_BUILD_ROOT/dist --disable-ps --disable-pdf --disable-png --disable-glitz --disable-xcb" - - if test -n "$MACOSX"; then - ac_configure_args="$ac_configure_args --disable-freetype --disable-xlib" - fi - - AC_OUTPUT_SUBDIRS(gfx/cairo/cairo) - ac_configure_args="$_SUBDIR_CONFIG_ARGS" +if test "$MOZ_TREE_CAIRO"; then + # these subdirs may not yet have been created in the build tree. + # don't use the "-p" switch to mkdir, since not all platforms have it + # + if test ! -d "gfx/cairo"; then + mkdir "gfx/cairo" fi + if test ! -d "gfx/cairo/libpixman"; then + mkdir "gfx/cairo/libpixman" + fi + if test ! -d "gfx/cairo/cairo"; then + mkdir "gfx/cairo/cairo" + fi + + ac_configure_args="$_SUBDIR_CONFIG_ARGS --prefix=$MOZ_BUILD_ROOT/dist --includedir=$MOZ_BUILD_ROOT/dist/include/cairo" + AC_OUTPUT_SUBDIRS(gfx/cairo/libpixman) + + export PKG_CONFIG_PATH=$MOZ_BUILD_ROOT/gfx/cairo/libpixman + ac_configure_args="$_SUBDIR_CONFIG_ARGS --prefix=$MOZ_BUILD_ROOT/dist --disable-ps --disable-pdf --disable-png --disable-glitz --disable-xcb" + if test -n "$MACOSX"; then + ac_configure_args="$ac_configure_args --disable-freetype --disable-xlib" + fi + + AC_OUTPUT_SUBDIRS(gfx/cairo/cairo) + ac_configure_args="$_SUBDIR_CONFIG_ARGS" fi