[PATCH 4/5] autoconf: Double check for IPv6 support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Check for IPv6 support, first by checking if "struct addrinfo" exists,
then by checking if there is getaddrinfo() in standard libraries.

Signed-off-by: Jakub Narebski <jnareb@xxxxxxxxx>
---
 configure.ac |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index a49bd1f..6557bd2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -204,6 +204,13 @@ AC_CHECK_TYPE(struct sockaddr_storage,[]
 [GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease)],
 [#include <netinet/in.h>])
 #
+# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
+AC_CHECK_TYPE(struct addrinfo,[],
+[GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)],
+[#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>])
+#
 # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.)
 # do not support the 'size specifiers' introduced by C99, namely ll, hh,
 # j, z, t. (representing long long int, char, intmax_t, size_t, ptrdiff_t).
@@ -242,14 +249,16 @@ # Define NO_SETENV if you don't have set
 AC_CHECK_FUNC(setenv,[],
 [GIT_CONF_APPEND_LINE(NO_SETENV=YesPlease)])
 #
+# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
+AC_CHECK_FUNC(getaddrinfo,[],
+[GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)])
+#
 # Define NO_MMAP if you want to avoid mmap.
 AC_FUNC_MMAP
 if test $ac_cv_func_mmap_fixed_mapped != yes; then
 	GIT_CONF_APPEND_LINE(NO_MMAP=YesPlease)
 fi
 #
-# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
-#
 # Define NO_ICONV if your libc does not properly support iconv.
 
 
-- 
1.4.1.1

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]