Hi Brian,

Thanks a lot for your help which fits nicely on what I found in a sleepless 
night:

* have to make a static compile of Ruby, and of all the extentions in the ext/ 
directory (after moving the extra stuff like mysql inside the ext/ )

* say something like:
gcc -g -O2 -static -L/usr/lib/mysql -L. -L/usr/X11R6/lib \
  main.o ext/extinit.o ext/curses/curses.a ext/dbm/dbm.a \ 
  ext/digest/digest.a ext/digest/md5/md5.a ext/digest/rmd160/rmd160.a \
  ext/digest/sha1/sha1.a ext/digest/sha2/sha2.a ext/dl/dl.a ext/etc/etc.a \
  ext/fcntl/fcntl.a ext/gdbm/gdbm.a ext/iconv/iconv.a ext/nkf/nkf.a \
  ext/pty/pty.a ext/racc/cparse/cparse.a ext/readline/readline.a \
  ext/sdbm/sdbm.a ext/socket/socket.a ext/stringio/stringio.a \
  ext/strscan/strscan.a ext/syslog/syslog.a \
  ext/tcltklib/tcltklib.a ext/tk/tkutil.a ext/mysql/mysql.a \
  -lruby -ldl -lcrypt -lm  -lncurses -lgpm -ldb  -lcrypto -ldl  -lgdbm  \
  -lutil  -lreadline -lncurses  -ltk8.4 -ltcl8.4 -lX11 -lm \
  -ldl -lz -lmysqlclient -lz -o appname        

where main.o is the program you kindly provided me. Once stripped, a complete 
one file ruby interpreter is about 3.8 Mb. Of course, I should get rid of 
modules I don't use like tcltk, X11, curses... A good idea would be to move 
all the extention modules inside the libruby.a.

* the next step is to make a little ruby program to make one big ruby source 
by assembling all the required .rb files from the library, and have the 
resulting big file formatted so that C can eat it as a string constant.

There a some problems left, for example I don't see how to make __DATA__ 
work... Fortunately, nobody seems to use it in the libraries.

------------------------- Why bother ?

I'm doing a restaurant / pos program, to be installed on 40++ computers / cash 
registers next year, using Gtk2 on Linux framebuffer (no X!). I'm waiting for 
ruby-gnome2... The big statically linked binary is the easiest way I see to 
install this application on low level machines: just take a basic, minimal 
linux distro (like the 'A' disks of slackware), then make that static binary 
the "login shell" of the user, and spend the rest of the afternoon on the 
beach... 

Thanks again for your help,

Francois