From: Kouhei S. <ko...@co...> - 2006-09-25 14:16:05
|
須藤です. mkmf-gnome2.rbのadd_depend_packageでは,$CFLAGSに-I...を追加 しますが,これを$INCFLAGSに追加するように変更してもよいです か? Index: src/lib/mkmf-gnome2.rb =================================================================== RCS file: /cvsroot/ruby-gnome2/ruby-gnome2/glib/src/lib/mkmf-gnome2.rb,v retrieving revision 1.29 diff -u -p -r1.29 mkmf-gnome2.rb --- src/lib/mkmf-gnome2.rb 29 Jun 2006 18:16:05 -0000 1.29 +++ src/lib/mkmf-gnome2.rb 25 Sep 2006 14:09:16 -0000 @@ -112,7 +112,7 @@ end #add_depend_package("glib2", "glib/src", "/...../ruby-gnome2") def add_depend_package(target_name, target_srcdir, topdir) - $CFLAGS += " -I" + File.join(topdir, target_srcdir) + $INCFLAGS = "-I#{File.join(topdir, target_srcdir)} #{$INCFLAGS}" if /cygwin|mingw/ =~ RUBY_PLATFORM $libs << " -lruby-#{target_name}" 理由はコンパイル対象のrbgobject.hなどよりもシステムにインス トールされているrbgobject.hなどの方が優先されてしまうことが あるためです. 詳細はこんな感じです. * $INCFLAGSには-I/usr/lib/ruby/1.8/i486-linuxのような ruby.hがあるパスが入っている * Debianのパッケージではrbglib.hなどはruby.hと同じディレ クトリにインストールされる * $CFLAGSよりも$INCFLAGSの方が優先される * $CFLAGSに入っている-I/.../ruby-gnome2/glib/src/よりも -I/usr/lib/ruby/1.8/i486-linuxが優先されて /.../ruby-gnome2/glib/src/rbgobject.hではなくて, /usr/lib/ruby/1.8/i486-linuxにあるrbgobject.hの方が読み 込まれてしまう(ことがある) |