diff --git a/ext/puma_http11/extconf.rb b/ext/puma_http11/extconf.rb index 1778c3ff..e523abaa 100644 --- a/ext/puma_http11/extconf.rb +++ b/ext/puma_http11/extconf.rb @@ -2,7 +2,8 @@ require 'mkmf' dir_config("puma_http11") -$defs.push "-Wno-deprecated-declarations" -$libs += " -lssl -lcrypto " +if %w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')} and + %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')} -create_makefile("puma/puma_http11") + create_makefile("puma/puma_http11") +end