summaryrefslogtreecommitdiff
path: root/ext/digest/digest_conf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/digest/digest_conf.rb')
-rw-r--r--ext/digest/digest_conf.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/ext/digest/digest_conf.rb b/ext/digest/digest_conf.rb
index 4b8b6f4c58..b2a8195fa2 100644
--- a/ext/digest/digest_conf.rb
+++ b/ext/digest/digest_conf.rb
@@ -1,5 +1,14 @@
def digest_conf(name, hdr = name, funcs = nil)
unless with_config("bundled-#{name}")
+ cc = with_config("common-digest")
+ if cc == true or /\b#{name}\b/ =~ cc
+ if File.exist?("#$srcdir/#{name}cc.h") and
+ have_header("CommonCrypto/CommonDigest.h")
+ $defs << "-D#{name.upcase}_USE_COMMONDIGEST"
+ return :commondigest
+ end
+ end
+
dir_config("openssl")
pkg_config("openssl")
require File.expand_path('../../openssl/deprecation', __FILE__)