Skip to content

Commit 7e91e8d

Browse files
repkgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f891587 commit 7e91e8d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

configure.ac

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,16 @@ AC_CHECK_LIB([curl], [curl_global_init],
521521
[NO_CURL=],
522522
[NO_CURL=YesPlease])
523523

524+
if test -z "${NO_CURL}" && test -z "${NO_OPENSSL}"; then
525+
526+
AC_CHECK_LIB([curl], [Curl_ssl_init],
527+
[NEEDS_SSL_WITH_CURL=YesPlease],
528+
[NEEDS_SSL_WITH_CURL=])
529+
530+
GIT_CONF_SUBST([NEEDS_SSL_WITH_CURL])
531+
532+
fi
533+
524534
GIT_UNSTASH_FLAGS($CURLDIR)
525535

526536
GIT_CONF_SUBST([NO_CURL])

0 commit comments

Comments
 (0)