+AC_DEFUN([WORKING_GETADDRINFO],[
+ AC_CHECK_FUNCS([getaddrinfo],[
+ AC_MSG_CHECKING([whether getaddrinfo() works])
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+int
+main(int argc, char **argv)
+{
+ struct addrinfo hints, *ai;
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_flags = AI_PASSIVE;
+ hints.ai_socktype = SOCK_STREAM;
+ hints.ai_family = PF_UNSPEC;
+ if(getaddrinfo(NULL, "0", &hints, &ai) != 0)
+ return 1;
+ return 0;
+}
+ ]])],[
+ AC_DEFINE([HAVE_WORKING_GETADDRINFO], 1, [getaddrinfo(0)])
+ AC_MSG_RESULT(yes)
+ ],[
+ AC_MSG_RESULT(no)
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+ ])
+])
+
+# -- Hard coded system and compiler dependencies/features/options ... --
+