From fa9644dc27ed040fb4abbd49b264caf51eb52cbb Mon Sep 17 00:00:00 2001 From: rofl0r Date: Fri, 18 Dec 2020 12:33:49 +0000 Subject: [PATCH] configure: check first whether C compiler works closes #353 --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 25f69f5..7157484 100755 --- a/configure +++ b/configure @@ -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 \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;}'