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:
parent
e952402404
commit
6fc91f6d3a
19
configure.ac
19
configure.ac
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user