git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] ./configure.ac: Detect SSL in libcurl using curl-config

From
Дилян Палаузов <git-dpa@aegee.org>
Date
Jun 28, 2016, 12:04 UTC
Message-ID
<20160628120434.28105-1-git-dpa@aegee.org>

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>
---
 configure.ac | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/configure.ac b/configure.ac
index c279025..5e9ba59 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
-- 
2.9.0
Next: Junio C Hamano
Message 1 of 2 in “./configure.ac: Detect SSL in libcurl using curl-config”
  1. ./configure.ac: Detect SSL in libcurl using curl-configДилян Палаузов, Jun 28, 2016
  2. Junio C HamanoJun 28, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.