Commit a71c9d4c authored by Daniel Stenberg's avatar Daniel Stenberg
Browse files

configure: detect zlib with our pkg-config macros

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

Fixes #972 (again...)
parent 2c36cb1c
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -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"
  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