Extconf.rb and c++

hi all,

I’m crafting some ruby extensions, and in order to detect some header files
and libraries I need to specify that I need to do the detection via c++
(because of some c++ bloat in the sources that pure C compiler will not
survive) , e.g., the conftest.c should either be named conftest.cc, or CC
variable should be set to g++, or something like that…

so the question is, how to force have_header, have_library, etc. to do the
detection using c++ compiler ??

semms like FXRuby is detecting fox library and headers by hand, so does the
ruby-qt2

thanx,
martin

···


Arthur: Is there someone else up there we could talk to?
French Soldier: No, now go away before I taunt you a second time.
– Monty Python and the Holy Grail

This is probably a hack, but how about:

CPP.sub!(CONFIG[‘CPP’], ‘g++ -E’)
LINK.sub!(CONFIG[‘CC’], ‘g++’)

I haven’t tried it, but since try_link and try_cpp use these constants,
I think it will work.

Paul

···

On Mon, Jun 10, 2002 at 05:38:06PM +0900, Martin Man wrote:

so the question is, how to force have_header, have_library, etc. to do the
detection using c++ compiler ??