Rework compiler version detection

Don't evaluate version macros. Only check for presence and add
functions that check version numbers against a predicate. Required to
support cross compilation.
8 files changed