* lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
[gnulib.git] / m4 / getaddrinfo.m4
1 # getaddrinfo.m4 serial 4
2 dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3 dnl This file is free software; the Free Software Foundation
4 dnl gives unlimited permission to copy and/or distribute it,
5 dnl with or without modifications, as long as this notice is preserved.
6
7 AC_DEFUN([gl_GETADDRINFO],
8 [
9   AC_SEARCH_LIBS(getaddrinfo, nsl socket)
10   AC_REPLACE_FUNCS(getaddrinfo gai_strerror)
11   gl_PREREQ_GETADDRINFO
12 ])
13
14 # Prerequisites of lib/getaddrinfo.h and lib/getaddrinfo.c.
15 AC_DEFUN([gl_PREREQ_GETADDRINFO], [
16   AC_REQUIRE([gl_C_RESTRICT])
17   AC_REQUIRE([gl_SOCKET_FAMILIES])
18   AC_REQUIRE([AC_C_INLINE])
19   AC_CHECK_HEADERS_ONCE([netinet/in.h])
20 ])