2011-10-02 11:33:48 -05:00
|
|
|
require 'mkmf'
|
|
|
|
|
|
|
|
dir_config("puma_http11")
|
2019-11-09 00:16:34 -06:00
|
|
|
|
2020-03-17 07:16:45 -05:00
|
|
|
if $mingw && RUBY_VERSION >= '2.4'
|
2019-11-09 00:16:34 -06:00
|
|
|
append_cflags '-fstack-protector-strong -D_FORTIFY_SOURCE=2'
|
|
|
|
append_ldflags '-fstack-protector-strong -l:libssp.a'
|
2019-10-19 23:26:46 -05:00
|
|
|
have_library 'ssp'
|
|
|
|
end
|
2011-10-02 11:33:48 -05:00
|
|
|
|
2015-09-18 09:43:51 -07:00
|
|
|
unless ENV["DISABLE_SSL"]
|
2016-07-25 17:20:17 -07:00
|
|
|
dir_config("openssl")
|
|
|
|
|
2015-09-18 09:43:51 -07: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 14:49:45 -05:00
|
|
|
|
|
|
|
# below is yes for 1.0.2 & later
|
2020-11-30 09:51:48 -06:00
|
|
|
have_func "DTLS_method" , "openssl/ssl.h"
|
2019-07-08 14:49:45 -05:00
|
|
|
|
2020-11-30 09:51:48 -06:00
|
|
|
# below are yes for 1.1.0 & later
|
|
|
|
have_func "TLS_server_method" , "openssl/ssl.h"
|
|
|
|
have_func "SSL_CTX_set_min_proto_version(NULL, 0)", "openssl/ssl.h"
|
2021-01-26 15:18:51 -06:00
|
|
|
|
|
|
|
have_func "X509_STORE_up_ref"
|
|
|
|
have_func("SSL_CTX_set_ecdh_auto(NULL, 0)", "openssl/ssl.h")
|
2015-09-18 09:43:51 -07:00
|
|
|
end
|
2014-07-12 09:19:28 +08:00
|
|
|
end
|
2015-09-18 09:43:51 -07:00
|
|
|
|
2020-12-01 10:51:16 -03:00
|
|
|
if ENV["MAKE_WARNINGS_INTO_ERRORS"]
|
|
|
|
# Make all warnings into errors
|
|
|
|
# Except `implicit-fallthrough` since most failures comes from ragel state machine generated code
|
|
|
|
if respond_to? :append_cflags
|
|
|
|
append_cflags config_string 'WERRORFLAG'
|
|
|
|
append_cflags '-Wno-implicit-fallthrough'
|
|
|
|
else
|
|
|
|
$CFLAGS += ' ' << (config_string 'WERRORFLAG') << ' -Wno-implicit-fallthrough'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-09-18 09:43:51 -07:00
|
|
|
create_makefile("puma/puma_http11")
|