[SCM] Samba Shared Repository - branch v4-0-test updated -
release-4-0-0alpha3-1677-g76be51d
Stefan Metzmacher
metze at samba.org
Wed May 21 20:28:23 GMT 2008
The branch, v4-0-test has been updated
via 76be51d3a08e2239a137b8abe3f2df722f69ddb2 (commit)
via e835e7eebcc064ce0813814796828f15ad112fbd (commit)
from c0a84c2b4698f6ac9b555cc74bed52e5930804d9 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v4-0-test
- Log -----------------------------------------------------------------
commit 76be51d3a08e2239a137b8abe3f2df722f69ddb2
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed May 21 21:28:59 2008 +0200
lib/socket: use HAVE_IPV6 test from LIBREPLACE_NETWORK_CHECKS
metze
commit e835e7eebcc064ce0813814796828f15ad112fbd
Author: Stefan Metzmacher <metze at samba.org>
Date: Wed May 21 21:27:45 2008 +0200
libreplace: add test for HAVE_IPV6
Samba can later just check libreplace_cv_HAVE_IPV6 = yes.
metze
-----------------------------------------------------------------------
Summary of changes:
source/lib/replace/libreplace_network.m4 | 29 +++++++++++++++++++++++++++++
source/lib/socket/config.m4 | 16 +++++-----------
2 files changed, 34 insertions(+), 11 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/lib/replace/libreplace_network.m4 b/source/lib/replace/libreplace_network.m4
index f2d177b..6cde6b9 100644
--- a/source/lib/replace/libreplace_network.m4
+++ b/source/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"
diff --git a/source/lib/socket/config.m4 b/source/lib/socket/config.m4
index 871c57f..9c0072d 100644
--- a/source/lib/socket/config.m4
+++ b/source/lib/socket/config.m4
@@ -1,5 +1,6 @@
AC_CHECK_FUNCS(writev)
AC_CHECK_FUNCS(readv)
+AC_CHECK_FUNCS(gethostbyname2)
############################################
# check for unix domain sockets
@@ -9,17 +10,10 @@ if test x"$libreplace_cv_HAVE_UNIXSOCKET" = x"yes"; then
SMB_ENABLE(socket_unix, YES)
fi
-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)
+############################################
+# check for ipv6
+# done by AC_LIBREPLACE_NETWORK_CHECKS
SMB_ENABLE(socket_ipv6, NO)
-if $have_ipv6 = true; then
+if test x"$libreplace_cv_HAVE_IPV6" = x"yes"; then
SMB_ENABLE(socket_ipv6, YES)
- AC_DEFINE(HAVE_IPV6,1,[Whether the system has ipv6 support])
fi
-dnl don't build ipv6 by default, unless the above test enables it, or
-dnl the configure uses --with-static-modules=socket_ipv6
-
-
-
-
--
Samba Shared Repository
More information about the samba-cvs
mailing list