If you encounter errors like this configure: error: C compiler cannot create executables, try this command on Terminal:
sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.10.xctoolchainYou should change XcodeDefault.xctoolchain and OSX10.10.xctoolchain tu suit your case.