aboutsummaryrefslogtreecommitdiffstats
path: root/configure.in
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-09-24 10:51:13 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-09-24 10:51:13 +0800
commit8759ffeca078686662c9be8678ddc8f497f7dfff (patch)
tree28163fb190350bafdb1c0fecaf580729d44e8463 /configure.in
parent2223bc36fa7b6b16ff7ea83e39e64e9375e3ebc1 (diff)
downloadgsoc2013-evolution-8759ffeca078686662c9be8678ddc8f497f7dfff.tar
gsoc2013-evolution-8759ffeca078686662c9be8678ddc8f497f7dfff.tar.gz
gsoc2013-evolution-8759ffeca078686662c9be8678ddc8f497f7dfff.tar.bz2
gsoc2013-evolution-8759ffeca078686662c9be8678ddc8f497f7dfff.tar.lz
gsoc2013-evolution-8759ffeca078686662c9be8678ddc8f497f7dfff.tar.xz
gsoc2013-evolution-8759ffeca078686662c9be8678ddc8f497f7dfff.tar.zst
gsoc2013-evolution-8759ffeca078686662c9be8678ddc8f497f7dfff.zip
change the way ipv6 stuff is done. separate ipv6 setting from getaddrinfo
2004-09-13 Not Zed <NotZed@Ximian.com> * configure.in: change the way ipv6 stuff is done. separate ipv6 setting from getaddrinfo call check, and default to on if the interfaces are available. svn path=/trunk/; revision=27353
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in35
1 files changed, 22 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index c9bd56ec9a..938ccd9d73 100644
--- a/configure.in
+++ b/configure.in
@@ -316,11 +316,9 @@ AC_SUBST(A11Y_CFLAGS)
AC_SUBST(A11Y_LIBS)
dnl **************************************************
-dnl * IPv6 support
+dnl * IPv6 support and getaddrinfo calls
dnl **************************************************
-AC_ARG_ENABLE(ipv6, [ --enable-ipv6=[no/yes] Enable support for resolving IPv6 addresses.],,enable_ipv6=no)
-if test "x$enable_ipv6" = "xyes"; then
-AC_CACHE_CHECK([if system has necessary structs and functions for IPv6 support], msg_ipv6,
+AC_CACHE_CHECK([if system supports getaddrinfo and getnameinfo], have_addrinfo,
[
AC_TRY_COMPILE([
#include "confdefs.h"
@@ -333,21 +331,29 @@ AC_CACHE_CHECK([if system has necessary structs and functions for IPv6 support],
struct addrinfo hints, *res;
struct sockaddr_in6 sin6;
int af = AF_INET6;
-
+ char host[NI_MAXHOST];
+ char serv[NI_MAXSERV];
+
getaddrinfo ("www.ximian.com", NULL, &hints, &res);
freeaddrinfo (res);
+ getnameinfo((struct sockaddr *)&sin6, sizeof(sin6), host, sizeof(host), serv, sizeof(serv), 0);
],[
- msg_ipv6=yes
+ have_addrinfo=yes
],[
- enable_ipv6=no
- msg_ipv6=no
+ have_addrinfo=no
])
])
-else
- msg_ipv6=no
-fi
-if test "x$enable_ipv6" = "xyes"; then
+if test x"$have_addrinfo" = "xno" ; then
+ AC_DEFINE(NEED_ADDRINFO,1,[Enable getaddrinfo emulation])
+ if test x"$enable_ipv6" = "xyes" ; then
+ AC_ERROR(system doesn't support necessary interfaces for ipv6 support)
+ fi
+ msg_ipv6=no
+else
+ AC_ARG_ENABLE(ipv6, [ --enable-ipv6=[no/yes] Enable support for resolving IPv6 addresses.],,enable_ipv6=yes)
+ if test x"$enable_ipv6" = "xyes"; then
+ msg_ipv6=yes
AC_DEFINE(ENABLE_IPv6,1,[Enable IPv6 support])
AC_TRY_COMPILE([
#include "confdefs.h"
@@ -363,9 +369,12 @@ if test "x$enable_ipv6" = "xyes"; then
],[
AC_DEFINE(HAVE_AI_ADDRCONFIG,1,[Define if the system defines the AI_ADDRCONFIG flag for getaddrinfo])
])
+ else
+ msg_ipv6=no
+ fi
fi
-AM_CONDITIONAL(ENABLE_IPv6, test "x$enable_ipv6" = "xyes")
+AM_CONDITIONAL(ENABLE_IPv6, test "x$enable_ipv6" = "xyes")
dnl **************************************************
dnl LDAP support.