@matheusbsbs / matheus-bagliano / commits / 8c6ab35efe
Fork 0

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>

Junio C Hamano committed Aug 4, 2006 at 16:46 UTC 8c6ab35efe635b2f70cdd471903cd80886ec6eec
1 file changed +8 -2
configure.ac
+8 -2
@@ -203,6 +203,14 @@ AC_CHECK_MEMBER(struct dirent.d_type,[],
203 AC_CHECK_TYPE(struct sockaddr_storage,[],
204 [GIT_CONF_APPEND_LINE(NO_SOCKADDR_STORAGE=YesPlease)],
205 [#include <netinet/in.h>])
206 +# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
207 +AC_CHECK_TYPE([struct addrinfo],[
208 +AC_CHECK_FUNC([getaddrinfo],[],
209 +[GIT_CONF_APPEND_LINE(NO_IPV6=YesPlease)])],[],[
210 +#include <sys/types.h>
211 +#include <sys/socket.h>
212 +#include <netdb.h>
213 +])
214 #
215 # Define NO_C99_FORMAT if your formatted IO functions (printf/scanf et.al.)
216 # do not support the 'size specifiers' introduced by C99, namely ll, hh,
@@ -244,8 +252,6 @@ AC_CHECK_FUNC(setenv,[],
252 #
253 # Define NO_MMAP if you want to avoid mmap.
254 #
247 -# Define NO_IPV6 if you lack IPv6 support and getaddrinfo().
248 -#
255 # Define NO_ICONV if your libc does not properly support iconv.
256
257