]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix detection of the Apple variant of Clang.
authorPeter Powell <petpow@saberuk.com>
Wed, 23 Sep 2015 20:45:02 +0000 (21:45 +0100)
committerPeter Powell <petpow@saberuk.com>
Wed, 23 Sep 2015 20:52:27 +0000 (21:52 +0100)
This splitting of compiler names mirrors the change implemented by
other build systems like cmake.

make/configure.pm

index 9a53221a8667abe2f27cb4e3974f4157dcba1234..e314e6d159305cfe0a6082072f576a04616874f8 100644 (file)
@@ -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);