X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=0c5420150d9daedeac15bda583a88f8ca0ff8156;hb=773afbfe3bb6ae0df1776016a080185e6094c8fb;hp=3074c8e28061acd063e22ed624c20c08b7ef174a;hpb=cf7c73ec7f8a398f87aac91b5534c0ec8f03e915;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index 3074c8e28..0c5420150 100755 --- a/configure +++ b/configure @@ -484,14 +484,14 @@ if ($has_epoll) { if ($line =~ /GNU C Library .* version (.*?) /) { $libcv = $1; - $libcv =~ /([0-9\.\-])+/; + $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 =~ /([0-9\.\-])+/; + $kernelv =~ /(\d+\.\d+)/; $kernelv = $1; } } @@ -549,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 # ################################################################################ @@ -930,6 +960,7 @@ sub getosflags { if ($config{OSNAME} =~ /OpenBSD/i) { $config{MAKEPROG} = "gmake"; + $config{LDLIBS} = $config{LDLIBS} . " -lunwind"; chomp($foo = `eg++ -dumpversion | cut -c 1`); # theyre running the package version of gcc (eg++)... detect it and set up its version numbers. # if theyre not running this, configure lets the build continue but they probably wont manage to @@ -1199,6 +1230,21 @@ sub write_dynamic_modules_makefile { all: \$(MODULES) EOF + +if ($config{OSNAME} =~ /darwin/) { + print FILEHANDLE <src/Makefile") or die("Could not write src/Makefile"); print FH <