From a0b821b543a89056c60ffe2baa1db3841d9aeefe Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Sun, 10 Mar 2024 06:53:39 +0100 Subject: [PATCH] Check library containing socket() with AC_SEARCH_LIBS (#13642) Solaris/illumos systems have socket() in the socket library, Haiku has it in network, Windows in ws2_32, and other systems in libc. This also removes redundant and unused HAVE_SOCKET symbol. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index b1ebb74b85b..f5d8688ce7a 100644 --- a/configure.ac +++ b/configure.ac @@ -357,7 +357,7 @@ dnl Some systems (OpenServer 5) dislike -lsocket -lnsl, so we try to avoid -lnsl dnl checks, if we already have the functions which are usually in libnsl. Also, dnl uClibc will bark at linking with glibc's libnsl. -PHP_CHECK_FUNC(socket, socket, network) +AC_SEARCH_LIBS([socket], [socket network]) PHP_CHECK_FUNC(socketpair, socket, network) PHP_CHECK_FUNC(gethostname, nsl, network) PHP_CHECK_FUNC(gethostbyaddr, nsl, network)