X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=bdbcf6afe8c41df8648a7456cadd0c78580df866;hb=3fbba606c3fbb76a5bc045d4d7717528366ae84e;hp=103e072a50fee2ffd7c1d9d4c916c160a2b8bcf8;hpb=92dceac40c56a68e4fcf7f04d8d7d4e37befdc24;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index 103e072a5..bdbcf6afe 100755 --- a/configure +++ b/configure @@ -257,7 +257,8 @@ if ($config{OSNAME} =~ /darwin/i) elsif ($config{OSNAME} =~ /freebsd/i) { chomp(my $fbsd_version = `uname -r`); - $config{CC} = $fbsd_version ge '10.0' ? 'clang++' : 'g++'; + $fbsd_version =~ s/^(\d+\.\d+).*/$1/g; + $config{CC} = $fbsd_version >= 10.0 ? 'clang++' : 'g++'; } else { @@ -381,22 +382,8 @@ print "yes\n" if $config{HAS_STRLCPY} eq "true"; print "no\n" if $config{HAS_STRLCPY} eq "false"; printf "Checking if kqueue exists... "; -$has_kqueue = 0; -$fail = 0; -open(KQUEUE, ")) { - chomp($line); - # try and find the delcaration of: - # int kqueue(void); - if ($line =~ /int(\0x9|\s)+kqueue/) { - $has_kqueue = 1; - } - } - close(KQUEUE); -} -print "yes\n" if $has_kqueue == 1; -print "no\n" if $has_kqueue == 0; +$has_kqueue = test_compile('kqueue'); +print $has_kqueue ? "yes\n" : "no\n"; printf "Checking for epoll support... "; $has_epoll = test_compile('epoll'); @@ -1008,7 +995,7 @@ EOF for my $var (qw( CC SYSTEM BASE_DIR CONFIG_DIR MODULE_DIR BINARY_DIR BUILD_DIR DATA_DIR UID - STARTSCRIPT DESTINATION SOCKETENGINE + STARTSCRIPT DESTINATION SOCKETENGINE LOG_DIR )) { s/\@$var\@/$config{$var}/g; }