--pgp-sign-Multipart_Wed_Jul__9_10:08:49_2008-1
Content-Type: text/plain; charset=ISO-2022-JP

 ruby 1.8 の tk ライブラリが OS X 上でビルドできない件です。

 OS X の gcc には仕掛けがあり、 ruby 1.9 が入っていなくても
#include <ruby/ruby.h> は

	/System/Library/Frameworks/Ruby.framework/Headers/ruby.h

を拾ってしまいます。(framework名/Headers以下のパス)

 以下の修正で直ります。コミットしてよいでしょうか。

Index: trunk/ext/tk/tcltklib.c
===================================================================
--- trunk/ext/tk/tcltklib.c	(revision 17964)
+++ trunk/ext/tk/tcltklib.c	(working copy)
@@ -8,8 +8,7 @@

 #include "ruby.h"

-#ifdef HAVE_RUBY_RUBY_H
-/* #include "ruby/ruby.h" */
+#ifdef HAVE_RUBY_SIGNAL_H
 #include "ruby/signal.h"
 #ifdef HAVE_RUBY_ENCODING_H
 #include "ruby/encoding.h"
Index: trunk/ext/tk/extconf.rb
===================================================================
--- trunk/ext/tk/extconf.rb	(revision 17964)
+++ trunk/ext/tk/extconf.rb	(working copy)
@@ -5,7 +5,7 @@ require 'mkmf'
 is_win32 = (/mswin|mingw|cygwin|bccwin|wince/ =~ RUBY_PLATFORM)
 #is_macosx = (/darwin/ =~ RUBY_PLATFORM)

-have_header("ruby/ruby.h")
+have_header("ruby/signal.h")
 have_header("ruby/encoding.h")
 have_func("ruby_native_thread_p", "ruby.h")
 have_func("rb_errinfo", "ruby.h")
Index: trunk/ext/tk/tkutil/tkutil.c
===================================================================
--- trunk/ext/tk/tkutil/tkutil.c	(revision 17964)
+++ trunk/ext/tk/tkutil/tkutil.c	(working copy)
@@ -11,8 +11,7 @@

 #include "ruby.h"

-#ifdef HAVE_RUBY_RUBY_H
-/* #include "ruby/ruby.h" */
+#ifdef HAVE_RUBY_SIGNAL_H
 #include "ruby/signal.h"
 #include "ruby/st.h"
 #else
Index: branches/ruby_1_8/ext/tk/tcltklib.c
===================================================================
--- branches/ruby_1_8/ext/tk/tcltklib.c	(revision 17964)
+++ branches/ruby_1_8/ext/tk/tcltklib.c	(working copy)
@@ -8,8 +8,7 @@

 #include "ruby.h"

-#ifdef HAVE_RUBY_RUBY_H
-/* #include "ruby/ruby.h" */
+#ifdef HAVE_RUBY_SIGNAL_H
 #include "ruby/signal.h"
 #ifdef HAVE_RUBY_ENCODING_H
 #include "ruby/encoding.h"
Index: branches/ruby_1_8/ext/tk/extconf.rb
===================================================================
--- branches/ruby_1_8/ext/tk/extconf.rb	(revision 17964)
+++ branches/ruby_1_8/ext/tk/extconf.rb	(working copy)
@@ -5,7 +5,7 @@ require 'mkmf'
 is_win32 = (/mswin|mingw|cygwin|bccwin|wince/ =~ RUBY_PLATFORM)
 #is_macosx = (/darwin/ =~ RUBY_PLATFORM)

-have_header("ruby/ruby.h")
+have_header("ruby/signal.h")
 have_header("ruby/encoding.h")
 have_func("ruby_native_thread_p", "ruby.h")
 have_func("rb_errinfo", "ruby.h")
Index: branches/ruby_1_8/ext/tk/tkutil/tkutil.c
===================================================================
--- branches/ruby_1_8/ext/tk/tkutil/tkutil.c	(revision 17964)
+++ branches/ruby_1_8/ext/tk/tkutil/tkutil.c	(working copy)
@@ -11,8 +11,7 @@

 #include "ruby.h"

-#ifdef HAVE_RUBY_RUBY_H
-/* #include "ruby/ruby.h" */
+#ifdef HAVE_RUBY_SIGNAL_H
 #include "ruby/signal.h"
 #include "ruby/st.h"
 #else


--
Akinori MUSHA / http://akinori.org/

--pgp-sign-Multipart_Wed_Jul__9_10:08:49_2008-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (FreeBSD)

iEYEABECAAYFAkh0D6EACgkQkgvvx5/Z4e6+GwCgvnQQwJNaqjw3TYJjMeRAWi1D
hSYAn2GqfGSREK0Wo2Tk9eSzCiUz2EQu
=vHmI
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Wed_Jul__9_10:08:49_2008-1--