X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=d65b9850c1b36b6c10d026e0793a7fffd9d2f6ff;hb=144f168729eb58262660afa4fb0a27445290f7f7;hp=f29f44b7ac164da5e93c47e27609fd9d94999ad0;hpb=ea47684780e5c2e50eb14cb6f8345ae4df1f4f25;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index f29f44b7a..d65b9850c 100755 --- a/configure +++ b/configure @@ -12,7 +12,7 @@ # ################################################### -require 5.6.0; +require 5.8.0; use Socket; use Cwd; use Getopt::Long; @@ -467,10 +467,16 @@ if ($has_epoll) { { # Suggestion from nenolod, weed out odd systems which have glibc built # against 2.4 kernels (ick) - + my $kernel_arch = `uname -p`; + chomp($kernel_arch); $libcv = 0.0; $kernelv = 0.0; - open (FH,"/lib/libc.so.6|") or $has_epoll = 0; + if ($kernel_arch =~ /x86_64/) { + open (FH,"/lib64/libc.so.6|") or $has_epoll = 0; + } + else { + open (FH,"/lib/libc.so.6|") or $has_epoll = 0; + } if ($has_epoll) { while (chomp($line = )) @@ -478,10 +484,15 @@ if ($has_epoll) { if ($line =~ /GNU C Library .* version (.*?) /) { $libcv = $1; + $libcv =~ /(\d+\.\d+)/; + $libcv = $1; } elsif ($line =~ /Compiled on a Linux (.*?\..*?)\.* system/) { $kernelv = $1; + # Fix for some retarded libc builds, strip off >> and << etc. + $kernelv =~ /(\d+\.\d+)/; + $kernelv = $1; } } close FH; @@ -538,6 +549,36 @@ if (($config{HAS_OPENSSL}) && (($config{HAS_OPENSSL} >= 0.8) || ($config{HAS_OPE $config{HAS_OPENSSL} = "n"; } +printf "Checking if you are running an ancient, unsupported OS... "; +if ($config{OSNAME} =~ /FreeBSD/i) +{ + $version = `uname -r`; + if ($version =~ /^4\./) + { + $foundit = `ls -l /usr/local/lib/libgnugetopt* | wc -l`; + if ($foundit > 0) + { + # ICKY ICKY ICK, FREEBSD 4.x! GET AN UPGRADE! + $config{CRAQ} = "-L/usr/local/lib -lgnugetopt -DHAVE_DECL_GETOPT=1"; + print "yes\n"; + } + else + { + print "\n\nERROR: You require libgnugetopt (from ports or packages) to build InspIRCd on FreeBSD 4.11.\n"; + } + } + else + { + $config{CRAQ} = " "; + print "no ($version)\n"; + } +} +else +{ + $config{CRAQ} = " "; + print "no ($config{OSNAME})\n"; +} + ################################################################################ # BEGIN INTERACTIVE PART # ################################################################################ @@ -1301,6 +1342,8 @@ sub write_dynamic_makefile { $se = "socketengine_ports"; } + $freebsd4libs = $config{CRAQ}; + open(FH,">src/Makefile") or die("Could not write src/Makefile"); print FH <