Tweak comment.
[gnulib.git] / m4 / sockets.m4
1 # sockets.m4 serial 1
2 dnl Copyright (C) 2008 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_SOCKETS],
8 [
9   AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
10
11   AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32],
12                  [gl_cv_func_wsastartup], [
13     am_save_LIBS="$LIBS"
14     LIBS="$LIBS -lws2_32"
15     AC_TRY_LINK([
16 #ifdef HAVE_WINSOCK2_H
17 # include <winsock2.h>
18 #endif], [
19       WORD wVersionRequested = MAKEWORD(1, 1);
20       WSADATA wsaData;
21       int err = WSAStartup(wVersionRequested, &wsaData);
22       WSACleanup ();],
23       gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no)
24     LIBS="$am_save_LIBS"])
25   if test "$gl_cv_func_wsastartup" = "yes"; then
26     AC_DEFINE([WINDOWS_SOCKETS], 1, [Define if WSAStartup is needed.])
27     LIBS="$LIBS -lws2_32"
28   fi
29   gl_PREREQ_SOCKETS
30 ])
31
32 # Prerequisites of lib/sockets.c.
33 AC_DEFUN([gl_PREREQ_SOCKETS], [
34   :
35 ])