diff options
author | Yang Tse <yangsita@gmail.com> | 2005-12-21 20:44:54 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2005-12-21 20:44:54 +0000 |
commit | cb2a75dece92c36e58b894da01d0012c729b130d (patch) | |
tree | 80a631d552d524e055068666f3243e04c136ad76 /configure.ac | |
parent | 2e342c682c7c9c627b8c0209af0a45e9a84460d8 (diff) | |
download | c-ares-cb2a75dece92c36e58b894da01d0012c729b130d.tar.gz c-ares-cb2a75dece92c36e58b894da01d0012c729b130d.tar.bz2 c-ares-cb2a75dece92c36e58b894da01d0012c729b130d.zip |
Checking for function getnameinfo and its arguments is finally
done in one single function CURL_CHECK_FUNC_GETNAMEINFO which
will only define HAVE_GETNAMEINFO if the function has been found
AND the type of its arguments has been properly been detected
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 56 |
1 files changed, 6 insertions, 50 deletions
diff --git a/configure.ac b/configure.ac index 3af08b4..798ca18 100644 --- a/configure.ac +++ b/configure.ac @@ -322,8 +322,7 @@ AC_CHECK_MEMBER(struct addrinfo.ai_flags, ) -AC_CHECK_FUNCS( getnameinfo \ - bitncmp \ +AC_CHECK_FUNCS( bitncmp \ if_indextoname, dnl if found [], @@ -341,47 +340,6 @@ AC_TRY_LINK( [], ) -dnl Msys/Mingw does not detect getnameinfo() in AC_CHECK_FUNCS. -dnl -if test "$ac_cv_func_getnameinfo" = "no"; then - AC_MSG_CHECKING([deeper and deeper for getnameinfo]) - AC_TRY_LINK([ -#undef inline -#ifdef HAVE_WINDOWS_H -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#include <windows.h> -#ifdef HAVE_WINSOCK2_H -#include <winsock2.h> -#ifdef HAVE_WS2TCPIP_H -#include <ws2tcpip.h> -#endif -#endif -#else -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> -#endif -#ifdef HAVE_SYS_SOCKET_H -#include <sys/socket.h> -#endif -#ifdef HAVE_NETDB_H -#include <netdb.h> -#endif -#endif - ],[ - getnameinfo(0, 0, 0, 0, 0, 0, 0); - ],[ - AC_MSG_RESULT([yes]) - ac_cv_func_getnameinfo="yes" - AC_DEFINE_UNQUOTED(HAVE_GETNAMEINFO, 1, - [Define to 1 if you have the getnameinfo function.]) - ],[ - AC_MSG_RESULT([no]) - ]) -fi - - dnl check for inet_pton AC_CHECK_FUNCS(inet_pton) dnl Some systems have it, but not IPv6 @@ -530,13 +488,11 @@ AC_CHECK_SIZEOF(struct in_addr, , ] ) -if test "x$ac_cv_func_getnameinfo" = "x"; then - AC_MSG_ERROR([Checking availability of function getnameinfo must be done previously]) -else - if test "x$ac_cv_func_getnameinfo" = "xyes"; then - CURL_FUNC_GETNAMEINFO_ARGTYPES - fi -fi + +dnl Check if the getnameinfo function is available +dnl and get the types of five of its arguments. +CURL_CHECK_FUNC_GETNAMEINFO + dnl God bless non-standardized functions! We need to see which getservbyport_r variant is available CARES_CHECK_GETSERVBYPORT_R |