Skip to content

Commit

Permalink
configure.ac: detect ssl need with libcurl
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Remi Pommarel authored and Junio C Hamano committed Oct 21, 2015
1 parent f891587 commit 7e91e8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 7e91e8d

Please sign in to comment.