新井です。

ruby 1.7.3 (2002-09-11) [mips-sysv4.2MP] でのコンパイルの話です。

おそらく

http://www.ruby-lang.org/~eban/diary/200209a.html#200209083

ここらでの変更だと思うのですが、今の try_cpp のやり方がとあ
る環境(それは EWS4800^^;)にとってマズイです。

EWS4800 では、cc の -o オプションの仕様が以下のようになってます(man cc より)

          -o pathname
                    Specify the pathname of  the  final  output  file.
                    This  is  a  link editor option.  Therefore, it is
                    ignored when you specify it with  the  -c  option.
                    You cannot use the following suffixes for the file
                    name specified by pathname.

                         .c, .C, .p, .f, .F, .r, .e, .i, or .s

これにより、-o conftest.i の指定を受け付けず、have_header() 
の結果がコンパイルエラー(というかプリプロセスエラー)になって
ます。

根拠のない予想ですが、もしかすると autoconf の 
AC_PROG_CC_C_O にひっかかる環境は同じことになるのかもしれま
せん。

とりあえず、以下のように逃げました。

--- mkmf.rb.org	Tue Sep 10 18:53:04 2002
+++ mkmf.rb	Fri Sep 13 22:01:32 2002
@@ -86,6 +86,9 @@
 elsif /bccwin32/ =~ RUBY_PLATFORM
   OUTFLAG = '-o'
   CPPOUTFILE = '-oconftest.i'
+elsif /mips-sysv4/ =~ RUBY_PLATFORM
+  OUTFLAG = '-o '
+  CPPOUTFILE = '> conftest.i'
 else
   OUTFLAG = '-o '
   CPPOUTFILE = '-o conftest.i'

--
新井康司 (Koji Arai)