configure: update compiler probing
authorSitsofe Wheeler <sitsofe@yahoo.com>
Sat, 23 Sep 2017 21:48:12 +0000 (22:48 +0100)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Sun, 24 Sep 2017 09:24:41 +0000 (10:24 +0100)
- Allow clang to be always guessable as a fallback compiler after gcc.
  This increases the likelihood we have a compiler when one wasn't
  explicitly set before we search through #define definitions to guess
  what platform we're targeting. The fallback can be overridden later
  (e.g. to prefer clang above other fallbacks on specific platforms).
- Add comments to explain the preferred compiler search (inspired by
  comments in QEMU's ./configure).
- Change from only checking $CC to also checking $cross_prefix before
  overriding.
- Switch from setting CC to setting cc when overriding. This fixes the
  case where cc is "gcc" but CC is "i686-w64-mingw32-gcc" on Cygwin64
  when building a 32 bit fio.
- Because it is now possible for no compiler to be set, bail out with an
  explicit error message if we find this is the case.
- Add macOS/Darwin to the platforms that prefer clang as the fallback
  compiler.
- Minor refactoring.

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>

No differences found