1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

extconf.rb - allow pkg_config for OpenSSL (#2648)

This commit is contained in:
MSP-Greg 2021-06-27 12:32:43 -05:00 committed by GitHub
parent 6a085e6cad
commit 4ff7d75c6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,9 +11,18 @@ end
unless ENV["DISABLE_SSL"]
dir_config("openssl")
if %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')} and
found_ssl = if pkg_config 'openssl'
puts 'using OpenSSL pkgconfig (openssl.pc)'
true
elsif %w'crypto libeay32'.find {|crypto| have_library(crypto, 'BIO_read')} &&
%w'ssl ssleay32'.find {|ssl| have_library(ssl, 'SSL_CTX_new')}
true
else
puts '** Puma will be compiled without SSL support'
false
end
if found_ssl
have_header "openssl/bio.h"
# below is yes for 1.0.2 & later