Skip to content

Commit a48ed12

Browse files
authored
Find and link network library as needed with AC_SEARCH_LIBS (#13553)
This prepends -lnetwork as needed (Haiku) whether linker sees the setsockopt function and avoids defining redundant symbols, such as HAVE_LIBNETWORK and HAVE_SETSOCKOPT.
1 parent 6b6e33d commit a48ed12

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

configure.ac

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,9 @@ esac
375375
dnl Solaris/Illumos for process mapping.
376376
AC_SEARCH_LIBS([Pgrab], [proc])
377377

378+
dnl Haiku does not have network api in libc.
379+
AC_SEARCH_LIBS([setsockopt], [network])
380+
378381
dnl Then headers.
379382
dnl ----------------------------------------------------------------------------
380383

@@ -644,9 +647,6 @@ dnl Some systems (Solaris 10) do not have nanosleep in libc.
644647
AC_CHECK_FUNCS([nanosleep],,
645648
[AC_SEARCH_LIBS([nanosleep], [rt], [AC_DEFINE([HAVE_NANOSLEEP], [1])])])
646649

647-
dnl Haiku does not have network api in libc.
648-
PHP_CHECK_FUNC_LIB(setsockopt, network)
649-
650650
dnl Check for getaddrinfo, should be a better way, but... Also check for working
651651
dnl getaddrinfo.
652652
AC_CACHE_CHECK([for getaddrinfo], ac_cv_func_getaddrinfo,

0 commit comments

Comments
 (0)