configure: allow setting the default SSL backend

Previously, we used as default SSL backend whatever was first in the
`available_backends` array.

However, some users may want to override that default without patching
the source code.

Now they can: with the --with-default-ssl-backend=<backend> option of
the ./configure script.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
Johannes Schindelin 2017-08-24 22:26:48 +02:00 committed by Daniel Stenberg
parent 3063254e32
commit c7170e20d0
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 58 additions and 0 deletions

View file

@ -1246,6 +1246,10 @@ static int multissl_init(const struct Curl_ssl *backend)
return 1;
env = getenv("CURL_SSL_BACKEND");
#ifdef CURL_DEFAULT_SSL_BACKEND
if(!env)
env = CURL_DEFAULT_SSL_BACKEND;
#endif
if(env)
for(i = 0; available_backends[i]; i++)
if(!strcmp(env, available_backends[i]->info.name)) {