$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`);
# We've Loaded the cache file and all our variables..
print "Updating Files..\n";
getosflags();
+ $has_epoll = $config{HAS_EPOLL};
+ $has_kqueue = $config{HAS_KQUEUE};
writefiles();
print "Complete.\n";
exit;
$config{HAS_STRLCPY} = "true";
}
+$config{HAS_EPOLL} = $has_epoll;
+$config{HAS_KQUEUE} = $has_kqueue;
+
################################################################################
# BEGIN INTERACTIVE PART #
################################################################################
print "What is the Maximum length of nicknames?\n";
print "[\033[1;32m$config{NICK_LENGT}\033[0m] -> ";
chomp($var = <STDIN>);
- if ($var eq "") { $var = $config{NICK_LENGT}; }
+ if ($var eq "") { $var = $config{NICK_LENGT}; } else { $var++; }
if ($var =~ /^\d+$/) {
# We don't care what the number is, set it and be on our way.
$config{NICK_LENGT} = $var;
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
}
################################################################################
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";
}
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