diff options
author | Dmitriy <aweioklds@gmail.com> | 2014-10-07 18:59:00 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2014-10-07 18:59:00 +0800 |
commit | 7dc24965092d7cc310908d6052913050e88ec072 (patch) | |
tree | 149537915591bfa74803553c87ddaaf181233159 | |
parent | f5496a1ef43ab46211c772cd7a183e719ab24bb5 (diff) | |
download | libxml2-7dc24965092d7cc310908d6052913050e88ec072.tar.gz |
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
-rw-r--r-- | configure.in | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.in b/configure.in index f0a62eaa..6bb1a52e 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? |