[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] [PATCH] Fix 'checking if gcc static flag -static works' test
From: |
Gilles Espinasse |
Subject: |
[ft-devel] [PATCH] Fix 'checking if gcc static flag -static works' test |
Date: |
Fri, 29 Jun 2012 00:05:13 +0200 |
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.
Update LDFLAGS only after LT_INIT has run.
Signed-off-by: Gilles Espinasse <address@hidden>
---
builds/unix/configure.raw | 21 ++++++++++++++-------
1 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index 76fa0ca..3be7d58 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -253,8 +253,6 @@ if test x$with_zlib != xno && test -z "$LIBZ"; then
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 @@ if test x$with_bzip2 != xno && test -z "$LIBBZ2"; then
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,18 +685,28 @@ esac
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])
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
#
--
1.7.2.5
- [ft-devel] [PATCH] Fix 'checking if gcc static flag -static works' test,
Gilles Espinasse <=