diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-27 12:19:18 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-07-27 12:19:18 +0000 |
commit | 1c1af14b6101b706db4561611b801865c043574f (patch) | |
tree | 43724ea7fd3b189c63262639c4abdaf6697963e9 | |
parent | 0bbf1c9382dfde3d8d75b93063f37a06f809b578 (diff) | |
download | ruby-1c1af14b6101b706db4561611b801865c043574f.tar.gz ruby-1c1af14b6101b706db4561611b801865c043574f.tar.xz ruby-1c1af14b6101b706db4561611b801865c043574f.zip |
* ext/openssl/extconf.rb: better support MinGW. add
dir_config("kerberos") and with_config("pkg-config).
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@4181 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ext/openssl/extconf.rb | 25 |
2 files changed, 20 insertions, 10 deletions
@@ -1,3 +1,8 @@ +Sun Jul 27 21:16:30 2003 WATANABE Hirofumi <eban@ruby-lang.org> + + * ext/openssl/extconf.rb: better support MinGW. add + dir_config("kerberos") and with_config("pkg-config). + Sun Jul 27 14:43:37 2003 NAKAMURA, Hiroshi <nahi@ruby-lang.org> * lib/debug.rb: fix breakpoint parameter parsing/checking. diff --git a/ext/openssl/extconf.rb b/ext/openssl/extconf.rb index 2f1ddfc94..fe4d2d654 100644 --- a/ext/openssl/extconf.rb +++ b/ext/openssl/extconf.rb @@ -17,7 +17,8 @@ require "mkmf" dir_config("openssl") - +dir_config("kerberos") +pkgconfig = with_config("pkg-config", !CROSS_COMPILING && "pkg-config") message "=== OpenSSL for Ruby configurator ===\n" @@ -66,15 +67,19 @@ 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 +if $mingw + have_library("wsock32") + have_library("gdi32") +end +result = have_header("openssl/ssl.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 + if find_executable(pkgconfig) and system(pkgconfig, "--exists", "openssl") + $CFLAGS += " " << `#{pkgconfig} --cflags openssl`.chomp + $DLDFLAGS += " " << `#{pkgconfig} --libs-only-L openssl`.chomp + $LIBS += " " << `#{pkgconfig} --libs-only-l openssl`.chomp + else message "=== Checking for required stuff failed. ===\n" message "Makefile wasn't created. Fix the errors above.\n" exit 1 |