summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-08-24 13:49:53 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-08-25 08:47:43 +0200
commita71c9d4c404e53226ea4310414ddebc6d83f7786 (patch)
tree3cafc55353bd4f5f7bb2f32e5c8d5a1fd7703ee5 /configure.ac
parent2c36cb1cbbd679c915856fbac551eee953025b5e (diff)
downloadcurl-a71c9d4c404e53226ea4310414ddebc6d83f7786.tar.gz
configure: detect zlib with our pkg-config macros
... instead of relying on the pkg-config autoconf macros to be present. Fixes #972 (again...)
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac20
1 files changed, 10 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac
index 5e769301e..083e18c95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -891,17 +891,17 @@ else
OPT_ZLIB=""
fi
- if test -z "$OPT_ZLIB" ; then
+ CURL_CHECK_PKGCONFIG(zlib)
- m4_ifdef([PKG_CHECK_MODULES], [
- PKG_CHECK_MODULES([ZLIB], [zlib],
- [ LIBS="${ZLIB_LIBS} $LIBS"
- CPPFLAGS="${ZLIB_CFLAGS} $CPPFLAGS"
- HAVE_LIBZ="1"
- ],
- [
- ])
- ])
+ if test "$PKGCONFIG" != "no" ; then
+ LIBS="`$PKGCONFIG --libs-only-l zlib` $LIBS"
+ LDFLAGS="`$PKGCONFIG --libs-only-L zlib` $LDFLAGS"
+ CPPFLAGS="`$PKGCONFIG --cflags-only-I zlib` $CPPFLAGS"
+ OPT_ZLIB=""
+ HAVE_LIBZ="1"
+ fi
+
+ if test -z "$OPT_ZLIB" ; then
if test -z "$HAVE_LIBZ"; then