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

[PATCH 1/1] configure.ac: detect ssl need with libcurl

From
Remi Pommarel <repk@triplefau.lt>
Date
Sep 24, 2015, 19:14 UTC
Message-ID
<1443122040-14189-1-git-send-email-repk@triplefau.lt>

When libcurl has been statically compiled with openssl support they both need to be linked in everytime libcurl is used.

During configuration this can be detected by looking for Curl_ssl_init function symbol in libcurl, which will only be present if libcurl has been compiled statically built with openssl.

configure.ac checks for Curl_ssl_init function in libcurl and if such function exists; it sets NEEDS_SSL_WITH_CURL that is used by the Makefile to include -lssl alongside with -lcurl.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
---
 configure.ac | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff --git a/configure.ac b/configure.ac
index 14012fa..39837c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -521,6 +521,16 @@ 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])
-- 
2.0.1
Message 1 of 1 in “configure.ac: detect ssl need with libcurl”
  1. 1/1 configure.ac: detect ssl need with libcurlRemi Pommarel, Sep 24, 2015

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.