]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Use clang++ on FreeBSD 10 instead of g++.
authorPeter Powell <petpow@saberuk.com>
Tue, 21 Oct 2014 21:05:51 +0000 (22:05 +0100)
committerPeter Powell <petpow@saberuk.com>
Fri, 24 Oct 2014 22:35:00 +0000 (23:35 +0100)
configure

index 33e9b4c505061cebe29e8d946210ecccc5d2902e..6a8e28fe98480b88aef3c22debb4714d8cf8772f 100755 (executable)
--- a/configure
+++ b/configure
@@ -260,6 +260,11 @@ if ($config{OSNAME} =~ /darwin/i)
        $config{STARTSCRIPT}      = "org.inspircd.plist";               # start script for OSX.
        $config{CC}                 = "xcrun clang++";                                  # C++ compiler for OSX.
 }
+elsif ($config{OSNAME} =~ /freebsd/i)
+{
+       chomp(my $fbsd_version = `uname -r`);
+       $config{CC} = $fbsd_version ge '10.0' ? 'clang++' : 'g++';
+}
 else
 {
        $config{CC}                 = "g++";                                            # C++ compiler
@@ -281,11 +286,8 @@ if ($config{HAS_OPENSSL} =~ /^([-[:digit:].]+)(?:[a-z])?(?:\-[a-z][0-9])?/) {
 }
 
 if (($config{GCCVER} eq "") || ($config{GCCMINOR} eq "")) {
-       if ($config{IS_DARWIN} eq "YES") {
-               print $config{CC} . " was not found! You require clang++ (the LLVM C++ compiler, part of the OSX developer tools) to build InspIRCd!\n";
-       } else {
-               print $config{CC} . " was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n";         
-       }
+       print "`$config{CC}` was not found! A C++ compiler is required to build InspIRCd!\n";
+       print "You can pass a custom compiler to $0 using --with-cc=[name].\n";
        exit;
 }