mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2026-01-26 21:41:34 +03:00
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
This commit is contained in:
10
configure.in
10
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?
|
||||
|
||||
Reference in New Issue
Block a user