E5FD Merge branch 'topic/windows-static-linking-without-pkg-config' into m… · ruby/openssl@8072a9a · GitHub
[go: up one dir, main page]

Skip to content

Commit 8072a9a

Browse files
committed
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
2 parents 46674c3 + a2dc925 commit 8072a9a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

ext/openssl/extconf.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
Logging::message "=== Checking for required stuff... ===\n"
3838
result = pkg_config("openssl") && have_header("openssl/ssl.h")
3939
unless result
40+
if $mswin || $mingw
41+
# required for static OpenSSL libraries
42+
have_library("gdi32") # OpenSSL <= 1.0.2 (for RAND_screen())
43+
have_library("crypt32")
44+
end
45+
4046
result = have_header("openssl/ssl.h")
4147
result &&= %w[crypto libeay32].any? {|lib| have_library(lib, "CRYPTO_malloc")}
4248
result &&= %w[ssl ssleay32].any? {|lib| have_library(lib, "SSL_new")}

0 commit comments

Comments
 (0)
0