summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-08-04 16:46:16 -0700
committerJunio C Hamano <junkio@cox.net>2006-08-04 16:46:16 -0700
commit8c6ab35efe635b2f70cdd471903cd80886ec6eec (patch)
tree9ebfe380768a78d8e1941265281ccbf49cb81544 /configure.ac
parentf7b5e8d03a97e7d4a6e543d5f9972d1285947908 (diff)
downloadgit-8c6ab35efe635b2f70cdd471903cd80886ec6eec.tar.gz
autoconf: NO_IPV6
We would need both "struct addrinfo" and getaddrinfo() available. Check them and set NO_IPV6 otherwise. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 8 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac
index 33ddee2120..74c271098c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,6 +203,14 @@ AC_CHECK_MEMBER(struct dirent.d_type,[],
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],[
+AC_CHECK_FUNC([getaddrinfo],[],
+[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,
@@ -244,8 +252,6 @@ AC_CHECK_FUNC(setenv,[],
#
# Define NO_MMAP if you want to avoid mmap.
#
-# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
-#
# Define NO_ICONV if your libc does not properly support iconv.