diff options
author | Greg Rowe <growe@ascending-edge.com> | 2017-02-26 17:39:12 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2017-03-03 02:53:35 -0500 |
commit | 6fc91f6d3af1d9976cdba8e6d757d56b1c8d3b54 (patch) | |
tree | 05d7122616be3a95d19631b1f3bf4e59007cf6e0 | |
parent | e95240240465a7a7d6a0076229918da85da19818 (diff) |
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
-rw-r--r-- | configure.ac | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/configure.ac b/configure.ac index 5c77b0f4c..abd0def36 100644 --- a/configure.ac +++ b/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 |