configure should check for warning flags supported to disable them (#338205).

Configure would check whether gcc supported -Wno... flags. But gcc always
does. It is happy to just not warn about anything. So flip all configure
checks to test for the warning and only when gcc accepts the warning flag
use -Wno-...

Introduces two helper functions to make it easier to add new flag checks.

git-svn-id: svn:// a5019735-40e9-0310-863c-91ae7b9d1cf9
2 files changed