[libxml2] Fix zlib and lzma libraries check via command line
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Fix zlib and lzma libraries check via command line
- Date: Tue, 7 Oct 2014 11:01:08 +0000 (UTC)
commit 7dc24965092d7cc310908d6052913050e88ec072
Author: Dmitriy <aweioklds gmail com>
Date: Tue Oct 7 18:59:00 2014 +0800
Fix zlib and lzma libraries check via command line
For https://bugzilla.gnome.org/show_bug.cgi?id=737532
add save, change and restore LDFLAGS before AC_CHECK_LIB call
when functions gzread and lzma_code are searching inside action-if-found
of AC_CHECK_HEADERS
configure.in | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/configure.in b/configure.in
index f0a62ea..6bb1a52 100644
--- a/configure.in
+++ b/configure.in
@@ -391,6 +391,8 @@ if test "$with_zlib" = "no"; then
echo "Disabling compression support"
else
AC_CHECK_HEADERS(zlib.h,
+ [SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-L${Z_DIR}/lib"
AC_CHECK_LIB(z, gzread,[
AC_DEFINE([HAVE_LIBZ], [1], [Have compression library])
WITH_ZLIB=1
@@ -404,7 +406,8 @@ else
esac]
else
Z_LIBS="-lz"
- fi]))
+ fi])
+ LDFLAGS="${SAVE_LDFLAGS}"])
fi
AC_SUBST(Z_CFLAGS)
@@ -430,6 +433,8 @@ else
# private dependencies, though, so static linking may fail.
if test "x$have_liblzma" = "xno"; then
AC_CHECK_HEADERS(lzma.h,
+ [SAVE_LDFLAGS="${LDFLAGS}"
+ LDFLAGS="-L${LZMA_DIR}/lib"
AC_CHECK_LIB(lzma, lzma_code,[
have_liblzma=yes
if test "x${LZMA_DIR}" != "x"; then
@@ -438,7 +443,8 @@ else
else
LZMA_LIBS="-llzma"
fi],
- [have_liblzma=no]))
+ [have_liblzma=no])
+ LDFLAGS="${SAVE_LDFLAGS}"])
fi
# Found the library via either method?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]