How to compile mod_wsgi, mod_fastcgi, etc on Mountain Lion (Mavericks) by fixing `apxs:Error: Command failed with rc=65536`?
I solved this problem while writting question:

For some reason /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/ folder (containing Xcode Command Line Tools) is here: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain

To fix the problem:

$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain


Greg Bair suggestion for Mavericks:

$ sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/ /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.9.xctoolchain


This creates symlink to the right folder.