[#21225] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values. — "U.Nakamura" <usa@...>

こんにちは、なかむら(う)です。

14 messages 2003/08/22
[#21227] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values. — nobu.nakada@... 2003/08/22

なかだです。

[#21228] Re: [ruby-cvs] ruby: * enum.c (inject_i): use rb_yield_values. — matz@... (Yukihiro Matsumoto) 2003/08/22

まつもと ゆきひろです

[#21281] 大量メモリ消費攻撃に対する対応 — Hidetoshi NAGAI <nagai@...>

永井@知能.九工大です.

16 messages 2003/08/29
[#21285] Re: 大量メモリ消費攻撃に対する対応 — matz@... (Yukihiro Matsumoto) 2003/08/29

まつもと ゆきひろです

[#21288] Re: 大量メモリ消費攻撃に対する対応 — Hidetoshi NAGAI <nagai@...> 2003/08/29

永井@知能.九工大です.

[#21306] Re: 大量メモリ消費攻撃に対する対応 — matz@... (Yukihiro Matsumoto) 2003/09/03

まつもと ゆきひろです

[ruby-dev:21065] mkmf.rb: pkg_config

From: nobu.nakada@...
Date: 2003-08-02 00:21:26 UTC
List: ruby-dev #21065
なかだです。

最近のlib/mkmf.rbに対する変更のために、ext/opensslがpkg-config
が必要な環境でhave_funcに失敗するようになっていました。これは
have_funcが$DLDFLAGSではなく$LDFLAGSを使うように戻ったせいです
が、こういった詳細を各ライブラリに分担させるのは望ましくないと
思います。


Index: lib/mkmf.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/lib/mkmf.rb,v
retrieving revision 1.142
diff -u -2 -p -r1.142 mkmf.rb
--- lib/mkmf.rb	30 Jul 2003 13:35:23 -0000	1.142
+++ lib/mkmf.rb	2 Aug 2003 00:18:22 -0000
@@ -618,4 +618,25 @@ def dir_config(target, idefault=nil, lde
 end
 
+def pkg_config(pkg)
+  unless defined?($PKGCONFIG)
+    if pkgconfig = with_config("pkg-config", !CROSS_COMPILING && "pkg-config")
+      find_executable0(pkgconfig) or pkgconfig = nil
+    end
+    $PKGCONFIG = pkgconfig
+  end
+  if $PKGCONFIG and system("#{$PKGCONFIG} --exists #{pkg}")
+    cflags = `#{$PKGCONFIG} --cflags #{pkg}`.chomp
+    ldflags = `#{$PKGCONFIG} --libs-only-L #{pkg}`.chomp
+    libs = `#{$PKGCONFIG} --libs-only-l #{pkg}`.chomp
+    $CFLAGS += " " << cflags
+    $LDFLAGS += " " << ldflags
+    $LIBS += " " << libs
+    Logging::message "package configuration for %s\n", pkg
+    Logging::message "cflags: %s\nldflags: %s\nlibs: %s\n\n",
+                     cflags, ldflags, libs
+    [cflags, ldflags, libs]
+  end
+end
+
 def with_destdir(dir)
   /^\$[\(\{]/ =~ dir ? dir : "$(DESTDIR)"+dir
Index: ext/openssl/extconf.rb
===================================================================
RCS file: /cvs/ruby/src/ruby/ext/openssl/extconf.rb,v
retrieving revision 1.12
diff -u -2 -p -r1.12 extconf.rb
--- ext/openssl/extconf.rb	1 Aug 2003 08:20:20 -0000	1.12
+++ ext/openssl/extconf.rb	1 Aug 2003 08:20:59 -0000
@@ -19,5 +19,4 @@ require "mkmf"
 dir_config("openssl")
 dir_config("kerberos")
-pkgconfig = with_config("pkg-config", !CROSS_COMPILING && "pkg-config")
 
 message "=== OpenSSL for Ruby configurator ===\n"
@@ -52,11 +51,5 @@ result &&= %w[crypto libeay32].any? {|li
 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
-    result = have_header("openssl/ssl.h")
-  end
-  if !result
+  unless pkg_config("openssl") and have_header("openssl/ssl.h")
     message "=== Checking for required stuff failed. ===\n"
     message "Makefile wasn't created. Fix the errors above.\n"


-- 
--- 僕の前にBugはない。
--- 僕の後ろにBugはできる。
    中田 伸悦

In This Thread

Prev Next