summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Schleifer <js@heap.zone>2018-09-05 22:27:55 +0200
committerJonathan Schleifer <js@heap.zone>2018-09-05 22:27:55 +0200
commit05cb816d8d7f1138293e51191febef21dce11f15 (patch)
tree91e695ad3809c0e3da73d8e5eea95a598a2bd21a
parent22fe7ca9b55116e1901577476b3059cb37650d83 (diff)
configure: Only use -lnetwork on Haiku
libnetwork also exists on Darwin, but is for different things. While at it, only add the Windows-specific libraries on Windows.
-rw-r--r--configure.ac12
1 files changed, 9 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac
index 383c6a62..65b780e3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1197,9 +1197,15 @@ AS_IF([test x"$enable_sockets" != x"no"], [
AC_SUBST(USE_SRCS_SOCKETS, '${SRCS_SOCKETS}')
AC_CHECK_LIB(socket, socket, LIBS="$LIBS -lsocket")
- AC_CHECK_LIB(network, socket, LIBS="$LIBS -lnetwork")
- AC_CHECK_LIB(ws2_32, main, LIBS="$LIBS -lws2_32")
- AC_CHECK_LIB(iphlpapi, main, LIBS="$LIBS -liphlpapi")
+
+ case "$host_os" in
+ mingw*)
+ LIBS="$LIBS -lws2_32 -liphlpapi"
+ ;;
+ haiku*)
+ LIBS="$LIBS -lnetwork"
+ ;;
+ esac
AC_CHECK_HEADER(sys/socket.h, [
AC_DEFINE(OF_HAVE_SYS_SOCKET_H, 1,