summaryrefslogtreecommitdiff
path: root/ext/digest
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest')
-rw-r--r--ext/digest/md5/extconf.rb7
-rw-r--r--ext/digest/rmd160/extconf.rb7
-rw-r--r--ext/digest/sha1/extconf.rb7
-rw-r--r--ext/digest/sha2/extconf.rb7
4 files changed, 12 insertions, 16 deletions
diff --git a/ext/digest/md5/extconf.rb b/ext/digest/md5/extconf.rb
index 803741a6d91..f1dd9122b49 100644
--- a/ext/digest/md5/extconf.rb
+++ b/ext/digest/md5/extconf.rb
@@ -9,9 +9,11 @@ $INCFLAGS << " -I$(srcdir)/.."
$objs = [ "md5init.#{$OBJEXT}" ]
dir_config("openssl")
+pkg_config("openssl")
+require_relative '../../openssl/deprecation'
if !with_config("bundled-md5") &&
- have_library("crypto") && have_header("openssl/md5.h")
+ have_library("crypto") && OpenSSL.check_func("MD5_Transform", "openssl/md5.h")
$objs << "md5ossl.#{$OBJEXT}"
else
@@ -22,7 +24,4 @@ have_header("sys/cdefs.h")
$preload = %w[digest]
-if try_compile("", flag = " -Wno-deprecated-declarations")
- $warnflags << flag
-end
create_makefile("digest/md5")
diff --git a/ext/digest/rmd160/extconf.rb b/ext/digest/rmd160/extconf.rb
index 8d8cdee6bab..b7aed39ef98 100644
--- a/ext/digest/rmd160/extconf.rb
+++ b/ext/digest/rmd160/extconf.rb
@@ -9,9 +9,11 @@ $INCFLAGS << " -I$(srcdir)/.."
$objs = [ "rmd160init.#{$OBJEXT}" ]
dir_config("openssl")
+pkg_config("openssl")
+require_relative '../../openssl/deprecation'
if !with_config("bundled-rmd160") &&
- have_library("crypto") && have_header("openssl/ripemd.h")
+ have_library("crypto") && OpenSSL.check_func("RMD160_Transform", "openssl/ripemd.h")
$objs << "rmd160ossl.#{$OBJEXT}"
else
$objs << "rmd160.#{$OBJEXT}"
@@ -21,7 +23,4 @@ have_header("sys/cdefs.h")
$preload = %w[digest]
-if try_compile("", flag = " -Wno-deprecated-declarations")
- $warnflags << flag
-end
create_makefile("digest/rmd160")
diff --git a/ext/digest/sha1/extconf.rb b/ext/digest/sha1/extconf.rb
index 77a4b2b8472..a4d5bbcf48e 100644
--- a/ext/digest/sha1/extconf.rb
+++ b/ext/digest/sha1/extconf.rb
@@ -9,9 +9,11 @@ $INCFLAGS << " -I$(srcdir)/.."
$objs = [ "sha1init.#{$OBJEXT}" ]
dir_config("openssl")
+pkg_config("openssl")
+require_relative '../../openssl/deprecation'
if !with_config("bundled-sha1") &&
- have_library("crypto") && have_header("openssl/sha.h")
+ have_library("crypto") && OpenSSL.check_func("SHA1_Transform", "openssl/sha.h")
$objs << "sha1ossl.#{$OBJEXT}"
else
$objs << "sha1.#{$OBJEXT}"
@@ -21,7 +23,4 @@ have_header("sys/cdefs.h")
$preload = %w[digest]
-if try_compile("", flag = " -Wno-deprecated-declarations")
- $warnflags << flag
-end
create_makefile("digest/sha1")
diff --git a/ext/digest/sha2/extconf.rb b/ext/digest/sha2/extconf.rb
index e0634245a90..05d0b8de33c 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