Bug 985806 - Explicitly enable zlib and disable bzip2 in freetype, r=glandium
authorMichael Wu <mwu@mozilla.com>
Fri, 21 Mar 2014 20:12:31 -0400
changeset 174868 2378f03042a20e9a6b463fb88be28b6a455ab77d
parent 174867 7f18e827bff39f5ff6bc3a736f81799e445283d6
child 174869 af4af74dac7da8948ded9d812136e0e54f389cba
push id5853
push userphilringnalda@gmail.com
push dateSat, 22 Mar 2014 15:10:55 +0000
treeherderfx-team@20e406c1adaf [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs985806
milestone31.0a1
Bug 985806 - Explicitly enable zlib and disable bzip2 in freetype, r=glandium
configure.in
--- a/configure.in
+++ b/configure.in
@@ -3756,17 +3756,17 @@ if test -n "${JPEG_DIR}" -a -d "${JPEG_D
 fi
 fi # SKIP_LIBRARY_CHECKS
 
 dnl system ZLIB support
 dnl ========================================================
 MOZ_ZLIB_CHECK([1.2.3])
 
 if test "$MOZ_NATIVE_ZLIB" != 1; then
-    MOZ_ZLIB_CFLAGS=
+    MOZ_ZLIB_CFLAGS="-I${_topsrcdir}/modules/zlib/src"
     MOZ_ZLIB_LIBS='$(call EXPAND_LIBNAME_PATH,mozz,'"$MOZ_BUILD_ROOT"'/modules/zlib/src)'
 fi
 
 if test "$MOZ_LINKER" = 1 -a "$MOZ_NATIVE_ZLIB" != 1; then
     AC_MSG_ERROR([Custom dynamic linker requires --with-system-zlib])
 fi
 
 MOZ_PNG_ARM_NEON=
@@ -8981,20 +8981,24 @@ fi
 
 # Run freetype configure script
 
 if test "$MOZ_TREE_FREETYPE"; then
    export CFLAGS="$CFLAGS $MOZ_DEBUG_FLAGS -std=c99"
    export CPPFLAGS="$CPPFLAGS $MOZ_DEBUG_FLAGS"
    export CXXFLAGS="$CXXFLAGS $MOZ_DEBUG_FLAGS"
    export LDFLAGS="$LDFLAGS $MOZ_DEBUG_LDFLAGS"
-   export LIBPNG_CFLAGS="$MOZ_PNG_CFLAGS"
-   export LIBPNG_LIBS="$MOZ_PNG_LIBS"
+   # Spaces in the *_CFLAGS and *_LIBS variables are intentionally placed
+   # to force freetype to use our settings rather than autodetecting
+   export LIBPNG_CFLAGS="$MOZ_PNG_CFLAGS "
+   export LIBPNG_LIBS="$MOZ_PNG_LIBS "
+   export ZLIB_CFLAGS="$MOZ_ZLIB_CFLAGS "
+   export ZLIB_LIBS="$MOZ_ZLIB_LIBS "
    export CONFIG_FILES="unix-cc.mk:unix-cc.in unix-def.mk:unix-def.in freetype-config freetype2.pc:freetype2.in"
-   ac_configure_args="$ac_configure_args --host=$target --disable-shared --with-pic=yes --with-png=yes --without-harfbuzz"
+   ac_configure_args="$ac_configure_args --host=$target --disable-shared --with-pic=yes --with-zlib=yes --without-bzip2 --with-png=yes --without-harfbuzz"
 
    if ! test -e modules; then
      mkdir modules
    fi
 
    AC_OUTPUT_SUBDIRS(modules/freetype2)
 fi