configure: Fix CC version check on Apple compilers

Authored by bgamari on Oct 4 2017, 8:05 AM.



It seems that some Apple LLVM wrappers emit multiple messages containing the
string "version", which we previously used to find the version number. For

Configured with: --prefix=/Applications/ ...
Apple LLVM version 9.0.0 (clang-900.0.37)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/
Found CUDA installation: /usr/local/cuda, version 8.0

We now take care to only look at the first occurrence of this string.

New sed command due to @merijn.

Test Plan

Validate on all the compilers

Diff Detail

rGHC Glasgow Haskell Compiler
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
bgamari created this revision.Oct 4 2017, 8:05 AM
bgamari updated this revision to Diff 14268.Oct 4 2017, 8:10 AM

Escape square brackets

This revision was automatically updated to reflect the committed changes.