From 8d46dbfb1e88c0caa6480c0e1e1504f179c6e807 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 19 Jul 2007 21:44:46 +0000 Subject: 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 --- configure | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'configure') 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 = )) + { + 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; -- cgit v1.2.3