4 AC_CACHE_CHECK([for sin_len in sock],samba_cv_HAVE_SOCK_SIN_LEN,[
5 AC_TRY_COMPILE([#include <sys/types.h>
6 #include <sys/socket.h>
7 #include <netinet/in.h>],
8 [struct sockaddr_in sock; sock.sin_len = sizeof(sock);],
9 samba_cv_HAVE_SOCK_SIN_LEN=yes,samba_cv_HAVE_SOCK_SIN_LEN=no)])
10 if test x"$samba_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then
11 AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property])
14 ############################################
15 # check for unix domain sockets
16 AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
18 #include <sys/types.h>
21 #include <sys/socket.h>
24 struct sockaddr_un sunaddr;
25 sunaddr.sun_family = AF_UNIX;
27 samba_cv_unixsocket=yes,samba_cv_unixsocket=no)])
28 SMB_ENABLE(socket_unix, NO)
29 if test x"$samba_cv_unixsocket" = x"yes"; then
30 SMB_ENABLE(socket_unix, YES)
31 AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixscoket support])
34 dnl test for ipv6 using the gethostbyname2() function. That should be sufficient
36 AC_CHECK_FUNCS(gethostbyname2, have_ipv6=true, have_ipv6=false)
37 SMB_ENABLE(socket_ipv6, NO)
38 if $have_ipv6 = true; then
39 SMB_ENABLE(socket_ipv6, YES)
40 AC_DEFINE(HAVE_IPV6,1,[Whether the system has ipv6 support])
42 dnl don't build ipv6 by default, unless the above test enables it, or
43 dnl the configure uses --with-static-modules=socket_ipv6