The line to note here is 579:
checking for C compiler default output file name... configure: error: C compiler cannot create executables
This is causing the build to fail.What does the config.log say?
It sounds like there's a problem with the gcc installation. Maybe check what gcc stuff is installed and you might see something thats missing. I would suggest verifying that gcc and g++ are installed on your server.