"daz" <dooby / d10.karoo.co.uk> wrote in message news:<mZadnVhxC9iNGk7dSa8jmw / karoo.co.uk>...
> > Extensions go into [$sitearchdir], which translates into
> > /ruby-install-directory/lib/ruby/site_ruby/1.8/i386-msvcrt for the
> > one-click installer, so packages know where to install extensions.
> >
> 
> Indeed, and when I was using one-click from Prag/\ndy, I noticed that
> a lot of these directories were set to drive T:\ .  Not difficult to
> find and change those, but wherever you  #include "ruby.h", some
> subtle upset might occur from using a config.h file which contains
> #defines tailored to someone else's machine.
> 
> It might not be a problem, but I'm not inclined towards finding out.

It isn't :)

If you look at rbconfig.rb, you'll find the paths are all defined
relative to

TOPDIR = File.dirname(__FILE__).sub!(%r'/lib/ruby/1\.8/i386\-mswin32\Z', '')

If you had to change paths from "T:\" in rbconfig.rb then it was a bug
which has since been resolved.

The one-click installer's config.h has the following paths

#define RUBY_LIB "/lib/ruby/1.8"
#define RUBY_SITE_LIB "/lib/ruby/site_ruby"
#define RUBY_SITE_LIB2 "/lib/ruby/site_ruby/1.8"
#define RUBY_PLATFORM "i386-mswin32"
#define RUBY_ARCHLIB "/lib/ruby/1.8/i386-mswin32"
#define RUBY_SITE_ARCHLIB "/lib/ruby/site_ruby/1.8/i386-msvcrt"

all of which have the $prefix removed.  The same is true for
mingw32-ruby's config.h.  If you saw "T:\" here then it has since been
removed.

On Linux, however, the $prefix is present.  In any case, I cannot
imagine a valid use of these raw paths except as convenience to C
extension writers who do not intend to distribute their work.  A
programmer would know they are locally dependent simply because they
are #defines.

So to answer your original question, "I wonder if it's _generally_
possible for users of a one-click installer to use the Ruby process to
add C extensions locally?" the answer is yes -- that's what an
install.rb does: it reads rbconfig.rb and then knows where to install.
The other things in config.h like sizeof(double) are fixed because of
the Win32 specification.