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 (china@thewrittenword.com) -- 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],
On Thu, Jan 03, 2002 at 07:35:47PM -0600, rsync@thewrittenword.com wrote:> 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.Oops. Use this patch instead (forgot the AC_LIBOBJ). -- albert chin (china@thewrittenword.com) -- snip snip --- configure.in.orig Thu Jan 3 19:03:54 2002 +++ configure.in Thu Jan 3 19:55:24 2002 @@ -273,7 +273,19 @@ 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_LIBOBJ(lib/getaddrinfo)]) + AC_CHECK_FUNCS(getnameinfo, , AC_LIBOBJ(lib/getnameinfo)) AC_CHECK_MEMBER([struct sockaddr.sa_len],
Apparently Analagous Threads
- getaddrinfo.c error compiling rsync on tru64 5.1A
- Do you like rsync 2.5.5?
- [PATCH 04/10] Use AC_CONFIG_LIBOBJ_DIR and AC_REPLACE_FUNCS to adhere to autoconf standards
- [patch] Correct configure test for sin_len to compile on Tru64 Unix
- Rsync-2.5.5 on Tru64 UNIX V51.A