diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-22 16:09:10 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-22 16:09:10 +1000 |
commit | fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5 (patch) | |
tree | 6e6b4079ecf50b42b862d0f8accc392e5f061cb8 /source4/lib/replace | |
parent | af82204f4355ac9011b61019bbbe40e7e3632d4c (diff) | |
parent | 8172f3eb220575d40f9ab5129d36e4e0003dee56 (diff) | |
download | samba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.tar.gz samba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.tar.bz2 samba-fd7dc46f50d063a3bd4951e8b9bbc17b7632f0c5.zip |
Merge commit 'origin/v4-0-test' into v4-0-test
(This used to be commit d7f3348c891e14de0e1b195714468ff998400f60)
Diffstat (limited to 'source4/lib/replace')
-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" |