summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorRemi Pommarel <repk@triplefau.lt>2015-09-24 19:14:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-10-21 19:44:44 (GMT)
commit7e91e8d73a757801c0604a03fd2f0fa8003e4ac0 (patch)
treefe9ab23c965706af6386af7261f519061eb1ceaa /configure.ac
parentf89158760d5f02ba59f644799abd921e6be22f13 (diff)
downloadgit-7e91e8d73a757801c0604a03fd2f0fa8003e4ac0.zip
git-7e91e8d73a757801c0604a03fd2f0fa8003e4ac0.tar.gz
git-7e91e8d73a757801c0604a03fd2f0fa8003e4ac0.tar.bz2
configure.ac: detect ssl need with libcurl
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 01b07ad..fd22d41 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])