On Tue, Nov 15, 2005 at 04:52:16AM +0900, Hans Fugal wrote:
> I'm wrapping a library with swig, and I'd like to also implement some
> rubyisms for it in a regular ruby file. So I have:
> 
> ext/sndfile/extconf.rb
> ext/sndfile/sndfile.i
> ext/sndfile/sndfile.h
> lib/sndfile.rb
> 
> I'd like to have lib/sndfile.rb require the shared library. In the past
> I've done this with require 'foo.so', which worked great on linux but it
> occurs to me that it's not very cross-platform. (On my iBook for example
> the output is sndfile.bundle)

this might help you:

require 'rbconfig'
[RUBY_PLATFORM, RUBY_VERSION]      # => ["i686-linux", "1.8.3"]
Config::CONFIG["DLEXT"]            # => "so"

-- 
Mauricio Fernandez