1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-05 09:26:12 +02:00

./configure.ac: detect SSL in libcurl using curl-config

The API of libcurl does not mention Curl_ssl_init() and when curl is
built with -flto, the Curl_ssl_init symbol is not exported.

https://curl.haxx.se/libcurl/using/ suggests calling

  curl-config --feature | grep SSL

to see, if the installed curl has SSL support.  Another approach
would be calling curl_version_info and checking the returned struct.

This patch removes the check for the Curl_ssl_init exported symbol
from libcurl and uses curl-config to detect SSL support in libcurl.

Signed-off-by: Дилян Палаузов <git-dpa@aegee.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Дилян Палаузов 2016-06-28 12:04:34 +00:00 committed by Junio C Hamano
parent 05219a1276
commit 924b7eb1c9

View File

@ -528,16 +528,6 @@ AC_CHECK_LIB([curl], [curl_global_init],
[NO_CURL=],
[NO_CURL=YesPlease])
if test -z "${NO_CURL}" && test -z "${NO_OPENSSL}"; then
AC_CHECK_LIB([curl], [Curl_ssl_init],
[NEEDS_SSL_WITH_CURL=YesPlease],
[NEEDS_SSL_WITH_CURL=])
GIT_CONF_SUBST([NEEDS_SSL_WITH_CURL])
fi
GIT_UNSTASH_FLAGS($CURLDIR)
GIT_CONF_SUBST([NO_CURL])
@ -550,6 +540,17 @@ AC_CHECK_PROG([CURL_CONFIG], [curl-config],
if test $CURL_CONFIG != no; then
GIT_CONF_SUBST([CURL_CONFIG])
if test -z "${NO_OPENSSL}"; then
AC_MSG_CHECKING([if Curl supports SSL])
if test $(curl-config --features|grep SSL) = SSL; then
NEEDS_SSL_WITH_CURL=YesPlease
AC_MSG_RESULT([yes])
else
NEEDS_SSL_WITH_CURL=
AC_MSG_RESULT([no])
fi
GIT_CONF_SUBST([NEEDS_SSL_WITH_CURL])
fi
fi
fi