Skip to content

Commit

Permalink
configure: check first whether C compiler works
Browse files Browse the repository at this point in the history
closes rofl0r#353
  • Loading branch information
rofl0r committed Dec 18, 2020
1 parent 159ab94 commit fa9644d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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;}'

Expand Down

0 comments on commit fa9644d

Please sign in to comment.