diff options
Diffstat (limited to '')
-rw-r--r-- | lib/tsocket/wscript | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/tsocket/wscript b/lib/tsocket/wscript new file mode 100644 index 0000000..fa284a7 --- /dev/null +++ b/lib/tsocket/wscript @@ -0,0 +1,36 @@ +#!/usr/bin/env python + +def configure(conf): + conf.CHECK_CODE(''' + #include <netinet/tcp.h> + int main(void) { return TCP_USER_TIMEOUT; } + ''', + 'HAVE_TCP_USER_TIMEOUT', + addmain=False, + msg='Checking for TCP_USER_TIMEOUT') + +def build(bld): + bld.SAMBA_SUBSYSTEM( + 'LIBTSOCKET', + source='tsocket.c tsocket_helpers.c tsocket_bsd.c', + public_deps='talloc tevent iov_buf socket-blocking', + public_headers='tsocket.h tsocket_internal.h' + ) + + bld.SAMBA_BINARY( + 'test_tsocket_bsd_addr', + source='tests/test_bsd_addr.c', + deps='cmocka replace LIBTSOCKET', + local_include=False, + for_selftest=True + ) + + bld.SAMBA_BINARY( + 'test_tstream', + source='tests/test_tstream.c tests/socketpair_tcp.c', + deps='cmocka replace LIBTSOCKET', + local_include=False, + enabled=bld.CONFIG_SET('HAVE_TCP_USER_TIMEOUT'), + for_selftest=True + ) + |