From 9a9e178328f936683fa568e53018adbdf0c05521 Mon Sep 17 00:00:00 2001 From: Peter Kokot Date: Wed, 4 Sep 2024 00:43:21 +0200 Subject: [PATCH] Autotools: Enhance appending -lrt (#15719) If the opcache extension would be built statically one day this also takes care of this to make the check more ubiquitous. --- ext/opcache/config.m4 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ext/opcache/config.m4 b/ext/opcache/config.m4 index 0c50f701b20..40bc46facae 100644 --- a/ext/opcache/config.m4 +++ b/ext/opcache/config.m4 @@ -313,16 +313,16 @@ int main(void) { [php_cv_shm_mmap_posix=no], [php_cv_shm_mmap_posix=no]) ]) - - AS_VAR_IF([php_cv_shm_mmap_posix], [yes], [ - AS_VAR_IF([ac_cv_search_shm_open], ["none required"],, - [OPCACHE_SHARED_LIBADD="$OPCACHE_SHARED_LIBADD $ac_cv_search_shm_open"]) - AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1], - [Define to 1 if you have the POSIX mmap() SHM support.]) - ]) ]) LIBS=$LIBS_save + AS_VAR_IF([php_cv_shm_mmap_posix], [yes], [ + AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1], + [Define to 1 if you have the POSIX mmap() SHM support.]) + AS_CASE([$ac_cv_search_shm_open], ["none required"|no], [], + [PHP_EVAL_LIBLINE([$ac_cv_search_shm_open], [OPCACHE_SHARED_LIBADD])]) + ]) + PHP_NEW_EXTENSION([opcache], m4_normalize([ shared_alloc_mmap.c shared_alloc_posix.c