I refactored the way header and functions tests are done in configure. Now there is a method to compile code with all flags set, logging the code and a message, if it was a success.
Another part is the detection of the libc. The problem was, that the libc version was hardcoded to libc.so.6. That way, ffi-rzmq could not be used on freebsd or solaris, because they have version 7 and 1. To fix this this ldd is called on the ruby binary configure is run with. The output is parsed to get the used version.
refactor of configure
To reduce the duplication of compile code a function was introduced for
the compile job and the log entries.
detect the correct libc.so on unix
On some unix derivates was the problem, that libc.so.6 was not found.
They have libc.so.7 or libc.so.1 (freebsd, solaris) and therefore using
the ffi bindings was not possible.
With this change the libc is detected and set accordingly.
switched from array to StringIO for source code