/[cvs]/ccvs/m4/getaddrinfo.m4
ViewVC logotype

Diff of /ccvs/m4/getaddrinfo.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dprice, Tue Sep 6 04:51:36 2005 UTC revision 1.2 by dprice, Tue Oct 4 02:33:12 2005 UTC
# Line 1  Line 1 
1  # getaddrinfo.m4 serial 3  # getaddrinfo.m4 serial 6
2  dnl Copyright (C) 2004 Free Software Foundation, Inc.  dnl Copyright (C) 2004, 2005 Free Software Foundation, Inc.
3  dnl This file is free software; the Free Software Foundation  dnl This file is free software; the Free Software Foundation
4  dnl gives unlimited permission to copy and/or distribute it,  dnl gives unlimited permission to copy and/or distribute it,
5  dnl with or without modifications, as long as this notice is preserved.  dnl with or without modifications, as long as this notice is preserved.
6    
7  AC_DEFUN([gl_GETADDRINFO],  AC_DEFUN([gl_GETADDRINFO],
8  [  [
9    AC_SEARCH_LIBS(getaddrinfo, nsl socket)    AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
10      AC_SEARCH_LIBS(gethostbyname, [inet nsl])
11      AC_SEARCH_LIBS(getservbyname, [inet nsl socket xnet])
12    AC_REPLACE_FUNCS(getaddrinfo gai_strerror)    AC_REPLACE_FUNCS(getaddrinfo gai_strerror)
13    gl_PREREQ_GETADDRINFO    gl_PREREQ_GETADDRINFO
14  ])  ])
# Line 16  AC_DEFUN([gl_PREREQ_GETADDRINFO], [ Line 18  AC_DEFUN([gl_PREREQ_GETADDRINFO], [
18    AC_REQUIRE([gl_C_RESTRICT])    AC_REQUIRE([gl_C_RESTRICT])
19    AC_REQUIRE([gl_SOCKET_FAMILIES])    AC_REQUIRE([gl_SOCKET_FAMILIES])
20    AC_REQUIRE([AC_C_INLINE])    AC_REQUIRE([AC_C_INLINE])
21      AC_REQUIRE([AC_GNU_SOURCE])
22      AC_CHECK_HEADERS_ONCE(sys/socket.h netdb.h sys/types.h netinet/in.h)
23      AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror],,,[
24      /* sys/types.h is not needed according to POSIX, but the
25         sys/socket.h in i386-unknown-freebsd4.10 and
26         powerpc-apple-darwin5.5 required it. */
27    #ifdef HAVE_SYS_TYPES_H
28    # include <sys/types.h>
29    #endif
30    #ifdef HAVE_SYS_SOCKET_H
31    # include <sys/socket.h>
32    #endif
33    #ifdef HAVE_NETDB_H
34    # include <netdb.h>
35    #endif
36    ])
37      AC_CHECK_TYPES([struct addrinfo],,,[
38    #ifdef HAVE_SYS_TYPES_H
39    # include <sys/types.h>
40    #endif
41    #ifdef HAVE_SYS_SOCKET_H
42    # include <sys/socket.h>
43    #endif
44    #ifdef HAVE_NETDB_H
45    # include <netdb.h>
46    #endif
47    ])
48  ])  ])

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26