From: GOTOU Yuuzou Date: 2004-01-20T02:46:57+09:00 Subject: [ruby-list:39054] Re: compile error in ext/openssl In message <20040119141934.26606AF55@mail.nmn.jp>, `ruby@nmn.jp' wrote: > % openssl version > OpenSSL 0.9.5a 1 Apr 2000 > > でした。 (略) >  などとして探してみたのですが、conf_api.h は > ありませんでした。Vine 2.6r3 をどこかから > 取って来るしかないかなと思っています。 openssl/conf_api.hは0.9.6からのようですが、それ以前のバージョ ンで確認を行っていませんでした。 ext/opensslのせいでRuby全体のコンパイルが止まってしまうのは よくないので、extconf.rbでOpenSSLのバージョンをチェックする ようにしようと思います。 Index: ext/openssl/extconf.rb =================================================================== RCS file: /src/ruby/ext/openssl/extconf.rb,v retrieving revision 1.21 diff -u -p -r1.21 extconf.rb --- ext/openssl/extconf.rb 5 Oct 2003 13:58:02 -0000 1.21 +++ ext/openssl/extconf.rb 19 Jan 2004 17:32:54 -0000 @@ -58,6 +58,17 @@ if !result end end +check_opensslv = <<_end_of_src_ +#include +#if OPENSSL_VERSION_NUMBER < 0x0090600fL +# error too old +#endif +_end_of_src_ +if !try_compile(check_opensslv) + message "OpenSSL 0.9.6 or later required.\n" + exit 1 +end + message "=== Checking for OpenSSL features... ===\n" have_func("HMAC_CTX_copy") have_func("X509_STORE_get_ex_data") -- ごとうゆうぞう