ruby-changes:10247
From: nobu <ko1@a...>
Date: Tue, 27 Jan 2009 11:10:04 +0900 (JST)
Subject: [ruby-changes:10247] Ruby:r21791 (trunk): * lib/mkmf.rb (try_header): checks the header depending on
nobu 2009-01-27 11:09:47 +0900 (Tue, 27 Jan 2009) New Revision: 21791 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=21791 Log: * lib/mkmf.rb (try_header): checks the header depending on platform. * lib/mkmf.rb (have_header, find_header): use try_header. * win32/Makefile.sub (try_header): uses try_compile to get rid of slow -E option of VC. Modified files: trunk/ChangeLog trunk/lib/mkmf.rb trunk/win32/Makefile.sub Index: ChangeLog =================================================================== --- ChangeLog (revision 21790) +++ ChangeLog (revision 21791) @@ -1,3 +1,13 @@ +Tue Jan 27 11:09:45 2009 Nobuyoshi Nakada <nobu@r...> + + * lib/mkmf.rb (try_header): checks the header depending on + platform. + + * lib/mkmf.rb (have_header, find_header): use try_header. + + * win32/Makefile.sub (try_header): uses try_compile to get rid of + slow -E option of VC. + Tue Jan 27 11:03:52 2009 Nobuyoshi Nakada <nobu@r...> * common.mk (distclean-enc, realclean-enc): do not call clean of Index: lib/mkmf.rb =================================================================== --- lib/mkmf.rb (revision 21790) +++ lib/mkmf.rb (revision 21791) @@ -433,6 +433,10 @@ rm_f "conftest*" end +class Object + alias_method :try_header, (config_string('try_header') || :try_cpp) +end + def cpp_include(header) if header header = [header] unless header.kind_of? Array @@ -806,7 +810,7 @@ # def have_header(header, &b) checking_for header do - if try_cpp(cpp_include(header), &b) + if try_header(cpp_include(header), &b) $defs.push(format("-DHAVE_%s", header.tr("a-z./\055", "A-Z___"))) true else @@ -825,13 +829,13 @@ message = checking_message(header, paths) header = cpp_include(header) checking_for message do - if try_cpp(header) + if try_header(header) true else found = false paths.each do |dir| opt = "-I#{dir}".quote - if try_cpp(header, opt) + if try_header(header, opt) $INCFLAGS << " " << opt found = true break Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 21790) +++ win32/Makefile.sub (revision 21791) @@ -654,6 +654,7 @@ s,@configure_input@,$$configure_input,;t t s,@srcdir@,$(srcdir),;t t s,@top_srcdir@,$(srcdir),;t t +s,@try_header@,try_compile,;t t <<KEEP miniruby: miniruby$(EXEEXT) -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/