X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=configure;h=fd00ff89c04ace244a996c09f27d0463a2f0fe0f;hb=4c751dbbe8945e5efc230a59b0ed51c2ba10cf92;hp=cfda1a241df2dbf40dc285f90baa01cdd2742776;hpb=68211809ee3111bdc9609fbd46dc3c875fbb5ea6;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/configure b/configure index cfda1a241..fd00ff89c 100755 --- a/configure +++ b/configure @@ -353,51 +353,16 @@ $exec = $config{CC} . " -dumpversion | cut -c 3"; chomp($config{GCCMINOR} = `$exec`); printf "Checking if stdint.h exists... "; -$config{HAS_STDINT} = "true"; -our $fail = 0; -open(STDINT, ")) { - chomp($line); - # try and find the delcaration of: - # size_t strlcpy(...) - if ($line =~ /size_t(\0x9|\s)+strlcpy/) { - $config{HAS_STRLCPY} = "true"; - } - } - close(STRLCPY); -} -print "yes\n" if $config{HAS_STRLCPY} eq "true"; -print "no\n" if $config{HAS_STRLCPY} eq "false"; +$config{HAS_STRLCPY} = test_compile('strlcpy'); +print $config{HAS_STRLCPY} ? "yes\n" : "no\n"; 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'); @@ -1009,7 +974,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; }