Prerequisites: XCode and the XCode Command Line Tools (downloadable from developer.apple.com or from within the Downloads preference panel within XCode)
Once the apache httpd source has been downloaded, run the following command to remove the "quarantined" extended attribute from executables in your source directory, (needed in order to execute the
xattr -rd com.apple.quarantine /path/to/source
The following options to pass to configure will enable and load ALL apache modules, (fun for playing with Apache but not necessarily good for production use and don't be surprised if some modules need to be unloaded):
./configure --prefix=/usr/local/apache-httpd-2.4.3 --enable-load-all-modules --enable-mods-shared=reallyall
If you get a
configure error like: error: C compiler cannot create executables, run the following to create a symlink to help
sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain
For me, configure also complained that PCRE was missing. Running
brew install pcre(from the Homebrew package manager for OS X) took care of that.
Attribution: This post on StackOverflow was invaluable in clearing the configure error "C compiler cannot create executables"