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

extconf.rb - don't use pkg_config('openssl') if '--with-openssl-dir' is used (#2885)

See https://github.com/ruby/openssl/pull/486
This commit is contained in:
MSP-Greg 2022-05-30 10:24:20 -05:00 committed by GitHub
parent aa2132695b
commit 1dc1dec372
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,9 +9,11 @@ if $mingw && RUBY_VERSION >= '2.4'
end
unless ENV["DISABLE_SSL"]
dir_config("openssl")
# don't use pkg_config('openssl') if '--with-openssl-dir' is used
has_openssl_dir = dir_config('openssl').any?
found_pkg_config = !has_openssl_dir && pkg_config('openssl')
found_ssl = if (!$mingw || RUBY_VERSION >= '2.4') && (t = pkg_config 'openssl')
found_ssl = if (!$mingw || RUBY_VERSION >= '2.4') && found_pkg_config
puts 'using OpenSSL pkgconfig (openssl.pc)'
true
elsif have_library('libcrypto', 'BIO_read') && have_library('libssl', 'SSL_CTX_new')