ObjFW  Check-in [fd6a6cbafd]

Overview
Comment: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.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fd6a6cbafd38185304756c1b59cfb9ea72ff283d5d4c3dcd9e357537f539007b
User & Date: js on 2018-09-05 20:27:55
Other Links: manifest | tags
Context
2018-09-09
14:32
PLATFORMS.md: Update macOS, add Darling check-in: 02e92f88aa user: js tags: trunk
2018-09-05
20:27
configure: Only use -lnetwork on Haiku check-in: fd6a6cbafd user: js tags: trunk
2018-08-27
23:21
socket.m: Clean up #ifdefs check-in: fa952c4c48 user: js tags: trunk
Changes

Modified configure.ac from [a4388d2557] to [0dca5ff784].

1193
1194
1195
1196
1197
1198
1199
1200
1201
1202









1203
1204
1205
1206
1207
1208
1209
1193
1194
1195
1196
1197
1198
1199



1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215







-
-
-
+
+
+
+
+
+
+
+
+







AC_ARG_ENABLE(sockets,
	AS_HELP_STRING([--disable-sockets], [disable socket support]))
AS_IF([test x"$enable_sockets" != x"no"], [
	AC_DEFINE(OF_HAVE_SOCKETS, 1, [Whether we have sockets])
	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,
			[Whether we have sys/socket.h])
	])
	AC_CHECK_HEADER(netinet/in.h, [
		AC_DEFINE(OF_HAVE_NETINET_IN_H, 1,