diff options
Diffstat (limited to 'ext')
-rw-r--r-- | ext/openssl/extconf.rb | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 8102241ca8..b1f2d88dda 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -43,11 +43,14 @@ if $mingw have_library("wsock32") have_library("gdi32") end -result = have_header("openssl/ssl.h") -result &&= %w[crypto libeay32].any? {|lib| have_library(lib, "OpenSSL_add_all_digests")} -result &&= %w[ssl ssleay32].any? {|lib| have_library(lib, "SSL_library_init")} -if !result - unless pkg_config("openssl") and have_header("openssl/ssl.h") + +result = pkg_config("openssl") && have_header("openssl/ssl.h") + +unless result + result = have_header("openssl/ssl.h") + result &&= %w[crypto libeay32].any? {|lib| have_library(lib, "OpenSSL_add_all_digests")} + result &&= %w[ssl ssleay32].any? {|lib| have_library(lib, "SSL_library_init")} + unless result message "=== Checking for required stuff failed. ===\n" message "Makefile wasn't created. Fix the errors above.\n" exit 1 |