Commit 6fc91f6d authored by Greg Rowe's avatar Greg Rowe Committed by Jay Satiro
Browse files

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
parent e9524024
Loading
Loading
Loading
Loading
+9 −10
Original line number Diff line number Diff line
@@ -893,6 +893,7 @@ else
    OPT_ZLIB=""
  fi

  if test -z "$OPT_ZLIB" ; then
    CURL_CHECK_PKGCONFIG(zlib)

    if test "$PKGCONFIG" != "no" ; then
@@ -903,8 +904,6 @@ else
      HAVE_LIBZ="1"
    fi

  if test -z "$OPT_ZLIB" ; then

    if test -z "$HAVE_LIBZ"; then

      dnl Check for the lib without setting any new path, since many