diff options
Diffstat (limited to 'ext/digest/sha2')
-rw-r--r-- | ext/digest/sha2/extconf.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb index e0634245a9..05d0b8de33 100644 --- a/ext/digest/sha2/extconf.rb +++ b/ext/digest/sha2/extconf.rb @@ -9,10 +9,12 @@ $INCFLAGS << " -I$(srcdir)/.." $objs = [ "sha2init.#{$OBJEXT}" ] dir_config("openssl") +pkg_config("openssl") +require_relative '../../openssl/deprecation' if !with_config("bundled-sha2") && have_library("crypto") && - %w[SHA256 SHA512].all? {|d| have_func("#{d}_Transform", "openssl/sha.h")} && + %w[SHA256 SHA512].all? {|d| OpenSSL.check_func("#{d}_Transform", "openssl/sha.h")} && %w[SHA256 SHA512].all? {|d| have_type("#{d}_CTX", "openssl/sha.h")} $objs << "sha2ossl.#{$OBJEXT}" $defs << "-DSHA2_USE_OPENSSL" @@ -26,8 +28,5 @@ have_header("sys/cdefs.h") $preload = %w[digest] if have_type("uint64_t", "defs.h", $defs.join(' ')) - if try_compile("", flag = " -Wno-deprecated-declarations") - $warnflags << flag - end create_makefile("digest/sha2") end |