This solves an issue where a --prefix dir like rbx-1.1.1-junk already exists and the user gives that dir to configure again. In that case, we assume it to be a Rubinius install dir and install into it.
Verified that we can build without this option on OS X 10.6, Debian Lenny 64 and FreeBSD 8.1. Seems safe to remove this option, if it turns out we need it for some obscure platform it can be added back.
On FreeBSD -O2 adds -fomit-frame-pointer which breaks execinfo.h usage. We explicitly disable omitting frame pointers, which is also the behavior on other platforms such as OS X. Here -O2 does not imply omitting frame pointers, so adding this also doesn't negatively impact performance there.
Apparently the dlopen handle that is retrieved through dlsym() refers to a non working implementation. We expose the pointer therefore directly so it also works on FreeBSD. Also see the following link where the faulty dlopen code is shown: http://unix.derkeiler.com/Mailing-Lists/FreeBSD/current/2008-10/msg00237.html
On MRI, if you have a library named "foo.bar", it strips the .bar component out of the name when determining which Init function to call. So in the case of a library named "foo.bar", MRI calls "Init_foo" This change matches the MRI behavior for determining which Init function to call
When connecting two pipes, we create them with explicit modes. This fixes a spec failure on FreeBSD where the pipes were created with a different mode. This is the same behavior that MRI has.
Due to system timing sensitivities, we were getting races on both startup and shutdown. There does not appear to be any reason not to leave the server running until the process exits. If there are problems that arise, we'll revisit this.