summaryrefslogtreecommitdiff
path: root/source4/lib/socket/config.m4
diff options
context:
space:
mode:
Diffstat (limited to 'source4/lib/socket/config.m4')
-rw-r--r--source4/lib/socket/config.m47
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/lib/socket/config.m4 b/source4/lib/socket/config.m4
index 588bf9064e..8c4a9fe40c 100644
--- a/source4/lib/socket/config.m4
+++ b/source4/lib/socket/config.m4
@@ -1,6 +1,11 @@
SMB_MODULE_MK(socket_ipv4,SOCKET,STATIC,lib/socket/config.mk)
-SMB_MODULE_MK(socket_ipv6,SOCKET,STATIC,lib/socket/config.mk)
SMB_MODULE_MK(socket_unix,SOCKET,STATIC,lib/socket/config.mk)
+AC_CHECK_FUNCS(gethostbyname2, have_ipv6=true, have_ipv6=false)
+if $have_ipv6 = true; then
+ AC_DEFINE(HAVE_SOCKET_IPV6,1,[Whether the system has ipv6 support])
+ SMB_MODULE_MK(socket_ipv6,SOCKET,STATIC,lib/socket/config.mk)
+fi
+
SMB_SUBSYSTEM_MK(SOCKET,lib/socket/config.mk)