From: Frederic Marchal Date: Fri, 25 Jan 2013 20:58:31 +0000 (+0100) Subject: Ugly patch to link on Windows X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cda22ffb5a2f3c7d7ce5070a9a2586db4113aec2;p=thirdparty%2Fsarg.git Ugly patch to link on Windows Library ws2_32 is required when compiling on Windows but the autoconf macro to test for a library doesn't work due to the special declaration of the functions in that library. --- diff --git a/configure.in b/configure.in index eb6ccb4..0f90762 100644 --- a/configure.in +++ b/configure.in @@ -197,6 +197,12 @@ AC_CHECK_FUNCS(fnmatch) dnl check for structure members AC_CHECK_MEMBER([struct sockaddr_storage.ss_len],[AC_DEFINE([HAVE_SOCKADDR_SA_LEN],1,[ss_len in sockaddr_storage])]) +dnl windows require this library +if test $ac_cv_header_winsock_h = "yes" ; then +# AC_CHECK_LIBS([ws2_32],[WSAGetLastError]) fails because of the __stdcall in the function prototype + LIBS="$LIBS -lws2_32" +fi + dnl check for the rlim_t size AC_CHECK_SIZEOF(rlim_t,1,[#if HAVE_SYS_RESOURCE_H #include