Newer versions of these packages ship with pkg-config files, so if we can detect it via those, do so. If that fails, fall back to the old methods. --- configure.ac | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac index 3cbe618..8ec6c09 100644 --- a/configure.ac +++ b/configure.ac @@ -244,9 +244,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], [ -- 2.1.2
