Quite contrary to the title, compiling Apache from source can be pretty frustrating at times, with trivial errors, compile options that are hard to remember, etc..
Wrote a small piece of code to help you with this compilation. The script is tested on RHEL, definitely works on any Linux distro, and most likely just works out of the box on a Mac.
The only thing that needs to be done manually, is to place the HTTPD, PCRE, APR, APR-UTIL archives in the same directory as the script, and execute! This was tested for Apache 2.4.9, which does not come with bundled APR, APR-UTIL libs. If you need compile an older distribution on Apache which has APR, APR-UTIL bundled, just comment out the “Extract APR” and “Extract APR-UTIL” code blocks.
Have a look at the script at the BitBucket repository.