]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - configure
m_namesx, m_uhnames Don't convert the command name to irc::string in OnPreCommand()
[user/henk/code/inspircd.git] / configure
index 0b7700b2ae2b6ff4736f7dc87b757695a3618237..6021a805d6b77922a1b68a306152b1a824dce4a4 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,16 +1,30 @@
 #!/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;
@@ -228,7 +242,7 @@ if ($config{OSNAME} =~ /darwin/i)
 {
        $config{IS_DARWIN} = "YES";
        $config{STARTSCRIPT}      = "org.inspircd.plist";               # start script for OSX.
-       $config{CC}                 = "clang++";                                        # C++ compiler for OSX.
+       $config{CC}                 = "xcrun clang++";                                  # C++ compiler for OSX.
 }
 else
 {
@@ -252,7 +266,7 @@ 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 LLVN C++ compiler, part of the OSX developer tools) to build InspIRCd!\n";
+               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";         
        }
@@ -611,8 +625,8 @@ should NOT be used. You should probably specify a newer compiler.\n\n";
        }
        else
        {
-               print "\nCould not detect OpenSSL or GnuTLS. Make sure pkg-config is installed if\n";
-               print "you intend to use OpenSSL, or that GnuTLS is in your path if you intend\nto use GnuTLS.\n\n";
+               print "\nCould not detect OpenSSL or GnuTLS. Make sure pkg-config is installed and\n";
+               print "is in your path.\n\n";
        }
 
        yesno('MODUPDATE',"Would you like to check for updates to third-party modules?");
@@ -834,6 +848,11 @@ sub writefiles {
        chomp(my $incos = `uname -n -s -r`);
        chomp(my $version = `sh src/version.sh`);
        chomp(my $revision2 = getrevision());
+       my $branch = "InspIRCd-0.0";
+       if ($version =~ /^(InspIRCd-[0-9]+\.[0-9]+)\.[0-9]+/)
+       {
+               $branch = $1;
+       }
        if ($writeheader == 1)
        {
                print "Writing \e[1;32minspircd_config.h\e[0m\n";
@@ -847,6 +866,7 @@ sub writefiles {
 #define CoreExport /**/
 #define DllExport /**/
 
+#define CONFIG_PATH "$config{CONFIG_DIR}"
 #define MOD_PATH "$config{MODULE_DIR}"
 #define SOMAXCONN_S "$config{_SOMAXCONN}"
 #define ENTRYPOINT int main(int argc, char** argv)
@@ -918,6 +938,7 @@ print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n";
 
                open(FILEHANDLE, ">include/inspircd_version.h.tmp");
                print FILEHANDLE <<EOF;
+#define BRANCH "$branch"
 #define VERSION "$version"
 #define REVISION "$revision2"
 #define SYSTEM "$incos"