cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl-config reports wrong info!

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 18 May 2001 16:39:00 +0200 (MET DST)

On Fri, 18 May 2001 curl_at_thewrittenword.com wrote:

> > checking for CRYPTO_lock in -lcrypto... no
> > checking for CRYPTO_lock in -lcrypto... (cached) no
>
> Ok, correct. The usual fix is to look for another symbol in -lcrypto with
> the second AC_CHECK_LIB.

Oh right, that's clever enough...

> And, we should probably change the above to:
> EXTRA_SSL=
>
> case "$OPT_SSL" in
> yes)
> EXTRA_SSL=/usr/local/ssl ;;
> esac
>
> AC_CHECK_LIB(crypto, CRYPTO_lock,[
> if test "x$OPT_SSL" != "xyes"; then
> LDFLAGS="$LDFLAGS -L$OPT_SSL/lib"
> CPPFLAGS="$CPPFLAGS -I$OPT_SSL/include/openssl -I$OPT_SSL/include"
> fi],[
> AC_CHECK_LIB(crypto, CRYPTO_lock,[
> LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib"
> CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"],
> ${EXTRA_SSL+-L${EXTRA_SSL}}),
> ${OPT_SSL+-L${OPT_SSL}}])

I had a go at it just now, and I turned the same section into the following.
It seems to work for nothing, --with-ssl and --with-ssl=/foo/path...

  dnl Check for and handle argument to --with-ssl.
  EXTRA_SSL=

  case "$OPT_SSL" in
  yes)
    EXTRA_SSL=/usr/local/ssl ;;
  *)
    EXTRA_SSL=$OPT_SSL ;;
  esac

  AC_CHECK_LIB(crypto, CRYPTO_lock,[
     HAVECRYPTO="yes"
     ],[
     OLDLDFLAGS="$LDFLAGS"
     OLDCPPFLAGS="$CPPFLAGS"
     LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib"
     CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include"
     AC_CHECK_LIB(crypto, CRYPTO_add_lock,[
       HAVECRYPTO="yes" ], [
       LDFLAGS="$OLDLDFLAGS"
       CPPFLAGS="$OLDCPPFLAGS"
       ])
    ])

-- 
     Daniel Stenberg -- curl dude -- http://curl.haxx.se/
Received on 2001-05-18