From: Albert C. <rub...@ml...> - 2006-04-20 17:08:13
|
On Thu, Apr 13, 2006 at 03:51:17PM +0100, Jeremy Henty wrote: > > On Wed, Apr 12, 2006 at 09:03:16AM +0100, Jeremy Henty wrote: > > On Thu, Apr 06, 2006 at 12:28:30AM -0500, Albert Chin wrote: > > > > > ruby-fltk uses the same compiler used to build ruby. However, if > > > fltk was built with a C++ compiler, ruby-fltk should use it in > > > extconf.rb, especially if a non-GCC compiler was used. > > > > I'm not sure I understand. Both FLTK and Ruby-FLTK are written in > > C++ so they are *always* built with a C++ compiler. Ruby-FTLK uses > > a hack: extconf.rb loads cxx.rb , which goes through the > > configuration and replaces gcc for g++ . Do you need something like > > this to happen for non-gcc compilers too? > > OK, I've investigated a little more. It turns out that Ruby-FTLK's > cxx.rb hack is clunky and overkill. The Makefile correctly specifies > $(CXX) for *.cc files, so the library gets built with g++ (at least on > my GNU/Linux system it does). The real need for the cxx.rb hack is so > that feature tests for C++ code are compiled with g++ . However you > can do that much more easily simply by setting CONFTEST_C = > "conftest.cc", so that the .cc extension tells gcc that the test > source is C++ . I have committed this change to CVS. What if you wish to build with the OS vendor C++ compiler? For Solaris, it's CC. For HP-UX, it's aCC. > > > How about addition an option, --with-cxx=<compiler> to use for the > > > compile tests in extconf.rb? How would I do this? > > You know, I just reread this passage of yours more carefully and > noticed you referred specifically to "the compile tests in > extconf.rb". If that's your problem then the change I just committed > may help. Can you check out the latest CVS[1] and see if it works? > It would be really useful for me to know how this works on a non-GNU > system. (What is your system, by the way?) The systems are HP-UX and Solaris. I checked out CVS but don't see any changes relative to 0.9.3. I browsed CVS on sf.net but don't see any recent changes there either. I used the checkout method on the ruby-fltk web page: $ cvs -d :pserver:ano...@cv...:/cvsroot/ruby-fltk login $ cvs -d :pserver:ano...@cv...:/cvsroot/ruby-fltk checkout -P ruby-fltk -- albert chin (ch...@th...) |