I have both the OpenSSL and GnuTLS versions of libcurl installed:
root@php-shared:/# dpkg -l | grep libcurl
ii libcurl3:amd64 7.38.0-4+deb8u2 amd64 easy-to-use client-side URL transfer library (OpenSSL flavour)
ii libcurl3-gnutls:amd64 7.38.0-4+deb8u2 amd64 easy-to-use client-side URL transfer library (GnuTLS flavour)
ii libcurl4-openssl-dev:amd64 7.38.0-4+deb8u2 amd64 development files and documentation for libcurl (OpenSSL flavour)
Whenever I compile PHP from source (I'm using 5.6.16 here), it always links against the OpenSSL version of libcurl:
root@php-shared:/php/bin# ldd lsphp | grep curl
libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007f0fd38cb000)
I want to link against /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4. I can't see anything in the configure that is appropriate.
I've just installed libcurl4-gnutls-dev and compiled, and now I see it linked:
twinter@php-shared:/var/tmp/php-5.6.16$ ldd ./sapi/cli/php | grep curl
libcurl-gnutls.so.4 => /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 (0x00007fdc1e47c000)
I guess what I'm asking is ... is there a way to reliably specify whether we want to link against the OpenSSL flavour of libcurl or the GnuTLS flavour? Or does it just depend upon which libcurl*-dev package you have installed? What happens if you have both?
Thanks.