aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-10-13 14:15:22 -0700
committerH. Peter Anvin <hpa@zytor.com>2018-10-13 14:15:22 -0700
commit74d3ee838199bf294a4795940be5c2105d4a673c (patch)
tree66d09884569ac5d6add7c72136998d27f6cc20ae
parentf4bae3a455e2aa03c8f3b9647e323ac5f74b6992 (diff)
downloadgrv-74d3ee838199bf294a4795940be5c2105d4a673c.tar.gz
grv-74d3ee838199bf294a4795940be5c2105d4a673c.tar.xz
grv-74d3ee838199bf294a4795940be5c2105d4a673c.zip
Hack for detecting -lws2_32
On 32-bit Windows, -lws2_32 uses stdcall, which AC_CHECK_LIBS() won't find since it doesn't include the call prototype.
-rw-r--r--configure.ac5
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index b3db1f6..3c0a6ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -90,8 +90,13 @@ AC_SUBST(ALLPROGS)
AC_CHECK_FUNCS([flock], [ALLPROGS="$ALLPROGS grvscored\$(X)"])
dnl Libraries needed
+AC_CHECK_HEADERS(winsock2.h, [LIBS="$LIBS -lws2_32"])
AC_SEARCH_LIBS([exp],[m])
AC_SEARCH_LIBS([socket],[socket ws2_32])
+AC_SEARCH_LIBS([gethostbyname],[nsl])
+
+dnl Address query
+AC_CHECK_FUNCS([getaddrinfo])
dnl
dnl Check for supported gcc attributes; some compilers (e.g. Sun CC)