diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-05-22 01:48:20 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-05-22 01:48:20 +0200 |
commit | a9c142d4f489be6619066abd59659227b65fa21e (patch) | |
tree | 896bc1065eb8aa468872f8a11b980881004535e5 /source4/lib/replace/libreplace_network.m4 | |
parent | 84a3290c8f0adf1248e61ab9f6c88bcfd4650375 (diff) | |
parent | 334de182f47932cbe59b0519bc38a44985055cc7 (diff) | |
download | samba-a9c142d4f489be6619066abd59659227b65fa21e.tar.gz samba-a9c142d4f489be6619066abd59659227b65fa21e.tar.bz2 samba-a9c142d4f489be6619066abd59659227b65fa21e.zip |
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit 30f8d581aa339b37b27011e65355937590df10b9)
Diffstat (limited to 'source4/lib/replace/libreplace_network.m4')
-rw-r--r-- | source4/lib/replace/libreplace_network.m4 | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/source4/lib/replace/libreplace_network.m4 b/source4/lib/replace/libreplace_network.m4 index f2d177b165..6cde6b9e0c 100644 --- a/source4/lib/replace/libreplace_network.m4 +++ b/source4/lib/replace/libreplace_network.m4 @@ -339,6 +339,35 @@ if test x"$libreplace_cv_HAVE_IFACE_IFREQ" = x"yes"; then fi fi +dnl test for ipv6 +AC_CACHE_CHECK([for ipv6 support],libreplace_cv_HAVE_IPV6,[ + AC_TRY_COMPILE([ +#include <stdlib.h> /* for NULL */ +#include <sys/socket.h> +#include <sys/types.h> +#include <netdb.h> + ], + [ +struct sockaddr_storage sa_store; +struct addrinfo *ai = NULL; +struct in6_addr in6addr; +int idx = if_nametoindex("iface1"); +int s = socket(AF_INET6, SOCK_STREAM, 0); +int ret = getaddrinfo(NULL, NULL, NULL, &ai); +if (ret != 0) { + const char *es = gai_strerror(ret); +} +freeaddrinfo(ai); + ],[ + libreplace_cv_HAVE_IPV6=yes + ],[ + libreplace_cv_HAVE_IPV6=no + ]) +]) +if test x"$libreplace_cv_HAVE_IPV6" = x"yes"; then + AC_DEFINE(HAVE_IPV6,1,[Whether the system has IPv6 support]) +fi + LIBS=$old_LIBS CPPFLAGS="$SAVE_CPPFLAGS" |