Compiling mod_caucho on RHEL 5.3

There is a known issue with APR that prevents the compilation of mod_caucho on RHEL 5.3 out of the box. Additionally, for some reason my installation of APR uses the name "apr-1-config" instead of "apr-config" so that to compile mod_caucho I had to do the following:

  1. Run configure --with-apxs
  2. Execute 'apr-config --cppflags --cflags'
  3. On my server this resulted in '-DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread'
  4. Append the output of the above command to the "CFLAGS" line in config.status
  5. Run make; make install;
FYI, I also had to overwrite the "plugins" variable in the Resin configure script to manually set apache2 because the script was detecting and using apache1