summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-19 21:44:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2007-07-19 21:44:46 +0000
commit8d46dbfb1e88c0caa6480c0e1e1504f179c6e807 (patch)
tree30a3bb0ae50fc7efc1ebd5cc9c2ce903a08e3c73 /configure
parentb2f7888b7ac0e72041ceea7dd9e7e6d4c46dcb5c (diff)
Check libc version for epoll then check that glibc is built against this kernel version, if not dont allow epoll
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7475 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure34
1 files changed, 34 insertions, 0 deletions
diff --git a/configure b/configure
index 1104d4209..a257efa48 100755
--- a/configure
+++ b/configure
@@ -474,6 +474,40 @@ if ($has_epoll) {
if (($kernel =~ /^2\.0\./) || ($kernel =~ /^2\.2\./) || ($kernel =~ /^2\.4\./)) {
$has_epoll = 0;
}
+ else
+ {
+ # Suggestion from nenolod, weed out odd systems which have glibc built
+ # against 2.4 kernels (ick)
+
+ $libcv = 0.0;
+ $kernelv = 0.0;
+ open (FH,"/lib/libc.so.6|") or $has_epoll = 0;
+ if ($has_epoll)
+ {
+ while (chomp($line = <FH>))
+ {
+ if ($line =~ /GNU C Library .* version (.*?) /)
+ {
+ $libcv = $1;
+ }
+ elsif ($line =~ /Compiled on a Linux (.*?\..*?)\.* system/)
+ {
+ $kernelv = $1;
+ }
+ }
+ close FH;
+ if ($libcv < 2.3)
+ {
+ $has_epoll = 0;
+ printf "libc too old: $libcv... ";
+ }
+ if ($kernelv < 2.6)
+ {
+ $has_epoll = 0;
+ printf "libc built against older kernel $kernelv... ";
+ }
+ }
+ }
}
print "yes\n" if $has_epoll == 1;
print "no\n" if $has_epoll == 0;