From cd67a0a6f9380d4a54bc92370f2925f2d2a684dc Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Wed, 23 Sep 2015 21:45:02 +0100 Subject: Fix detection of the Apple variant of Clang. This splitting of compiler names mirrors the change implemented by other build systems like cmake. --- make/configure.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'make') 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); -- cgit v1.2.3