[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [PATCH 1/5] use pkg-config to check zlib deps if available
From: |
Mike Frysinger |
Subject: |
[Bug-wget] [PATCH 1/5] use pkg-config to check zlib deps if available |
Date: |
Mon, 27 Oct 2014 14:55:21 -0400 |
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
- [Bug-wget] [PATCH 1/5] use pkg-config to check zlib deps if available,
Mike Frysinger <=
- [Bug-wget] [PATCH 3/5] use pkg-config to check pcre deps if available, Mike Frysinger, 2014/10/27
- [Bug-wget] [PATCH 4/5] use pkg-config to check openssl deps if available, Mike Frysinger, 2014/10/27
- [Bug-wget] [PATCH 5/5] use pkg-config to check gnutls deps if available, Mike Frysinger, 2014/10/27
- [Bug-wget] [PATCH 2/5] use pkg-config to check libuuid deps if available, Mike Frysinger, 2014/10/27
- Re: [Bug-wget] [PATCH 1/5] use pkg-config to check zlib deps if available, Giuseppe Scrivano, 2014/10/31