Ticket #5077: yj5DfhUg.txt

File yj5DfhUg.txt, 862 bytes (added by asn, 8 years ago)
Line 
1diff --git a/configure.ac b/configure.ac
2index 90c4f9f..7e7c604 100644
3--- a/configure.ac
4+++ b/configure.ac
5@@ -42,11 +42,16 @@ AM_CONDITIONAL(NEED_SHA256, [test x$ac_cv_func_SHA256_Init = xno])
6 
7 # ntohl and a bunch of related functions require a special library on Windows.
8 # It is possible that libevent or libcrypto has hooked us up already.
9-# This can't be done with AC_SEARCH_LIBS -- see m4/winsock.m4 for gory details.
10 save_LIBS="$LIBS"
11-LIBS="$libevent_LIBS $libcrypto_LIBS"
12-AX_LIB_WINSOCK2
13+LIBS="$LIBS $libevent_LIBS $libcrypto_LIBS -lws2_32"
14+AC_MSG_CHECKING([for library containing ntohl])
15+AC_TRY_LINK([#include <winsock2.h>],
16+    [ return (int)ntohl(42); ],
17+    [ ac_cv_implements_ntohl="yes" ],
18+    [ ac_cv_implements_ntohl="no"
19+])
20 LIBS="$save_LIBS"
21+AC_MSG_RESULT([$ac_cv_implements_ntohl])
22 
23 ### C features ###