cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl-config oddity

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 10 May 2007 11:03:06 -0700

On Thu, May 10, 2007 at 06:56:54PM +0200, Michael Wallner wrote:
> Well, it's about my app's SSL library detection :) I need to know which
> SSL library is used by libcurl to set the right crypto locking callbacks.
> I used to test for the linker flags in my configure to determine the SSL
> library used by libcurl.

That method is no longer going to work, nor would it have been reliable in
every case, either. If your libcurl was upgraded from under your app to
another version that was linked to a different crypto library, your app would
be doing the wrong thing. This isn't just a theoretical problem, either--I
believe Debian now gives the option to install libcurl linked with either
OpenSSL or GnuTLS.

To be completely safe your app needs to either to a check at run-time what
library libcurl is using (tricky) or statically link against libcurl.

> The distributions (Kubuntu) curl-config gives me the following:
> mike_at_honeybadger:~/cvs/curl$ /usr/bin/curl-config --libs
> -L/usr/lib -lcurl -L/usr/lib -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -lkrb5support -lresolv -lidn -lssl -lcrypto -ldl -lssl -lcrypto -lz
>
> mike_at_honeybadger:~/cvs/curl$ /usr/bin/curl-config --feature
> SSL
> IPv6
> libz
> IDN
> NTLM
>
> mike_at_honeybadger:~/cvs/curl$ /usr/bin/curl-config --version
> libcurl 7.15.5
>
>
> So I wonder if I'm doing something wrong or I'm just missing some
> curl configure flags, or do you think this flags are added by the
> distributions libcurl package maintainer?

The behaviour I described is new in version 7.16.2; you're seeing the
old set of flags there.

>>> Dan

-- 
http://www.MoveAnnouncer.com              The web change of address service
          Let webmasters know that your web site has moved
Received on 2007-05-10