]> git.ipfire.org Git - thirdparty/git.git/commitdiff
configure.ac: detect ssl need with libcurl
authorRemi Pommarel <repk@triplefau.lt>
Thu, 24 Sep 2015 19:14:00 +0000 (21:14 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Oct 2015 19:44:44 +0000 (12:44 -0700)
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>
configure.ac

index 01b07ad990427cf3e3f506b1169760d47843ffbb..fd22d41b2f654ce92f66292b3276616086958892 100644 (file)
@@ -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])