diff options
author | Andrew Bartlett <abartlet@samba.org> | 2008-05-17 21:16:22 +1000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-05-17 21:16:22 +1000 |
commit | d975cd9d8c3fc504a8ccbb80f239d4648ac0c304 (patch) | |
tree | 8272375ede8a170bdd7b09d48db833248c65a54d /source4/lib/replace/libreplace_network.m4 | |
parent | fd0d47b746be322b60fca29c1daa13e72b360e62 (diff) | |
parent | 250478d0445cf56e8b0b4e876977a9ae968ff55b (diff) | |
download | samba-d975cd9d8c3fc504a8ccbb80f239d4648ac0c304.tar.gz samba-d975cd9d8c3fc504a8ccbb80f239d4648ac0c304.tar.bz2 samba-d975cd9d8c3fc504a8ccbb80f239d4648ac0c304.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit 60579269d1e0bebce5b595ef95d68fd4bf781cfd)
Diffstat (limited to 'source4/lib/replace/libreplace_network.m4')
-rw-r--r-- | source4/lib/replace/libreplace_network.m4 | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/source4/lib/replace/libreplace_network.m4 b/source4/lib/replace/libreplace_network.m4 index 5ab71f160a..f2d177b165 100644 --- a/source4/lib/replace/libreplace_network.m4 +++ b/source4/lib/replace/libreplace_network.m4 @@ -8,6 +8,7 @@ LIBREPLACE_NETWORK_LIBS="" AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h) AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h) +AC_CHECK_HEADERS(sys/sockio.h sys/un.h) dnl we need to check that net/if.h really can be used, to cope with hpux dnl where including it always fails @@ -62,6 +63,46 @@ AC_CHECK_MEMBER(struct sockaddr_storage.__ss_family, fi fi +AC_CACHE_CHECK([for sin_len in sock],libreplace_cv_HAVE_SOCK_SIN_LEN,[ + AC_TRY_COMPILE( + [ +#include <sys/types.h> +#include <sys/socket.h> +#include <netinet/in.h> + ],[ +struct sockaddr_in sock; sock.sin_len = sizeof(sock); + ],[ + libreplace_cv_HAVE_SOCK_SIN_LEN=yes + ],[ + libreplace_cv_HAVE_SOCK_SIN_LEN=no + ]) +]) +if test x"$libreplace_cv_HAVE_SOCK_SIN_LEN" = x"yes"; then + AC_DEFINE(HAVE_SOCK_SIN_LEN,1,[Whether the sockaddr_in struct has a sin_len property]) +fi + +############################################ +# check for unix domain sockets +AC_CACHE_CHECK([for unix domain sockets],libreplace_cv_HAVE_UNIXSOCKET,[ + AC_TRY_COMPILE([ +#include <sys/types.h> +#include <stdlib.h> +#include <stddef.h> +#include <sys/socket.h> +#include <sys/un.h> + ],[ +struct sockaddr_un sunaddr; +sunaddr.sun_family = AF_UNIX; + ],[ + libreplace_cv_HAVE_UNIXSOCKET=yes + ],[ + libreplace_cv_HAVE_UNIXSOCKET=no + ]) +]) +if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"yes"; then + AC_DEFINE(HAVE_UNIXSOCKET,1,[If we need to build with unixscoket support]) +fi + dnl The following test is roughl taken from the cvs sources. dnl dnl If we can't find connect, try looking in -lsocket, -lnsl, and -linet. |