diff options
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 33 |
1 files changed, 25 insertions, 8 deletions
@@ -27,6 +27,7 @@ $config{CHAN_LENGT} = "64"; # Default Chan $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} = "false"; # kqueue enabled 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 @@ -122,6 +123,12 @@ dir_check("are the modules to be compiled to", "MODULE_DIR"); dir_check("is the IRCd binary to be placed", "BINARY_DIR"); dir_check("are the IRCd libraries to be placed", "LIBRARY_DIR"); +if ($config{OSNAME} =~ /BSD$/) { + if (yesno(0,"You are running a BSD operating system.\nWould you like to enable kqueue support?\nPlease be aware that kqueue support is\nEXPERIMENTAL and not gauranteed to work properly.\nIf you are unsure, answer no.\n\nEnable kqueue?")) { + $config{USE_KQUEUE} = "true"; + } +} + # File Descriptor Settings.. my $continue = 0; while (!$continue) { @@ -384,6 +391,9 @@ EOF if ($config{HAS_STRLCPY} eq "true") { print FILEHANDLE "#define HAS_STRLCPY\n"; } + if ($config{USE_KQUEUE} eq "true") { + print FILEHANDLE "#define USE_KQUEUE\n"; + } close(FILEHANDLE); # Create a Modules List.. @@ -490,13 +500,20 @@ sub show_splash { sub resolve_directory { use File::Spec; return File::Spec->rel2abs($_[0]); +} - #my $dir = $_[0]; - #my $old_dir = ""; - #my $real_dir = ""; - #getpwd($old_dir); - #chdir($dir); - #getpwd($real_dir); - #chdir($old_dir); - #return $real_dir; +sub yesno { + my ($default,$prompt) = @_; + if (!$default) { + print "$prompt [\033[1;32mn\033[0m] "; + chomp($tmp = <STDIN>); + return ($tmp =~ /^y/i); + + } + else { + print "$prompt [\033[1;32my\033[0m] "; + chomp($tmp = <STDIN>); + return (($tmp eq "") || ($tmp =~ /^y/i)); + } + return 0; } |