doc: Document our conventions for *.m4 files.
[gnulib.git] / modules / socket
blob3670c6b8394ca602b3504ef407117c3782fde664
1 Description:
2 socket() function: create a socket.
4 Files:
5 lib/socket.c
6 lib/w32sock.h
8 Depends-on:
9 sys_socket
10 socketlib
11 errno           [test "$ac_cv_header_winsock2_h" = yes]
12 sockets         [test "$ac_cv_header_winsock2_h" = yes]
13 msvc-nothrow    [test "$ac_cv_header_winsock2_h" = yes]
15 configure.ac:
16 AC_REQUIRE([gl_SYS_SOCKET_H])
17 gl_CONDITIONAL([GL_COND_OBJ_SOCKET], [test "$ac_cv_header_winsock2_h" = yes])
18 # When this module is used, sockets may actually occur as file descriptors,
19 # hence it is worth warning if the modules 'close' and 'ioctl' are not used.
20 m4_ifdef([gl_UNISTD_H_DEFAULTS], [gl_UNISTD_H_REQUIRE_DEFAULTS])
21 m4_ifdef([gl_SYS_IOCTL_H_DEFAULTS], [gl_SYS_IOCTL_H_REQUIRE_DEFAULTS])
22 AC_REQUIRE([gl_PREREQ_SYS_H_WINSOCK2])
23 if test "$ac_cv_header_winsock2_h" = yes; then
24   UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
25   SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
27 gl_SYS_SOCKET_MODULE_INDICATOR([socket])
29 Makefile.am:
30 if GL_COND_OBJ_SOCKET
31 lib_SOURCES += socket.c
32 endif
34 Include:
35 <sys/socket.h>
37 Link:
38 $(LIBSOCKET)
40 License:
41 LGPLv2+
43 Maintainer:
44 Paolo Bonzini, Simon Josefsson