Needless to say, it has not been all that well tested. Actually I have not got the configuration done at my own machine. But I was thinking that whoever might be interested in helping me figure it out would want to know it themselves as well :-)
There was only one change necessary to make it work:
In 'extensions.c' in the 'src' directory
Change this:
#ifdef HAVE_REGEX_H
#include <regex.h>
#endif
to this:
/*#ifdef HAVE_REGEX_H
#include <regex.h>
#endif
*/
(Thanks to Rex Dieter <rdieter@math.unl.edu> who told me how to fix that!)
Anyone who gets this up and running, please let me know and you can help me too :-?