1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/openssl/extconf.rb: add check for libsocket and libnsl.

* ext/openssl/extconf.rb: use pkg-config to build CFLAGS and LDFLAGS.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
gotoyuzo 2003-07-24 17:58:56 +00:00
parent 4d859f926a
commit c9aad4c098
2 changed files with 25 additions and 20 deletions

View file

@ -1,3 +1,9 @@
Fri Jul 25 02:55:59 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/extconf.rb: add check for libsocket and libnsl.
* ext/openssl/extconf.rb: use pkg-config to build CFLAGS and LDFLAGS.
Fri Jul 25 01:27:59 2003 why the lucky stiff <ruby-cvs@whytheluckystiff.net>
* ext/syck/emitter.c (syck_emitter_flush): accepts count
@ -35,7 +41,7 @@ Thu Jul 24 15:50:42 2003 GOTOU Yuuzou <gotoyuzo@notwork.org>
* ext/openssl/extconf.rb: add check for win32 OpenSSL libraries.
* ext/openssl/extconf.rb: add check for __VA_AEGS__.
* ext/openssl/extconf.rb: add check for __VA_ARGS__.
* ext/openssl/ossl.h: avoid non C99 compiler errors.

View file

@ -18,13 +18,6 @@ require "mkmf"
dir_config("openssl")
if !defined? message
def message(*s)
printf(*s)
Logging::message(*s)
end
end
message "=== OpenSSL for Ruby configurator ===\n"
@ -65,23 +58,29 @@ EOD
end
message "=== Checking for required stuff... ===\n"
result = have_header("openssl/crypto.h")
result &= ( have_library("crypto", "OpenSSL_add_all_digests") ||
have_library("libeay32", "OpenSSL_add_all_digests") )
result &= ( have_library("ssl", "SSL_library_init") ||
have_library("ssleay32", "SSL_library_init") )
if !result
message "=== Checking for required stuff failed. ===\n"
message "Makefile wasn't created. Fix the errors above.\n"
exit 1
end
message "=== Checking for system dependent stuff... ===\n"
have_library("nsl", "t_open")
have_library("socket", "socket")
have_header("unistd.h")
have_header("sys/time.h")
message "=== Checking for required stuff... ===\n"
if find_executable("pkg-config") and system("pkg-config", "--exists", "openssl")
$CFLAGS += " " << `pkg-config --cflags openssl`.chomp
$DLDFLAGS += " " << `pkg-config --libs-only-L openssl`.chomp
$LIBS += " " << `pkg-config --libs-only-l openssl`.chomp
else
result = have_header("openssl/crypto.h")
result &= %w[crypto libeay32].any? {|lib| have_library(lib, "OpenSSL_add_all_digests")}
result &= %w[ssl ssleay32].any? {|lib| have_library(lib, "SSL_library_init")}
if !result
message "=== Checking for required stuff failed. ===\n"
message "Makefile wasn't created. Fix the errors above.\n"
exit 1
end
end
message "=== Checking for OpenSSL features... ===\n"
have_func("HMAC_CTX_copy")
have_func("X509_STORE_get_ex_data")