summaryrefslogtreecommitdiff
path: root/ext/openssl/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/openssl/extconf.rb')
-rw-r--r--ext/openssl/extconf.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb
index 7033b0e20d..60bd518e16 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")}