Tru64 UNIX has getaddrinfo but not by that name. Including <netdb.h>
#defines getaddrinfo to ogetaddrinfo or ngetaddrinfo which exists in
/usr/shlib/libc.so. So, AC_CHECK_FUNC(getaddrinfo) isn't enough to
test for getaddrinfo. Best to AC_TRY_LINK so the #define takes effect.

-- 
albert chin ([EMAIL PROTECTED])

-- snip snip
--- configure.in.orig   Thu Jan  3 19:03:54 2002
+++ configure.in        Thu Jan  3 19:09:17 2002
@@ -273,7 +273,18 @@
 AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop)) 
 AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))
 
-AC_CHECK_FUNCS(getaddrinfo, , AC_LIBOBJ(lib/getaddrinfo)) 
+# Tru64 UNIX has getaddrinfo() but has it renamed in libc as
+# something else so we must include <netdb.h> to get the
+# redefinition.
+AC_MSG_CHECKING([for getaddrinfo])
+AC_TRY_LINK([#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>],[getaddrinfo(NULL, NULL, NULL, NULL);],
+       [AC_MSG_RESULT([yes])
+       AC_DEFINE(HAVE_GETADDRINFO, 1,
+               [Define if you have the `getaddrinfo' function.])],
+       [AC_MSG_RESULT([no])])
+
 AC_CHECK_FUNCS(getnameinfo, , AC_LIBOBJ(lib/getnameinfo))
 
 AC_CHECK_MEMBER([struct sockaddr.sa_len], 

Reply via email to