summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in10
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?