]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Add HAVE_WINSOCK.
authorSimon Josefsson <simon@josefsson.org>
Fri, 16 Jun 2006 12:16:16 +0000 (12:16 +0000)
committerSimon Josefsson <simon@josefsson.org>
Fri, 16 Jun 2006 12:16:16 +0000 (12:16 +0000)
configure.in

index d358b41e6d6838f6ca32e57a99967b3c1856367e..ede9faea0681a48eb8df374ec04667bbcf181dba 100644 (file)
@@ -515,6 +515,17 @@ AC_MSG_RESULT([***
 ])
 gl_INIT
 
+AC_TRY_LINK([#include <winsock2.h>], [
+  WORD wVersionRequested = MAKEWORD(2, 2);
+  WSADATA wsaData;
+  int err = WSAStartup(wVersionRequested, &wsaData);
+  WSACleanup ();], wsastartup=yes, wsastartup=no)
+if test x$wsastartup = xyes; then
+  AC_DEFINE(HAVE_WINSOCK, 1, [Call WSAStartup in gnutls_global_init])
+fi
+AC_MSG_CHECKING([if we have Windows sockets and WSAStartup/WSACleanup])
+AC_MSG_RESULT($wsastartup)
+
 AC_MSG_RESULT([***
 *** Detecting options for shared libraries...
 ])