cURL / Mailing Lists / curl-users / Single Mail

curl-users

Report used SSL library via curl-config

From: Oleg Pudeyev <oleg+pycurl_at_bsdpower.com>
Date: Thu, 23 Oct 2014 19:43:53 -0400

Hi,

PycURL needs to link against the SSL library used by libcurl for locks
in multithreaded environments, which Python is by default. As such
PycURL needs to know what SSL library libcurl is linked against.

curl-config does not directly expose this information. As a result a
number of roundabout ways have been employed to date to figure it out.
Historically `curl-config --libs` was used but some distributions do
not include SSL libraries in this list. There is an option for people
to specify the SSL library explicitly and, most recently, there has
been a request to take SSL library from `curl -V` output[1] - the
problem with this is that PycURL does not require a curl executable to
work. I implemented an alternative solution which loads libcurl.so and
retrieves version information from it[2].

The biggest issue is users want automatic detection of SSL library for
convenience (e.g. installation via pip/easy_install), and automatic
detection is getting increasingly bloated and potentially brittle. For
example, if there are two curl installations on a system and one of
them does not include curl binary but just libcurl, but both include
curl-config, and the libcurl-only installation's curl-config is first
in path, PycURL SSL detection logic would consult curl-config from one
installation and curl from the other.

I would like to request that a facility be added to curl-config to
report which SSL library that particular curl installation is using.

[1] https://github.com/pycurl/pycurl/pull/205
[2] https://github.com/pycurl/pycurl/pull/212

Thanks,
Oleg
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-10-24