diff --git a/ChangeLog b/ChangeLog index 078a65fc..a4257993 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2014-11-01 Mike Frysinger + + * configure.ac: Use pkg-config to check for zlib presence and + fallback to the previous code if that doesn't work. + 2014-07-28 Ángel González * contrib: Created contrib folder. * contrib/tsocked-wget: Added wrapper for usage with socks proxy. diff --git a/configure.ac b/configure.ac index 88401cf6..23048ba3 100644 --- a/configure.ac +++ b/configure.ac @@ -263,9 +263,17 @@ dnl dnl Checks for libraries. dnl +PKG_PROG_PKG_CONFIG + AS_IF([test x"$with_zlib" != xno], [ with_zlib=yes - AC_CHECK_LIB(z, compress) + PKG_CHECK_MODULES([ZLIB], zlib, [ + LIBS="$ZLIB_LIBS $LIBS" + CFLAGS="$ZLIB_CFLAGS $CFLAGS" + AC_DEFINE([HAVE_LIBZ], [1], [Define if using zlib.]) + ], [ + AC_CHECK_LIB(z, compress) + ]) ]) AS_IF([test x"$with_ssl" = xopenssl], [