Autotools: Append rt library to FPM_EXTRA_LIBS (#15059)

This appends the possible rt library as needed on Solaris <= 10 to
FPM_EXTRA_LIBS instead of the global LIBS variable for all SAPIs to have
cleaner build. The possible required rt library for other SAPIs is also
checked in the configure.ac.
This commit is contained in:
Peter Kokot 2024-07-22 17:19:55 +02:00 committed by GitHub
parent 82479e89d0
commit 2f0bb9293c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,11 +6,17 @@ PHP_ARG_ENABLE([fpm],
[no])
dnl Configure checks.
AC_DEFUN([PHP_FPM_CLOCK],
[AC_CHECK_FUNCS([clock_gettime],,
[AC_SEARCH_LIBS([clock_gettime], [rt],
[ac_cv_func_clock_gettime=yes
AC_DEFINE([HAVE_CLOCK_GETTIME], [1])])])
AC_DEFUN([PHP_FPM_CLOCK], [
AC_CHECK_FUNCS([clock_gettime],, [
LIBS_save=$LIBS
AC_SEARCH_LIBS([clock_gettime], [rt], [
ac_cv_func_clock_gettime=yes
AC_DEFINE([HAVE_CLOCK_GETTIME], [1])
AS_VAR_IF([ac_cv_search_clock_gettime], ["none required"],,
[AS_VAR_APPEND([FPM_EXTRA_LIBS], [" $ac_cv_search_clock_gettime"])])
])
LIBS=$LIBS_save
])
AS_VAR_IF([ac_cv_func_clock_gettime], [no],
[AC_CACHE_CHECK([for clock_get_time], [php_cv_func_clock_get_time],