aboutsummaryrefslogtreecommitdiff
path: root/ares/configure.ac
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2008-09-24 16:43:12 +0000
committerYang Tse <yangsita@gmail.com>2008-09-24 16:43:12 +0000
commit142cb601f86e56e18cc19ea4998dd87a4504993f (patch)
tree405c56b2d6331282ee90ced926cd10725be279b7 /ares/configure.ac
parent21b523fcd3aa3ab22733d3baff93e591673a8e9c (diff)
HAVE_INET_NTOP will only be defined when an IPv6 capable working
inet_ntop function is available.
Diffstat (limited to 'ares/configure.ac')
-rw-r--r--ares/configure.ac34
1 files changed, 1 insertions, 33 deletions
diff --git a/ares/configure.ac b/ares/configure.ac
index e579ea052..5c43e006a 100644
--- a/ares/configure.ac
+++ b/ares/configure.ac
@@ -660,6 +660,7 @@ CURL_CHECK_MSG_NOSIGNAL
CARES_CHECK_FUNC_GETHOSTNAME
CARES_CHECK_FUNC_GETSERVBYPORT_R
+CARES_CHECK_FUNC_INET_NTOP
CARES_CHECK_FUNC_STRCASECMP
CARES_CHECK_FUNC_STRCMPI
CARES_CHECK_FUNC_STRDUP
@@ -919,39 +920,6 @@ int main()
fi
-dnl Check for inet_ntop
-AC_CHECK_FUNCS(inet_ntop)
-dnl Again, some systems have it, but not IPv6
-if test "$ac_cv_func_inet_ntop" = "yes" ; then
-AC_MSG_CHECKING(if inet_ntop supports IPv6)
-AC_TRY_RUN(
- [
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#include <errno.h>
-int main()
- {
- struct in6_addr addr6;
- char buf[128];
- if (inet_ntop(AF_INET6, &addr6, buf, 128) == 0 && errno == EAFNOSUPPORT)
- exit(1);
- else
- exit(0);
- }
- ], [
- AC_MSG_RESULT(yes)
- AC_DEFINE_UNQUOTED(HAVE_INET_NTOP_IPV6,1,
- [Define to 1 if inet_ntop supports IPv6.])
- ], AC_MSG_RESULT(no),AC_MSG_RESULT(no))
-fi
-
AC_CHECK_SIZEOF(struct in6_addr, ,
[
#undef inline