]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - configure
Fixed to never append double sums
[user/henk/code/inspircd.git] / configure
index 597e581b67ee1b7b6b7b92a44d931293cf5dc8c2..01683da91c927a1eef0e18410e69c01dbab0f3d0 100755 (executable)
--- a/configure
+++ b/configure
@@ -22,21 +22,21 @@ $config{BINARY_DIR}         = resolve_directory($config{ME}."/bin");                # Binary D
 $config{LIBRARY_DIR}        = resolve_directory($config{ME}."/lib");           # Library Directory
 $config{OPTIMITEMP}         = "0";                                             # Default Optimisation Value
 $config{OPTIMISATI}         = "-g";                                            # Optimisation Flag
-$config{NICK_LENGT}         = "32";                                            # Default Nick Length
+$config{NICK_LENGT}         = "31";                                            # Default Nick Length
 $config{CHAN_LENGT}         = "64";                                            # Default Channel Name Length
 $config{MAX_CHANNE}         = "20";                                            # Default Max. Channels per user..
 $config{MAXI_MODES}         = "20";                                            # Default Max. Number of Modes set at once.
 $config{HAS_STRLCPY}        = "false";                                         # strlcpy Check.
 $config{USE_KQUEUE}         = "y";                                             # kqueue enabled
 $config{USE_EPOLL}          = "y";                                             # epoll enabled
-$config{STATIC_LINK}       = "no";
+$config{STATIC_LINK}       = "no";                                             # are doing static modules?
 chomp($config{MAX_CLIENT_T} = `sh -c \"ulimit -n\"`);                          # FD Limit
 chomp($config{GCCVER}       = `gcc -dumpversion | cut -c 1`);                  # Major GCC Version
 chomp($config{GCC34}        = `gcc -dumpversion | cut -c 3`);                  # Minor GCC Version
 chomp($config{OSNAME}       = `/bin/uname`);                                   # Operating System Name
 $config{CC}                = "g++";                                            # C++ compiler
-$config{MAKEORDER}         = "ircd mods config bininst";
-$config{STATICLIBS}         = "";
+$config{MAKEORDER}         = "ircd mods config bininst";                       # build order
+$config{STATICLIBS}         = "";                                              # library archive path
 
 if ((!$config{OSNAME}) || ($config{OSNAME} eq "")) {
   chomp($config{OSNAME} = `/usr/bin/uname`);
@@ -241,6 +241,9 @@ while (!$continue) {
   }
 }
 
+# Because of the terminating null char we must increment this by one
+$config{NICK_LENGT}++;
+
 my $continue = 0;
 while (!$continue) {
   print "What is the Maximum number of mode changes in one line?\n";
@@ -308,7 +311,13 @@ if (($config{OSNAME} eq "OpenBSD") && ($config{CC} ne "eg++")) {
        print "\033[1;32mWARNING!\033[0m You are running OpenBSD but you are using the base gcc package\nrather than eg++. This compile will most likely fail, but i'm letting you\ngo ahead with it anyway, just in case i'm wrong :-)\n";
 }
 if ($config{OSNAME} =~ /CYGWIN/) {
-       print "\033[1;32mWARNING!\033[0m CYGWIN does not properly support shared modules,\nso modules are unavailable on this platform.\nThe modules will build as .o files but will not be available for use.\nYou will be able to run the core ircd file (inspircd.exe) as normal.\n";
+       print <<FOO;
+\033[1;32mWARNING!\033[0m CYGWIN does not properly support shared modules,
+so modules will be compiled statically into the core of the ircd. The modules
+will act like they are being loaded from disk and being unloaded from RAM,
+however they are in fact being enabled and disabled similar to features in
+other ircds.
+FOO
 }
 
 ################################################################################
@@ -485,6 +494,9 @@ EOF
   if ($config{OSNAME} =~ /SunOS/) {
     print FILEHANDLE "#define IS_SOLARIS\n";
   }
+  if ($config{OSNAME} =~ /CYGWIN/) {
+    print FILEHANDLE "#define IS_CYGWIN\n";
+  }
   if ($config{STATIC_LINK} eq "yes") {
     print FILEHANDLE "#define STATIC_LINK\n";
   }
@@ -655,6 +667,7 @@ EOENT
 m_$i.so: m_$i.cpp ../../include/modules.h ../../include/users.h ../../include/channels.h ../../include/servers.h ../../include/base.h
        \$(CC) -pipe -I../../include \$(FLAGS) $flags -export-dynamic -c m_$i.cpp
        \$(CC) \$(FLAGS) -shared $flags -o m_$i.so m_$i.o
+       @-rm -f \$(MODPATH)/m_$i.so
        cp m_$i.so \$(MODPATH)/
        chmod 0700 \$(MODPATH)/m_$i.so