summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-25 01:00:17 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-08-25 01:00:17 +0000
commit549ac33242cc201737290866159da702807e7f53 (patch)
tree07931f7d8c57fb00a26e89a9f7af2d78366c518f /configure
parentd807048fc6e50f4cee4848680319837ae5c878f8 (diff)
Forward-port poll socket engine as it seems reasonably stable, and half-hack it into configure. If someone could help me (easily) add it via our wonderful configure macros so it's built, that would be swell.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10264 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure34
1 files changed, 29 insertions, 5 deletions
diff --git a/configure b/configure
index b2b404ff1..964a4f19d 100755
--- a/configure
+++ b/configure
@@ -275,6 +275,7 @@ if (defined $opt_nokqueue)
{
$config{USE_KQUEUE} = "n";
}
+$config{USE_POLL} = "y"; # poll enabled
$config{USE_EPOLL} = "y"; # epoll enabled
if (defined $opt_epoll)
{
@@ -801,22 +802,36 @@ should NOT be used. You should probably specify a newer compiler.\n\n";
dir_check("is the IRCd binary to be placed", "BINARY_DIR");
dir_check("are the IRCd libraries to be placed", "LIBRARY_DIR");
+ my $chose_hiperf = 0;
if ($has_kqueue) {
yesno('USE_KQUEUE',"You are running a BSD operating system, and kqueue\nwas detected. Would you like to enable kqueue support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable kqueue?");
print "\n";
+ if ($config{USE_KQUEUE} eq "y") {
+ $chose_hiperf = 1;
+ }
}
if ($has_epoll) {
yesno('USE_EPOLL',"You are running a Linux 2.6+ operating system, and epoll\nwas detected. Would you like to enable epoll support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable epoll?");
print "\n";
+ if ($config{USE_EPOLL} eq "y") {
+ $chose_hiperf = 1;
+ }
}
if ($has_ports) {
yesno('USE_PORTS',"You are running Solaris 10.\nWould you like to enable I/O completion ports support?\nThis is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable support for I/O completion ports?");
print "\n";
+ if ($config{USE_PORTS} eq "y") {
+ $chose_hiperf = 1;
+ }
}
- my $chose_hiperf = (($config{USE_EPOLL} eq "y") || ($config{USE_KQUEUE} eq "y") || ($config{USE_PORTS} eq "y"));
+
if (!$chose_hiperf) {
- print "No high-performance socket engines are available, or you chose\n";
- print "not to enable one. Defaulting to select() engine.\n\n";
+ yesno('USE_POLL', "Would you like to use poll?\n This is likely to increase performance.\nIf you are unsure, answer yes.\n\nEnable poll?\n");
+ if ($config{USE_POLL} ne "y")
+ {
+ print "No high-performance socket engines are available, or you chose\n";
+ print "not to enable one. Defaulting to select() engine.\n\n";
+ }
}
yesno('IPV6',"Would you like to build InspIRCd with IPv6 support?");
@@ -1221,8 +1236,17 @@ print FILEHANDLE "#define MAXBUF " . ($config{MAXBUF}+2) . "\n";
# user didn't choose either epoll or select for their OS.
# default them to USE_SELECT (ewwy puke puke)
if (!$use_hiperf) {
- print FILEHANDLE "#define USE_SELECT\n";
- $se = "socketengine_select";
+ print "no hi-perf, " . $config{USE_POLL};
+ if ($config{USE_POLL} eq "y")
+ {
+ print FILEHANDLE "#define USE_POLL\n";
+ $se = "socketengine_poll";
+ }
+ else
+ {
+ print FILEHANDLE "#define USE_SELECT\n";
+ $se = "socketengine_select";
+ }
}
print FILEHANDLE "\n#include \"threadengines/threadengine_pthread.h\"\n\n#endif\n";
close(FILEHANDLE);