configure: check first whether C compiler works

closes #353
This commit is contained in:
rofl0r 2020-12-18 12:33:49 +00:00
parent 159ab94635
commit fa9644dc27

2
configure vendored
View File

@ -154,6 +154,8 @@ ishaiku() {
$haiku_detected
}
check_compile 'whether C compiler works' '' 'int main() {return 0;}' || fail 'error: install a C compiler and library'
check_compile 'whether we have GNU-style getservbyname_r()' "-DHAVE_GNU_GETSERVBYNAME_R" \
'#define _GNU_SOURCE\n#include <netdb.h>\nint main() {\nstruct servent *se = 0;struct servent se_buf;char buf[1024];\ngetservbyname_r("foo", (void*) 0, &se_buf, buf, sizeof(buf), &se);\nreturn 0;}'