summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-09-29 23:43:24 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:31:05 -0500
commit96c4510c8d2c9125e2b1c934b54a9dafb2c423a1 (patch)
treec7bd0ad57f14e32f62399600dc378781c120b704 /source3
parentba86aa99764487f06604fe2972c7cee0e2419c1b (diff)
downloadsamba-96c4510c8d2c9125e2b1c934b54a9dafb2c423a1.tar.gz
samba-96c4510c8d2c9125e2b1c934b54a9dafb2c423a1.tar.bz2
samba-96c4510c8d2c9125e2b1c934b54a9dafb2c423a1.zip
r25431: Add detection for IPv6 support.
Jeremy. (This used to be commit 86b47d267d0eda4b972f1087be069ae5afda834e)
Diffstat (limited to 'source3')
-rw-r--r--source3/configure.in20
1 files changed, 20 insertions, 0 deletions
diff --git a/source3/configure.in b/source3/configure.in
index 5762746c40..d546e265a7 100644
--- a/source3/configure.in
+++ b/source3/configure.in
@@ -3085,6 +3085,26 @@ if test x"$samba_cv_HAVE_IFACE_IFREQ" = x"yes"; then
fi
fi
+dnl test for ipv6
+AC_CACHE_CHECK([for ipv6 support],samba_cv_HAVE_IPV6,[
+AC_TRY_COMPILE([
+#include <sys/socket.h>
+#include <sys/types.h>
+#include <netdb.h>],
+[
+struct sockaddr_storage sa_store;
+struct addrinfo *ai = NULL;
+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);
+],
+samba_cv_HAVE_IPV6=yes,samba_cv_HAVE_IPV6=no)])
+if test x"$samba_cv_HAVE_IPV6" = x"yes"; then
+ AC_DEFINE(HAVE_IPV6,1,[Whether the system has IPv6 support])
+fi
################################################
# look for a method of setting the effective uid