summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2015-10-11 16:23:42 +0200
committerAttila Molnar <attilamolnar@hush.com>2015-10-11 16:23:42 +0200
commit009cc921802a917f8680a3c6e5294a303438c2fd (patch)
treeb92008566fa98511fefac3da5564e4ef5f4a1971
parent5544649cd2058ba6d30925e61d20ae4a0245c0fa (diff)
parentcd67a0a6f9380d4a54bc92370f2925f2d2a684dc (diff)
Merge pull request #1098 from SaberUK/master+appleclang
Fix detection of the Apple variant of Clang.
-rw-r--r--make/configure.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/make/configure.pm b/make/configure.pm
index 9a53221a8..e314e6d15 100644
--- a/make/configure.pm
+++ b/make/configure.pm
@@ -238,9 +238,11 @@ sub write_configure_cache(%) {
sub get_compiler_info($) {
my $binary = shift;
my $version = `$binary -v 2>&1`;
- if ($version =~ /clang\sversion\s(\d+\.\d+)/i || $version =~ /^apple.+\(based\son\sllvm\s(\d+\.\d+)/i) {
+ if ($version =~ /Apple\sLLVM\sversion\s(\d+\.\d+)/i) {
# Apple version their LLVM releases slightly differently to the mainline LLVM.
# See https://trac.macports.org/wiki/XcodeVersionInfo for more information.
+ return (NAME => 'AppleClang', VERSION => $1);
+ } elsif ($version =~ /clang\sversion\s(\d+\.\d+)/i) {
return (NAME => 'Clang', VERSION => $1);
} elsif ($version =~ /gcc\sversion\s(\d+\.\d+)/i) {
return (NAME => 'GCC', VERSION => $1);