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

configure: fix --with-zlib when a path is specified

Prior to this change if you attempted to configure curl using
--wtih-zlib and specified a path the path would be ignored if you also
had pkg-config installed on your system.  This situation can easily
arise when you are cross compiling.  This change moves the test for
detecting zlib settings via pkg-config only if OPT_ZLIB is not set.

Closes https://github.com/curl/curl/pull/1292
This commit is contained in:
Greg Rowe 2017-02-26 17:39:12 -05:00 committed by Jay Satiro
parent e952402404
commit 6fc91f6d3a

View File

@ -893,17 +893,16 @@ else
OPT_ZLIB=""
fi
CURL_CHECK_PKGCONFIG(zlib)
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
CURL_CHECK_PKGCONFIG(zlib)
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 "$HAVE_LIBZ"; then