diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index ef21bd5f43e5d4..737d93183ffd1c 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -18,6 +18,12 @@ Logging::message "=== OpenSSL for Ruby configurator ===\n" +# Append flags from environment variables. +extcflags = ENV["RUBY_OPENSSL_EXTCFLAGS"] +append_cflags(extcflags.split) if extcflags +extldflags = ENV["RUBY_OPENSSL_EXTLDFLAGS"] +append_ldflags(extldflags.split) if extldflags + ## # Adds -DOSSL_DEBUG for compilation and some more targets when GCC is used # To turn it on, use: --with-debug or --enable-debug