From 924b7eb1c983c845203a5c2fd80fe499acff6e84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=94=D0=B8=D0=BB=D1=8F=D0=BD=20=D0=9F=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=D1=83=D0=B7=D0=BE=D0=B2?= Date: Tue, 28 Jun 2016 12:04:34 +0000 Subject: ./configure.ac: detect SSL in libcurl using curl-config MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: Дилян Палаузов Signed-off-by: Junio C Hamano --- configure.ac | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index c279025747..5e9ba59d59 100644 --- a/configure.ac +++ b/configure.ac @@ -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 -- cgit v1.2.3