{"thread":{"id":"40422","subject":"[PATCH 1/1] configure.ac: detect ssl need with libcurl","startedAt":"2015-09-24T19:14:00Z","lastAt":"2015-09-24T19:14:00Z","messageCount":1,"participants":["Remi Pommarel"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"270645","messageId":"1443122040-14189-1-git-send-email-repk@triplefau.lt","threadId":"40422","inReplyTo":null,"subject":"[PATCH 1/1] configure.ac: detect ssl need with libcurl","fromName":"Remi Pommarel","fromEmail":"repk@triplefau.lt","sentAt":"2015-09-24T19:14:00Z","receivedAt":"2015-09-24T19:14:00Z","isPatch":true,"sender":{"key":"repk@triplefau.lt","avatar":"https://avatars.githubusercontent.com/u/6833759?v=4"},"body":"When libcurl has been statically compiled with openssl support they both\nneed to be linked in everytime libcurl is used.\n\nDuring configuration this can be detected by looking for Curl_ssl_init\nfunction symbol in libcurl, which will only be present if libcurl has been\ncompiled statically built with openssl.\n\nconfigure.ac checks for Curl_ssl_init function in libcurl and if such function\nexists; it sets NEEDS_SSL_WITH_CURL that is used by the Makefile to include\n-lssl alongside with -lcurl.\n\nSigned-off-by: Remi Pommarel <repk@triplefau.lt>\n---\n configure.ac | 10 ++++++++++\n 1 file changed, 10 insertions(+)\n\ndiff --git a/configure.ac b/configure.ac\nindex 14012fa..39837c8 100644\n--- a/configure.ac\n+++ b/configure.ac\n@@ -521,6 +521,16 @@ AC_CHECK_LIB([curl], [curl_global_init],\n [NO_CURL=],\n [NO_CURL=YesPlease])\n \n+if test -z \"${NO_CURL}\" && test -z \"${NO_OPENSSL}\"; then\n+\n+AC_CHECK_LIB([curl], [Curl_ssl_init],\n+[NEEDS_SSL_WITH_CURL=YesPlease],\n+[NEEDS_SSL_WITH_CURL=])\n+\n+GIT_CONF_SUBST([NEEDS_SSL_WITH_CURL])\n+\n+fi\n+\n GIT_UNSTASH_FLAGS($CURLDIR)\n \n GIT_CONF_SUBST([NO_CURL])\n-- \n2.0.1\n"}]}