From: brain Date: Thu, 19 Jul 2007 21:44:46 +0000 (+0000) Subject: Check libc version for epoll then check that glibc is built against this kernel versi... X-Git-Tag: v2.0.23~4950 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=8d46dbfb1e88c0caa6480c0e1e1504f179c6e807;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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;