On Mon, 29 Jul 2013, Peter Stuge wrote:

Is it? How would you build your makefile / build scripts with pkg-config
to figure this out?

Run:

pkg-config --print-requires libssh2
pkg-config --print-requires-private libssh2

If the output is empty then that is a libssh2 bug.

"pkg-config --print-requires libssh2" is completely blank for me on Debian, but so is "pkg-config --print-requires libcurl" as well, and both are listed with pkg-config --list-all... In fact, I couldn't find any package showing something in --print-requires on my Debian box when I tried a bunch of others as well.

Clearly not a very reliable method up until now at least!

But I could also imagine a run-time API so that an application can
figure this out on its own...

It can't be runtime, or applications must depend on every single crypto lib supported by libssh2, in order to have all symbols available.

I didn't claim they would be used for the same thing (even though a truly agnostic application may want to try). I can think of cases where detecting the underlying crypto lib at run-time can be useful or at least helpful.

--

 / daniel.haxx.se
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to