lib/socket: remove unused configure check for HAVE_WORKING_AF_LOCAL
[samba.git] / source4 / lib / socket / config.m4
1 AC_CHECK_FUNCS(writev)
2 AC_CHECK_FUNCS(readv)
3
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])
12 fi
13
14 ############################################
15 # check for unix domain sockets
16 AC_CACHE_CHECK([for unix domain sockets],samba_cv_unixsocket, [
17     AC_TRY_COMPILE([
18 #include <sys/types.h>
19 #include <stdlib.h>
20 #include <stddef.h>
21 #include <sys/socket.h>
22 #include <sys/un.h>],
23 [
24   struct sockaddr_un sunaddr; 
25   sunaddr.sun_family = AF_UNIX;
26 ],
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])
32 fi
33
34 dnl test for ipv6 using the gethostbyname2() function. That should be sufficient
35 dnl for now
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])
41 fi
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
44
45
46
47