ref: ad866e2c9aa54afc8d2a702ae078b43055d5bd4b
parent: d0a827b3402e244f8d44da54978be2e15a2cb8af
author: Werner Lemberg <[email protected]>
date: Sat Jun 30 03:59:28 EDT 2012
Fix `checking if gcc static flag -static works' test. On my linux build tree, I receive yes answer in in every package I build except freetype for this test checking if gcc static flag `-static' works On freetype, no is received, unless bzip2 and zlib are disabled using ./configure --without-bzip2 --without-zlib The reason is that bzip2 and zlib tests add `-lz' and `-lbz2' to LDFLAGS and this broke static flag test. * builds/unix/configure.raw: Update CFLAGS and LDFLAGS only after LT_INIT has run.
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2012-06-30 Gilles Espinasse <[email protected]>
+
+ Fix `checking if gcc static flag -static works' test.
+
+ On my linux build tree, I receive yes answer in in every package I
+ build except freetype for this test checking if gcc static flag
+ `-static' works
+
+ On freetype, no is received, unless bzip2 and zlib are disabled using
+
+ ./configure --without-bzip2 --without-zlib
+
+ The reason is that bzip2 and zlib tests add `-lz' and `-lbz2' to
+ LDFLAGS and this broke static flag test.
+
+ * builds/unix/configure.raw: Update CFLAGS and LDFLAGS only after
+ LT_INIT has run.
+
2012-06-28 Infinality <[email protected]>
[truetype] Fix various artifacts.
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -253,8 +253,6 @@
AC_CHECK_LIB([z], [gzsetparams], [AC_CHECK_HEADER([zlib.h], [LIBZ='-lz'])])
fi
if test x$with_zlib != xno && test -n "$LIBZ"; then
- CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
- LDFLAGS="$LDFLAGS $LIBZ"
SYSTEM_ZLIB=yes
fi
@@ -268,8 +266,7 @@
AC_CHECK_LIB([bz2], [BZ2_bzDecompress], [AC_CHECK_HEADER([bzlib.h], [LIBBZ2='-lbz2'])])
fi
if test x$with_bzip2 != xno && test -n "$LIBBZ2"; then
- CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
- LDFLAGS="$LDFLAGS $LIBBZ2"
+ SYSTEM_LIBBZ2=yes
fi
# Some options handling SDKs/archs in CFLAGS should be copied
@@ -688,12 +685,9 @@
AC_SUBST([ftmac_c])
AC_SUBST([LIBZ])
AC_SUBST([LIBBZ2])
-AC_SUBST([CFLAGS])
-AC_SUBST([LDFLAGS])
AC_SUBST([FT2_EXTRA_LIBS])
AC_SUBST([SYSTEM_ZLIB])
-
LT_INIT(win32-dll)
AC_SUBST([hardcode_libdir_flag_spec])
@@ -700,6 +694,20 @@
AC_SUBST([wl])
AC_SUBST([build_libtool_libs])
+# changing LDFLAGS value should only be done after
+# lt_cv_prog_compiler_static_works test
+if test x$SYSTEM_ZLIB = xyes; then
+ CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_SYSTEM_ZLIB"
+ LDFLAGS="$LDFLAGS $LIBZ"
+fi
+
+if test x$SYSTEM_LIBBZ2 = xyes; then
+ CFLAGS="$CFLAGS -DFT_CONFIG_OPTION_USE_BZIP2"
+ LDFLAGS="$LDFLAGS $LIBBZ2"
+fi
+
+AC_SUBST([CFLAGS])
+AC_SUBST([LDFLAGS])
# configuration file -- stay in 8.3 limit
#