diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-26 17:26:46 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-26 17:26:46 +0000 |
commit | 15d643f44cf786f1b71f837f3d020cbad02ae2f2 (patch) | |
tree | cae16074b66b205a837c10061d4b27a5280644f4 /ext/digest/rmd160/extconf.rb | |
parent | 965393cbb848ddb869543a5ca8f6e7fba1d0f130 (diff) |
* ext/digest/rmd160: Use OpenSSL's RMD160 engine if available. It
is much faster than what we have now (rmd160.[ch]). Add a knob
(--with-bundled-rmd160) to extconf.rb which makes it use the
bundled one anyway.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2894 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/digest/rmd160/extconf.rb')
-rw-r--r-- | ext/digest/rmd160/extconf.rb | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/ext/digest/rmd160/extconf.rb b/ext/digest/rmd160/extconf.rb index ce53c77b55..3f6a88e756 100644 --- a/ext/digest/rmd160/extconf.rb +++ b/ext/digest/rmd160/extconf.rb @@ -5,11 +5,17 @@ require "mkmf" $CFLAGS << " -DHAVE_CONFIG_H -I#{File.dirname(__FILE__)}/.." -$objs = [ - "rmd160.#{$OBJEXT}", - "rmd160hl.#{$OBJEXT}", - "rmd160init.#{$OBJEXT}", -] +$objs = [ "rmd160init.#{$OBJEXT}" ] + +dir_config("openssl") + +if !with_config("bundled-rmd160") && + have_library("crypto") && have_header("openssl/ripemd.h") + $objs << "rmd160ossl.#{$OBJEXT}" + $libs << " -lcrypto" +else + $objs << "rmd160.#{$OBJEXT}" << "rmd160hl.#{$OBJEXT}" +end have_header("sys/cdefs.h") |