1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-21 23:58:49 -05:00

configure: detect zlib with our pkg-config macros

... instead of relying on the pkg-config autoconf macros to be present.

Fixes #972 (again...)
This commit is contained in:
Daniel Stenberg 2016-08-24 13:49:53 +02:00
parent 2c36cb1cbb
commit a71c9d4c40

View File

@ -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