2011-10-02 12:33:48 -04:00
|
|
|
require 'mkmf'
|
|
|
|
|
|
|
|
dir_config("puma_http11")
|
2019-10-20 00:26:46 -04:00
|
|
|
if RUBY_PLATFORM[/mingw32/]
|
|
|
|
append_cflags '-D_FORTIFY_SOURCE=2'
|
|
|
|
append_ldflags '-fstack-protector'
|
|
|
|
have_library 'ssp'
|
|
|
|
end
|
2011-10-02 12:33:48 -04:00
|
|
|
|
2015-09-18 12:43:51 -04:00
|
|
|
unless ENV["DISABLE_SSL"]
|
2016-07-25 20:20:17 -04:00
|
|
|
dir_config("openssl")
|
|
|
|
|
2015-09-18 12:43:51 -04:00
|
|
|
if %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')} and
|
|
|
|
%w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')}
|
|
|
|
|
|
|
|
have_header "openssl/bio.h"
|
2019-07-08 15:49:45 -04:00
|
|
|
|
|
|
|
# below is yes for 1.0.2 & later
|
|
|
|
have_func "DTLS_method" , "openssl/ssl.h"
|
|
|
|
|
|
|
|
# below are yes for 1.1.0 & later, may need to check func rather than macro
|
|
|
|
# with versions after 1.1.1
|
|
|
|
have_func "TLS_server_method" , "openssl/ssl.h"
|
|
|
|
have_macro "SSL_CTX_set_min_proto_version", "openssl/ssl.h"
|
2015-09-18 12:43:51 -04:00
|
|
|
end
|
2014-07-11 21:19:28 -04:00
|
|
|
end
|
2015-09-18 12:43:51 -04:00
|
|
|
|
|
|
|
create_makefile("puma/puma_http11")
|