diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2017-01-05 15:14:28 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2017-01-05 15:14:28 +0900 |
commit | 8072a9a0fa9544896a17aa4ee1b0a5f0e9739bbc (patch) | |
tree | f44173145eebdf9c0003b6cbc300479c6dfc99e4 /ext/openssl | |
parent | 46674c38caca74732a0092c725849b5bf39d1df8 (diff) | |
parent | a2dc925ac646f30e7d518158d7931ff422444ffe (diff) | |
download | ruby-openssl-8072a9a0fa9544896a17aa4ee1b0a5f0e9739bbc.tar.gz |
Merge branch 'topic/windows-static-linking-without-pkg-config' into maint
* topic/windows-static-linking-without-pkg-config:
Fix build with static OpenSSL libraries on Windows
Diffstat (limited to 'ext/openssl')
-rw-r--r-- | ext/openssl/extconf.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 7033b0e2..60bd518e 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -37,6 +37,12 @@ have_library("socket", "socket") Logging::message "=== Checking for required stuff... ===\n" result = pkg_config("openssl") && have_header("openssl/ssl.h") unless result + if $mswin || $mingw + # required for static OpenSSL libraries + have_library("gdi32") # OpenSSL <= 1.0.2 (for RAND_screen()) + have_library("crypt32") + end + result = have_header("openssl/ssl.h") result &&= %w[crypto libeay32].any? {|lib| have_library(lib, "CRYPTO_malloc")} result &&= %w[ssl ssleay32].any? {|lib| have_library(lib, "SSL_new")} |