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.
9 AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H
11 AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32],
12 [gl_cv_func_wsastartup], [
16 #ifdef HAVE_WINSOCK2_H
17 # include <winsock2.h>
19 WORD wVersionRequested = MAKEWORD(1, 1);
21 int err = WSAStartup(wVersionRequested, &wsaData);
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.])
32 # Prerequisites of lib/sockets.c.
33 AC_DEFUN([gl_PREREQ_SOCKETS], [