summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-15 16:10:56 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-05-15 16:10:56 +0000
commit2304a0ffaf207362b3429f4adca1756d37510fd7 (patch)
tree23649cd420cd74f434212764949b5814f4853408
parent7730bd035b2f0edc33109316b8d52610894db835 (diff)
Added detection for kqueue, so if your BSD system doesn't have it, the configure doesnt ask you :)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1391 e03df62e-2008-0410-955e-edbf42e46eb7
-rwxr-xr-xconfigure21
1 files changed, 19 insertions, 2 deletions
diff --git a/configure b/configure
index 86a909b8e..36bee81ad 100755
--- a/configure
+++ b/configure
@@ -93,6 +93,23 @@ if (!$fail)
close(STRLCPY);
}
+$has_kqueue = 0;
+$fail = 0;
+open(KQUEUE, "</usr/include/sys/event.h") or $fail = 1;
+if (!$fail)
+{
+ while (chomp($line = <KQUEUE>))
+ {
+ # try and find the delcaration of:
+ # int kqueue(void);
+ if (($line =~ /int(\0x9|\s)+kqueue(\0x9|\s)+\(/) || ($line =~ /int(\0x9|\s)+kqueue\(/))
+ {
+ $has_kqueue = 1;
+ }
+ }
+ close(KQUEUE);
+}
+
################################################################################
# BEGIN INTERACTIVE PART #
################################################################################
@@ -125,8 +142,8 @@ 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$/) {
- yesno(USE_KQUEUE,"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?");
+if ($has_kqueue) {
+ yesno(USE_KQUEUE,"You are running a BSD operating system, and kqueue\nwas detected. Would 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?");
}
# File Descriptor Settings..