annotate m4/getaddrinfo.m4 @ 10820:bd7113fe42ce

getaddrinfo: use the modules servent and hostent.
author Bruno Haible <bruno@clisp.org>
date Mon, 17 Nov 2008 12:17:39 +0100
parents 9c30f79e8386
children 46c9755d1dd9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10820
bd7113fe42ce getaddrinfo: use the modules servent and hostent.
Bruno Haible <bruno@clisp.org>
parents: 10815
diff changeset
1 # getaddrinfo.m4 serial 18
10680
5721d1f9e1ef Move getaddrinfo.h declarations to netdb.h.
Simon Josefsson <simon@josefsson.org>
parents: 10638
diff changeset
2 dnl Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
5611
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5408
diff changeset
3 dnl This file is free software; the Free Software Foundation
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5408
diff changeset
4 dnl gives unlimited permission to copy and/or distribute it,
87c42e194f4a Use an all-permissive copyright notice, recommended by RMS.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5408
diff changeset
5 dnl with or without modifications, as long as this notice is preserved.
5408
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
6
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
7 AC_DEFUN([gl_GETADDRINFO],
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
8 [
9015
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
9 AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
10680
5721d1f9e1ef Move getaddrinfo.h declarations to netdb.h.
Simon Josefsson <simon@josefsson.org>
parents: 10638
diff changeset
10 AC_REQUIRE([gl_HEADER_NETDB])dnl for HAVE_NETDB_H
6875
41254433d288 Native win32 support for getaddrinfo. Add getnameinfo function.
Simon Josefsson <simon@josefsson.org>
parents: 6852
diff changeset
11 AC_MSG_NOTICE([checking how to do getaddrinfo, freeaddrinfo and getnameinfo])
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
12
6316
f1727ec07f78 (gl_GETADDRINFO): Look for getservbyname in these
Jim Meyering <jim@meyering.net>
parents: 6306
diff changeset
13 AC_SEARCH_LIBS(getaddrinfo, [nsl socket])
9340
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
14 AC_CACHE_CHECK([for getaddrinfo], [gl_cv_func_getaddrinfo], [
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
15 AC_TRY_LINK([
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
16 #include <sys/types.h>
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
17 #ifdef HAVE_SYS_SOCKET_H
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
18 #include <sys/socket.h>
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
19 #endif
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
20 #ifdef HAVE_NETDB_H
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
21 #include <netdb.h>
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
22 #endif
9347
637caf8d483d Tweak last patch.
Bruno Haible <bruno@clisp.org>
parents: 9344
diff changeset
23 #include <stddef.h>
9340
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
24 ], [getaddrinfo("", "", NULL, NULL);],
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
25 [gl_cv_func_getaddrinfo=yes],
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
26 [gl_cv_func_getaddrinfo=no])])
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
27 if test $gl_cv_func_getaddrinfo = no; then
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
28 AC_CACHE_CHECK(for getaddrinfo in ws2tcpip.h and -lws2_32,
6646
c8acef83bf3f * sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
Simon Josefsson <simon@josefsson.org>
parents: 6619
diff changeset
29 gl_cv_w32_getaddrinfo, [
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
30 gl_cv_w32_getaddrinfo=no
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
31 am_save_LIBS="$LIBS"
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
32 LIBS="$LIBS -lws2_32"
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
33 AC_TRY_LINK([
6646
c8acef83bf3f * sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
Simon Josefsson <simon@josefsson.org>
parents: 6619
diff changeset
34 #ifdef HAVE_WS2TCPIP_H
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
35 #include <ws2tcpip.h>
6646
c8acef83bf3f * sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
Simon Josefsson <simon@josefsson.org>
parents: 6619
diff changeset
36 #endif
9347
637caf8d483d Tweak last patch.
Bruno Haible <bruno@clisp.org>
parents: 9344
diff changeset
37 #include <stddef.h>
9343
b9402be3510c m4/getaddrinfo.m4: Use NULL rather than 0 for pointers.
Simon Josefsson <simon@josefsson.org>
parents: 9340
diff changeset
38 ], [getaddrinfo(NULL, NULL, NULL, NULL);], gl_cv_w32_getaddrinfo=yes)
10815
9c30f79e8386 Fix indentation.
Bruno Haible <bruno@clisp.org>
parents: 10786
diff changeset
39 LIBS="$am_save_LIBS"
9c30f79e8386 Fix indentation.
Bruno Haible <bruno@clisp.org>
parents: 10786
diff changeset
40 ])
6664
f9e910a182f7 2006-02-17 Eric Blake <address@hidden>
Simon Josefsson <simon@josefsson.org>
parents: 6646
diff changeset
41 if test "$gl_cv_w32_getaddrinfo" = "yes"; then
f9e910a182f7 2006-02-17 Eric Blake <address@hidden>
Simon Josefsson <simon@josefsson.org>
parents: 6646
diff changeset
42 LIBS="$LIBS -lws2_32"
f9e910a182f7 2006-02-17 Eric Blake <address@hidden>
Simon Josefsson <simon@josefsson.org>
parents: 6646
diff changeset
43 else
f9e910a182f7 2006-02-17 Eric Blake <address@hidden>
Simon Josefsson <simon@josefsson.org>
parents: 6646
diff changeset
44 AC_LIBOBJ(getaddrinfo)
f9e910a182f7 2006-02-17 Eric Blake <address@hidden>
Simon Josefsson <simon@josefsson.org>
parents: 6646
diff changeset
45 fi
9340
0a3ccd66183f A different way to test for getaddrinfo, so that it works on OSF/1 5.1.
Bruno Haible <bruno@clisp.org>
parents: 9209
diff changeset
46 fi
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
47
9015
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
48 # We can't use AC_REPLACE_FUNCS here because gai_strerror may be an
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
49 # inline function declared in ws2tcpip.h, so we need to get that
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
50 # header included somehow.
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
51 AC_CACHE_CHECK([for gai_strerror (possibly via ws2tcpip.h)],
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
52 gl_cv_func_gai_strerror, [
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
53 AC_TRY_LINK([
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
54 #include <sys/types.h>
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
55 #ifdef HAVE_SYS_SOCKET_H
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
56 #include <sys/socket.h>
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
57 #endif
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
58 #ifdef HAVE_NETDB_H
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
59 #include <netdb.h>
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
60 #endif
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
61 #ifdef HAVE_WS2TCPIP_H
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
62 #include <ws2tcpip.h>
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
63 #endif
9347
637caf8d483d Tweak last patch.
Bruno Haible <bruno@clisp.org>
parents: 9344
diff changeset
64 #include <stddef.h>
9343
b9402be3510c m4/getaddrinfo.m4: Use NULL rather than 0 for pointers.
Simon Josefsson <simon@josefsson.org>
parents: 9340
diff changeset
65 ], [gai_strerror (NULL);],
9015
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
66 [gl_cv_func_gai_strerror=yes],
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
67 [gl_cv_func_gai_strerror=no])])
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
68 if test $gl_cv_func_gai_strerror = no; then
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
69 AC_LIBOBJ(gai_strerror)
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
70 fi
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
71
5408
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
72 gl_PREREQ_GETADDRINFO
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
73 ])
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
74
10786
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
75 # Prerequisites of lib/netdb.in.h and lib/getaddrinfo.c.
5408
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
76 AC_DEFUN([gl_PREREQ_GETADDRINFO], [
10786
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
77 AC_REQUIRE([gl_NETDB_H_DEFAULTS])
9015
be77894aec65 2007-06-27 Simon Josefsson <simon@josefsson.org>
Simon Josefsson <simon@josefsson.org>
parents: 7100
diff changeset
78 AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
10820
bd7113fe42ce getaddrinfo: use the modules servent and hostent.
Bruno Haible <bruno@clisp.org>
parents: 10815
diff changeset
79 AC_REQUIRE([gl_HOSTENT]) dnl for HOSTENT_LIB
bd7113fe42ce getaddrinfo: use the modules servent and hostent.
Bruno Haible <bruno@clisp.org>
parents: 10815
diff changeset
80 AC_REQUIRE([gl_SERVENT]) dnl for SERVENT_LIB
bd7113fe42ce getaddrinfo: use the modules servent and hostent.
Bruno Haible <bruno@clisp.org>
parents: 10815
diff changeset
81 LIBS="$LIBS $HOSTENT_LIB $SERVENT_LIB"
7100
1401e9cfcacd Remove the 'restrict' module, and modify everybody to use AC_C_RESTRICT
Paul Eggert <eggert@cs.ucla.edu>
parents: 6875
diff changeset
82 AC_REQUIRE([AC_C_RESTRICT])
5408
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
83 AC_REQUIRE([gl_SOCKET_FAMILIES])
6646
c8acef83bf3f * sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
Simon Josefsson <simon@josefsson.org>
parents: 6619
diff changeset
84 AC_REQUIRE([gl_HEADER_SYS_SOCKET])
5408
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
85 AC_REQUIRE([AC_C_INLINE])
9209
5a0294ce5372 Track CVS Autoconf on AC_USE_SYSTEM_EXTENSIONS.
Eric Blake <ebb9@byu.net>
parents: 9015
diff changeset
86 AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
10638
28050ad34088 Fix getaddrinfo emulation for systems with struct sockaddr.sa_len.
Paolo Bonzini <bonzini@gnu.org>
parents: 9347
diff changeset
87
28050ad34088 Fix getaddrinfo emulation for systems with struct sockaddr.sa_len.
Paolo Bonzini <bonzini@gnu.org>
parents: 9347
diff changeset
88 dnl Including sys/socket.h is wrong for Windows, but Windows does not
28050ad34088 Fix getaddrinfo emulation for systems with struct sockaddr.sa_len.
Paolo Bonzini <bonzini@gnu.org>
parents: 9347
diff changeset
89 dnl have sa_len so the result is correct anyway.
28050ad34088 Fix getaddrinfo emulation for systems with struct sockaddr.sa_len.
Paolo Bonzini <bonzini@gnu.org>
parents: 9347
diff changeset
90 AC_CHECK_MEMBERS([struct sockaddr.sa_len], , , [#include <sys/socket.h>])
28050ad34088 Fix getaddrinfo emulation for systems with struct sockaddr.sa_len.
Paolo Bonzini <bonzini@gnu.org>
parents: 9347
diff changeset
91
10680
5721d1f9e1ef Move getaddrinfo.h declarations to netdb.h.
Simon Josefsson <simon@josefsson.org>
parents: 10638
diff changeset
92 AC_CHECK_HEADERS_ONCE(netinet/in.h)
10786
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
93
6875
41254433d288 Native win32 support for getaddrinfo. Add getnameinfo function.
Simon Josefsson <simon@josefsson.org>
parents: 6852
diff changeset
94 AC_CHECK_DECLS([getaddrinfo, freeaddrinfo, gai_strerror, getnameinfo],,,[
6321
2b9ecd9439d4 2005-10-01 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 6319
diff changeset
95 /* sys/types.h is not needed according to POSIX, but the
2b9ecd9439d4 2005-10-01 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 6319
diff changeset
96 sys/socket.h in i386-unknown-freebsd4.10 and
2b9ecd9439d4 2005-10-01 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 6319
diff changeset
97 powerpc-apple-darwin5.5 required it. */
6340
7ce682b6b199 Don't use the HAVE_ macros that we used to define.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6339
diff changeset
98 #include <sys/types.h>
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
99 #ifdef HAVE_SYS_SOCKET_H
6340
7ce682b6b199 Don't use the HAVE_ macros that we used to define.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6339
diff changeset
100 #include <sys/socket.h>
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
101 #endif
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
102 #ifdef HAVE_NETDB_H
6340
7ce682b6b199 Don't use the HAVE_ macros that we used to define.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6339
diff changeset
103 #include <netdb.h>
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
104 #endif
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
105 #ifdef HAVE_WS2TCPIP_H
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
106 #include <ws2tcpip.h>
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
107 #endif
5408
02eeb2ef41ed Add getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents:
diff changeset
108 ])
10786
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
109 if test $ac_cv_have_decl_getaddrinfo = no; then
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
110 HAVE_DECL_GETADDRINFO=0
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
111 fi
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
112 if test $ac_cv_have_decl_freeaddrinfo = no; then
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
113 HAVE_DECL_FREEADDRINFO=0
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
114 fi
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
115 if test $ac_cv_have_decl_gai_strerror = no; then
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
116 HAVE_DECL_GAI_STRERROR=0
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
117 fi
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
118 if test $ac_cv_have_decl_getnameinfo = no; then
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
119 HAVE_DECL_GETNAMEINFO=0
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
120 fi
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
121
6319
81f384f9b845 2005-10-01 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 6316
diff changeset
122 AC_CHECK_TYPES([struct addrinfo],,,[
6340
7ce682b6b199 Don't use the HAVE_ macros that we used to define.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6339
diff changeset
123 #include <sys/types.h>
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
124 #ifdef HAVE_SYS_SOCKET_H
6340
7ce682b6b199 Don't use the HAVE_ macros that we used to define.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6339
diff changeset
125 #include <sys/socket.h>
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
126 #endif
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
127 #ifdef HAVE_NETDB_H
6340
7ce682b6b199 Don't use the HAVE_ macros that we used to define.
Paul Eggert <eggert@cs.ucla.edu>
parents: 6339
diff changeset
128 #include <netdb.h>
6619
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
129 #endif
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
130 #ifdef HAVE_WS2TCPIP_H
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
131 #include <ws2tcpip.h>
29248383a0c7 Mingw32 fixes for getaddrinfo.
Simon Josefsson <simon@josefsson.org>
parents: 6340
diff changeset
132 #endif
6319
81f384f9b845 2005-10-01 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 6316
diff changeset
133 ])
10786
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
134 if test $ac_cv_type_struct_addrinfo = no; then
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
135 HAVE_STRUCT_ADDRINFO=0
532bb85195db Use substituted macros instead of C preprocessor macros.
Bruno Haible <bruno@clisp.org>
parents: 10680
diff changeset
136 fi
6319
81f384f9b845 2005-10-01 Simon Josefsson <jas@extundo.com>
Simon Josefsson <simon@josefsson.org>
parents: 6316
diff changeset
137 ])