Fix test for zlib.

* configure.ac (HAVE_ZLIB): Define only if found.
This commit is contained in:
Werner Koch 2014-01-09 15:36:35 +01:00
parent aba53e9f96
commit 477aabaf75
1 changed files with 7 additions and 6 deletions

View File

@ -1362,12 +1362,13 @@ if test "$use_zip" = yes ; then
])
AC_CHECK_HEADER(zlib.h,
AC_CHECK_LIB(z, deflateInit2_,
ZLIBS="-lz",
CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
AC_DEFINE(HAVE_ZIP,1, [Defined if ZIP and ZLIB are supported])
AC_CHECK_LIB(z, deflateInit2_,
[
ZLIBS="-lz"
AC_DEFINE(HAVE_ZIP,1, [Defined if ZIP and ZLIB are supported])
],
CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags}),
CPPFLAGS=${_cppflags} LDFLAGS=${_ldflags})
fi