diff options
Diffstat (limited to 'ext/digest/digest_conf.rb')
| -rw-r--r-- | ext/digest/digest_conf.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/digest/digest_conf.rb b/ext/digest/digest_conf.rb new file mode 100644 index 0000000000..099d20fcbe --- /dev/null +++ b/ext/digest/digest_conf.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: false + +def digest_conf(name) + unless with_config("bundled-#{name}") + case cc = with_config("common-digest", true) + when true, false + else + cc = cc.split(/[\s,]++/).any? {|pat| File.fnmatch?(pat, name)} + end + if cc and File.exist?("#$srcdir/#{name}cc.h") and + have_header("CommonCrypto/CommonDigest.h") + $defs << "-D#{name.upcase}_USE_COMMONDIGEST" + $headers << "#{name}cc.h" + return :commondigest + end + end + $objs << "#{name}.#{$OBJEXT}" + return +end |
