OK, being completely sick of a lack of such a script (since it would be
really nice for autoconf macros...) I've hacked gnome-config to be
*extremely* generic.  I.e.  a couple extra lines in
configure.in/configure.ac and you can generate a nice ruby-config
script.

The skeleton can be found at
http://www.awesomeplay.com:82/~elanthis/package-config.in

<rant>
yes, the port 82 is important, my stupid isp blocked all incoming
connection on port 80 after the code red worm, 'cause a bunch of morons
were running buggy windows servers.  rest of us get screwed because of
idiots and their insecure windows boxes...
</rant>

I tested it out with AweMUD (although it has no need for it), and I'll
use the script for SCRIPTS (that "backwards language" I previously
mentioned I was writing).  In other words, I've tested it, it works.
^,^

You need to define (with AC_SUBST) BUILD_INCLUDE, BUILD_LIBS_PATH, and
BUILD_LIBS.

in a typical x86 linux installation, BUILD_INCLUDE and BUILD_LIBS_PATH
would be -I/usr/local/lib/ruby/i386-linux and
-L/usr/local/lib/ruby/i386-linux (this is based on Debian packages).
BUILD_LIBS would be -lruby.  Then, if this script is generated and
installed int he path, any app could call it to get necessary info for
embedding ruby or making extensions

The script might need to be expanded for your needs, not sure.  Also,
and autoconf macro would be nice, but I don't know how to write those
(yet).

Hope this is useful!

Sean Etc.

P.S.  if Ruby doesn't use Autoconf (which I thought it did, too lazy to
check at the moment.. ~,^ ) then please feel free to laugh and call me
names.