summaryrefslogtreecommitdiff
path: root/source4/lib/socket
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-10-28 21:47:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:04:56 -0500
commit94c0b939c4735866945aea8b7a0377be4d814125 (patch)
treed82e64caf977fc126b660cc0e60c9d104fbbb03c /source4/lib/socket
parent08c4d0db0c22e6432e793f88bb93cf631f31ea20 (diff)
downloadsamba-94c0b939c4735866945aea8b7a0377be4d814125.tar.gz
samba-94c0b939c4735866945aea8b7a0377be4d814125.tar.bz2
samba-94c0b939c4735866945aea8b7a0377be4d814125.zip
r3335: better configure support for ipv6 - thanks to a quick tutorial from metze
(This used to be commit 76c4ba6d29a6ad1e21c2d7674e1f323e8d53d627)
Diffstat (limited to 'source4/lib/socket')
-rw-r--r--source4/lib/socket/config.m48
1 files changed, 7 insertions, 1 deletions
diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4
index 8c4a9fe40c..37eff7ded1 100644
--- a/source4/lib/socket/config.m4
+++ b/source4/lib/socket/config.m4
@@ -2,10 +2,16 @@
SMB_MODULE_MK(socket_ipv4,SOCKET,STATIC,lib/socket/config.mk)
SMB_MODULE_MK(socket_unix,SOCKET,STATIC,lib/socket/config.mk)
+dnl test for ipv6 using the gethostbyname2() function. That should be sufficient
+dnl for now
AC_CHECK_FUNCS(gethostbyname2, have_ipv6=true, have_ipv6=false)
if $have_ipv6 = true; then
+ SMB_MODULE_DEFAULT(socket_ipv6, STATIC)
AC_DEFINE(HAVE_SOCKET_IPV6,1,[Whether the system has ipv6 support])
- SMB_MODULE_MK(socket_ipv6,SOCKET,STATIC,lib/socket/config.mk)
fi
+dnl don't build ipv6 by default, unless the above test enables it, or
+dnl the configure uses --with-static-modules=socket_ipv6
+SMB_MODULE_MK(socket_ipv6,SOCKET,NOT,lib/socket/config.mk)
+
SMB_SUBSYSTEM_MK(SOCKET,lib/socket/config.mk)