]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - configure
Add configuration for building with Travis-CI.
[user/henk/code/inspircd.git] / configure
index bdbcf6afe8c41df8648a7456cadd0c78580df866..fd00ff89c04ace244a996c09f27d0463a2f0fe0f 100755 (executable)
--- a/configure
+++ b/configure
@@ -353,33 +353,12 @@ $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, "</usr/include/stdint.h") or $config{HAS_STDINT} = "false";
-if ($config{HAS_STDINT} eq "true") {
-       close(STDINT);
-}
-print "yes\n" if $config{HAS_STDINT} eq "true";
-print "no\n" if $config{HAS_STDINT} eq "false";
+$config{HAS_STDINT} = test_compile('stdint');
+print $config{HAS_STDINT} ? "yes\n" : "no\n";
 
 printf "Checking if strlcpy exists... ";
-# Perform the strlcpy() test..
-$config{HAS_STRLCPY} = "false";
-$fail = 0;
-open(STRLCPY, "</usr/include/string.h") or $fail = 1;
-if (!$fail) {
-       while (defined(my $line = <STRLCPY>)) {
-               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 = test_compile('kqueue');