[xml] [PATCH] configure: fix enabling of lzma support when pkg-config is available
- From: "Dmitry V. Levin" <ldv altlinux org>
- To: xml gnome org
- Subject: [xml] [PATCH] configure: fix enabling of lzma support when pkg-config is available
- Date: Wed, 12 Nov 2014 19:57:27 +0300
When pkg-config says that liblzma is available, the check for lzma.h
is still necessary because HAVE_LZMA_H is still used by the code.
This fixes regression introduced by commit
v2.9.1-37-gf3f86ff465c92c79f834d7b981f3c7274a8bb5c8.
---
configure.ac | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/configure.ac b/configure.ac
index 14ac0a8..c32777a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -434,22 +434,30 @@ else
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
LZMA_CFLAGS="-I${LZMA_DIR}/include"
LZMA_LIBS="-L${LZMA_DIR}/lib -llzma"
else
LZMA_LIBS="-llzma"
fi],
[have_liblzma=no])
LDFLAGS="${SAVE_LDFLAGS}"])
+ else
+ SAVE_CFLAGS="${CFLAGS}"
+ CFLAGS="${CFLAGS} ${LZMA_CFLAGS}"
+ AC_CHECK_HEADERS([lzma.h],, [
+ have_liblzma=no
+ LZMA_CFLAGS=
+ LZMA_LIBS=])
+ CFLAGS="${SAVE_CFLAGS}"
fi
# Found the library via either method?
if test "x$have_liblzma" = "xyes"; then
AC_DEFINE([HAVE_LIBLZMA], [1], [Have compression library])
WITH_LZMA=1
fi
fi
--
ldv
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]