From: Craig Files Date: 2001-10-05T01:47:26+09:00 Subject: [ruby-talk:22093] RUBY_PLATFORM problems/questions Hi, We are doing some work with cross-compiling on different OSes and thought that the RUBY_PLATFORM variable would tell us the current OS. Ruby version 1.7.1 (08/29/2001) 1. This is not the case, RUBY_PLATFORM or PLATFORM looks to be set as a define in ruby/Makefile.in. Thus, if I compile ruby under HPUX 10.20, and then run ruby under HPUX 11.00, the PLATFORM variable states that I am running under HPUX 10.20. This does not fit the definition in the AXE book (pg. 455) where PLATFORM should be "the platform on which Ruby is running". 2. Since the above is not what we want, is there any way in Ruby to determine the platform and processor during runtime? We are creating SWIG libraries in directories like ... /lib/linux/i686/lib*, /lib/hpux10.0/pa1.1/lib*, etc and need ruby to understand which library it should run. 3. There also seems to be a problem with setting RUBY_PLATFORM in configure.in. To make sure that old risc processors can run ruby I have to do a "configure --host=hppa1.1-hp-hpux10.20" on my hppa2.0 box. After compiling/configuring, RUBY_PLATFORM is set to hppa2.0-hpux10.20. This, I think, is wrong. It seems to me that it should have looked at the host to determine that it was being compiled for a different processor. Craig -- ___________________________________________________________________________ Craig Files, PhD | / http://fccf0183l.ftc.agilent.com/~cfiles/ | __o / craig_files@agilent.com | \<, / ____________________________________________|_____()/ ()____/ (970)288-0183