#!/usr/bin/env perl
-###################################################
-# InspIRCd Configuration Script
+
+#
+# InspIRCd -- Internet Relay Chat Daemon
+#
+# Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
+# Copyright (C) 2007, 2009 Dennis Friis <peavey@inspircd.org>
+# Copyright (C) 2003, 2006-2008 Craig Edwards <craigedwards@brainbox.cc>
+# Copyright (C) 2006-2008 Robin Burchell <robin+git@viroteck.net>
+# Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
+# Copyright (C) 2007 John Brooks <john.brooks@dereferenced.net>
+# Copyright (C) 2006 Oliver Lupton <oliverlupton@gmail.com>
+# Copyright (C) 2003-2006 Craig McLure <craig@chatspike.net>
#
-# Copyright 2002-2010 The InspIRCd Development Team
-# http://wiki.inspircd.org/Credits
+# This file is part of InspIRCd. InspIRCd is free software: you can
+# redistribute it and/or modify it under the terms of the GNU General Public
+# License as published by the Free Software Foundation, version 2.
#
-# Licensed under GPL, please see the COPYING file
-# for more information
+# This program is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
+# details.
#
-# $Id$
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
-###################################################
+
BEGIN {
require 5.8.0;
{
$config{IS_DARWIN} = "YES";
$config{STARTSCRIPT} = "org.inspircd.plist"; # start script for OSX.
+ $config{CC} = "xcrun clang++"; # C++ compiler for OSX.
+}
+else
+{
+ $config{CC} = "g++"; # C++ compiler
}
-$config{CC} = "g++"; # C++ compiler
if (defined $opt_cc)
{
$config{CC} = $opt_cc;
}
if (($config{GCCVER} eq "") || ($config{GCCMINOR} eq "")) {
- print $config{CC} . " was not found! You require g++ (the GNU C++ compiler, part of GCC) to build InspIRCd!\n";
+ 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";
+ }
exit;
}