ObjFW  Diff

Differences From Artifact [cd621d1afb]:

To Artifact [75b2354c88]:


1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458




1459
1460
1461
1462
1463
1464
1465
1466

1467
1468
1469
1470
1471
1472

1473
1474
1475
1476
1477
1478
1479

1480
1481
1482
1483
1484
1485

1486
1487
1488
1489
1490
1491
1492
1493
1494

1495
1496
1497
1498
1499
1500
1501
1502

1503
1504
1505
1506
1507
1508
1509

1510
1511
1512
1513
1514
1515
1516
1448
1449
1450
1451
1452
1453
1454




1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465

1466
1467
1468
1469
1470
1471

1472
1473
1474
1475
1476
1477
1478

1479
1480
1481
1482
1483
1484

1485
1486
1487
1488
1489
1490
1491
1492
1493

1494
1495
1496
1497
1498
1499
1500
1501

1502
1503
1504
1505
1506
1507
1508

1509
1510
1511
1512
1513
1514
1515
1516







-
-
-
-
+
+
+
+







-
+





-
+






-
+





-
+








-
+







-
+






-
+







			#endif

			#ifdef AF_IPX
			egrep_cpp_yes
			#endif
		], [
			AC_DEFINE(OF_HAVE_IPX, 1, [Whether we have IPX/SPX])
			AC_SUBST(OFIPXSOCKET_M, OFIPXSocket.m)
			AC_SUBST(OFIPXSOCKETTESTS_M, OFIPXSocketTests.m)
			AC_SUBST(OFSPXSOCKET_M, OFSPXSocket.m)
			AC_SUBST(OFSPXSOCKETTESTS_M, OFSPXSocketTests.m)
			AC_SUBST(OF_IPX_SOCKET_M, OFIPXSocket.m)
			AC_SUBST(OF_IPX_SOCKET_TESTS_M, OFIPXSocketTests.m)
			AC_SUBST(OF_SPX_SOCKET_M, OFSPXSocket.m)
			AC_SUBST(OF_SPX_SOCKET_TESTS_M, OFSPXSocketTests.m)
		])
	])

	AC_CHECK_FUNCS(paccept accept4, break)

	AC_CHECK_FUNCS(kqueue1 kqueue, [
		AC_DEFINE(HAVE_KQUEUE, 1, [Whether we have kqueue])
		AC_SUBST(OFKQUEUEKERNELEVENTOBSERVER_M,
		AC_SUBST(OF_KQUEUE_KERNEL_EVENT_OBSERVER_M,
			"OFKqueueKernelEventObserver.m")
		break
	])
	AC_CHECK_FUNCS(epoll_create1 epoll_create, [
		AC_DEFINE(HAVE_EPOLL, 1, [Whether we have epoll])
		AC_SUBST(OFEPOLLKERNELEVENTOBSERVER_M,
		AC_SUBST(OF_EPOLL_KERNEL_EVENT_OBSERVER_M,
			"OFEpollKernelEventObserver.m")
		break
	])

	AS_IF([test x"$with_wii" = x"yes"], [
		AC_DEFINE(HAVE_POLL, 1, [Whether we have poll()])
		AC_SUBST(OFPOLLKERNELEVENTOBSERVER_M,
		AC_SUBST(OF_POLL_KERNEL_EVENT_OBSERVER_M,
			"OFPollKernelEventObserver.m")
	], [
		AC_CHECK_HEADERS(poll.h)
		AC_CHECK_FUNC(poll, [
			AC_DEFINE(HAVE_POLL, 1, [Whether we have poll()])
			AC_SUBST(OFPOLLKERNELEVENTOBSERVER_M,
			AC_SUBST(OF_POLL_KERNEL_EVENT_OBSERVER_M,
				"OFPollKernelEventObserver.m")
		])
	])

	case "$host_os" in
		amigaos* | mingw* | morphos*)
			AC_DEFINE(HAVE_SELECT, 1,
				[Whether we have select() or similar])
			AC_SUBST(OFSELECTKERNELEVENTOBSERVER_M,
			AC_SUBST(OF_SELECT_KERNEL_EVENT_OBSERVER_M,
				"OFSelectKernelEventObserver.m")
			;;
		*)
			AC_CHECK_HEADERS(sys/select.h)
			AC_CHECK_FUNC(select, [
				AC_DEFINE(HAVE_SELECT, 1,
					[Whether we have select() or similar])
				AC_SUBST(OFSELECTKERNELEVENTOBSERVER_M,
				AC_SUBST(OF_SELECT_KERNEL_EVENT_OBSERVER_M,
					"OFSelectKernelEventObserver.m")
			])
			;;
	esac

	AS_IF([test x"$enable_threads" != x"no"], [
		AC_SUBST(OFHTTPCLIENTTESTS_M, "OFHTTPClientTests.m")
		AC_SUBST(OF_HTTP_CLIENT_TESTS_M, "OFHTTPClientTests.m")
	])

	AC_SUBST(OFDNS, "ofdns")
	AS_IF([test x"$enable_files" != x"no"], [
		AC_SUBST(OFHTTP, "ofhttp")
	])
])
1569
1570
1571
1572
1573
1574
1575
1576

1577
1578
1579
1580
1581
1582
1583
1569
1570
1571
1572
1573
1574
1575

1576
1577
1578
1579
1580
1581
1582
1583







-
+







			], [
				break
			])
		])
		;;
esac
AS_IF([test x"$have_processes" = x"yes"], [
	AC_SUBST(OFPROCESS_M, "OFProcess.m")
	AC_SUBST(OF_PROCESS_M, "OFProcess.m")
	AC_DEFINE(OF_HAVE_PROCESSES, 1, [Whether we have processes])
])

AC_CHECK_HEADERS_ONCE([complex.h sys/ioctl.h sys/ttycom.h])

AC_CHECK_FUNC(pledge, [
	AC_DEFINE(OF_HAVE_PLEDGE, 1, [Whether we have pledge()])
1609
1610
1611
1612
1613
1614
1615
1616

1617
1618
1619
1620
1621
1622
1623
1609
1610
1611
1612
1613
1614
1615

1616
1617
1618
1619
1620
1621
1622
1623







-
+







old_OBJCFLAGS="$OBJCFLAGS"
OBJCFLAGS="$OBJCFLAGS -Xclang -fblocks"
AC_TRY_COMPILE([], [
	int (^foo)(int bar);
	foo = ^ (int bar) { return 0; }
], [
	OBJFW_OBJCFLAGS="$OBJFW_OBJCFLAGS -Xclang -fblocks"
	AC_SUBST(OFBLOCKTESTS_M, "OFBlockTests.m")
	AC_SUBST(OF_BLOCK_TESTS_M, "OFBlockTests.m")
	AC_MSG_RESULT(yes)
], [
	AC_MSG_RESULT(no)
	OBJCFLAGS="$old_OBJCFLAGS"
])

AS_IF([test x"$GOBJC" = x"yes"], [