summaryrefslogtreecommitdiff
path: root/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
commita08ee8a0bed9d6e55beec8cfb735937735c4a417 (patch)
treecf6581b3fa16d1451ed46b398978cd173d792f44 /configure.ac
parent9be0422d12d2d98629c6e8d18830c018623c06b4 (diff)
downloadc-ares-a08ee8a0bed9d6e55beec8cfb735937735c4a417.tar.gz
c-ares-a08ee8a0bed9d6e55beec8cfb735937735c4a417.tar.bz2
c-ares-a08ee8a0bed9d6e55beec8cfb735937735c4a417.zip
HAVE_INET_NTOP will only be defined when an IPv6 capable working
inet_ntop function is available.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac34
1 files changed, 1 insertions, 33 deletions
diff --git a/configure.ac b/configure.ac
index e579ea0..5c43e00 100644
--- a/configure.ac
+++ b/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