File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 13
13
14
14
require "mkmf"
15
15
16
- dir_config ( "openssl" )
16
+ if defined? ( ::TruffleRuby )
17
+ require 'truffle/openssl-prefix'
18
+ dir_config ( "openssl" , ENV [ "OPENSSL_PREFIX" ] )
19
+ else
20
+ dir_config ( "openssl" )
21
+ end
22
+
17
23
dir_config ( "kerberos" )
18
24
19
25
Logging ::message "=== OpenSSL for Ruby configurator ===\n "
@@ -102,6 +108,13 @@ def find_openssl_library
102
108
"is installed."
103
109
end
104
110
111
+ # TruffleRuby: do not perform all checks again if extconf.h already exists
112
+ extconf_h = "#{ __dir__ } /extconf.h"
113
+ if File . exist? ( extconf_h ) && File . mtime ( extconf_h ) >= File . mtime ( __FILE__ ) && !Truffle ::OPENSSL_PREFIX_WAS_SET
114
+ $extconf_h = extconf_h
115
+ else
116
+ ### START of checks
117
+
105
118
version_ok = if have_macro ( "LIBRESSL_VERSION_NUMBER" , "openssl/opensslv.h" )
106
119
is_libressl = true
107
120
checking_for ( "LibreSSL version >= 3.1.0" ) {
@@ -184,5 +197,9 @@ def find_openssl_library
184
197
Logging ::message "=== Checking done. ===\n "
185
198
186
199
create_header
200
+
201
+ ### END of checks
202
+ end
203
+
187
204
create_makefile ( "openssl" )
188
205
Logging ::message "Done.\n "
You can’t perform that action at this time.
0 commit comments