git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jakub Narebski <jnareb@gmail.com>
Date
Aug 4, 2006, 21:30 UTC
Message-ID
<200608042330.57413.jnareb@gmail.com>
In-Reply-To
<200608042333.19011.jnareb@gmail.com>

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@gmail.com>
---
 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
Previous: Jakub NarebskiNext: Jakub Narebski
Message 5 of 6 in “autoconf: Fixes and improvements (was: What's in git.git)”
  1. 0/5 autoconf: Fixes and improvements (was: What's in git.git)Jakub Narebski, Aug 4, 2006
  2. 2/5 autoconf: Set NEEDS_LIBICONV unconditionally if there is no iconv in libcJakub Narebski, Aug 4, 2006
  3. 3/5 autoconf: Fix NEEDS_SSL_WITH_CRYPTO detectionJakub Narebski, Aug 4, 2006
  4. 1/5 autoconf: typofix to detect SHA1_Init in -lcryptoJakub Narebski, Aug 4, 2006
  5. 4/5 autoconf: Double check for IPv6 supportJakub Narebski, Aug 4, 2006
  6. 5/5 autoconf: Unset NO_STH and NEED_STH when it is detected not neededJakub Narebski, Aug 4, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.