X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fsockets.m4;h=b407391cd19df7a8a19413ce2c473785faea072f;hb=43593319b31e6b0175b8eec4433bac744959822d;hp=615b6e87208187735d5ab7b33b4b748580f674f4;hpb=bb2bf54fe80c58cf9ed9cb71447743060970d198;p=gnulib.git diff --git a/m4/sockets.m4 b/m4/sockets.m4 index 615b6e872..b407391cd 100644 --- a/m4/sockets.m4 +++ b/m4/sockets.m4 @@ -1,31 +1,13 @@ -# sockets.m4 serial 1 -dnl Copyright (C) 2008 Free Software Foundation, Inc. +# sockets.m4 serial 7 +dnl Copyright (C) 2008-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_SOCKETS], [ - AC_REQUIRE([gl_HEADER_SYS_SOCKET])dnl for HAVE_SYS_SOCKET_H, HAVE_WINSOCK2_H - - AC_CACHE_CHECK([if we need to call WSAStartup in winsock2.h and -lws2_32], - [gl_cv_func_wsastartup], [ - am_save_LIBS="$LIBS" - LIBS="$LIBS -lws2_32" - AC_TRY_LINK([ -#ifdef HAVE_WINSOCK2_H -# include -#endif], [ - WORD wVersionRequested = MAKEWORD(1, 1); - WSADATA wsaData; - int err = WSAStartup(wVersionRequested, &wsaData); - WSACleanup ();], - gl_cv_func_wsastartup=yes, gl_cv_func_wsastartup=no) - LIBS="$am_save_LIBS"]) - if test "$gl_cv_func_wsastartup" = "yes"; then - AC_DEFINE([WINDOWS_SOCKETS], 1, [Define if WSAStartup is needed.]) - LIBS="$LIBS -lws2_32" - fi + AC_REQUIRE([AC_C_INLINE]) + AC_REQUIRE([gl_SOCKETLIB]) gl_PREREQ_SOCKETS ])