> 2) We have edited the SWIG source code to take care of this problem.
> If you want I can send the changed code to you.

Sounds like we just need to specify -I on the command-line to gcc to tell
it where the files are.  I have this hard-coded in my Makefiles at work,
but this is not a good solution.

Gtk and SDL and other libraries have a -config script that can print out
the correct command-line parameters to use.  For example, in a makefile
for a program that uses Gtk, I usually use:

CFLAGS+=`gtk-config --cflags`
LDFLAGS+=`gtk-config --ldflags`

Would it be possible to modify ruby in such a way that I could do:

CFLAGS+=`ruby --cflags`
LDFLAGS+=`ruby --ldflags`

This would greatly increase portability of modules that don't use Ruby's
mkmf facility (which is nice, but doesn't integrate well with the makefile
system we already have in place).

Note that I can use:

RUBYARCHDIR=\
  $(shell ruby -e "require 'rbconfig'; print \
    Config::CONFIG['libdir'], \
    \"/ruby/\", \
    Config::CONFIG['MAJOR'], \
    \".\", \
    Config::CONFIG['MINOR'], \
    \"/\", \
    Config::CONFIG['arch']")
RUBYINCDIR=\
  $(shell ruby -e "require 'rbconfig'; puts Config::CONFIG['includedir']")
RUBYLIBS=\
  $(shell ruby -e "require 'rbconfig'; puts Config::CONFIG['LIBS']")
RUBYLIBDIR=\
  $(shell ruby -e "require 'rbconfig'; puts Config::CONFIG['libdir']")
CFLAGS+=-I$(RUBYARCHDIR) -I$(RUBYINCDIR)
LDFLAGS+=-L$(RUBYARCHDIR) -L$(RUBYLIBDIR) $(RUBYLIBS) -lruby

but this is not nearly as clean.  BTW, does anyone know why I can't just
get Config::CONFIG['archdir'] instead of that messy first line?  It's
available from irb, but from inside a Makefile, I just get nil.

Paul