Skip to content

Commit 9a9e178

Browse files
authored
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.
1 parent 53cb896 commit 9a9e178

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

ext/opcache/config.m4

+7-7
Original file line numberDiff line numberDiff line change
@@ -313,16 +313,16 @@ int main(void) {
313313
[php_cv_shm_mmap_posix=no],
314314
[php_cv_shm_mmap_posix=no])
315315
])
316-
317-
AS_VAR_IF([php_cv_shm_mmap_posix], [yes], [
318-
AS_VAR_IF([ac_cv_search_shm_open], ["none required"],,
319-
[OPCACHE_SHARED_LIBADD="$OPCACHE_SHARED_LIBADD $ac_cv_search_shm_open"])
320-
AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1],
321-
[Define to 1 if you have the POSIX mmap() SHM support.])
322-
])
323316
])
324317
LIBS=$LIBS_save
325318

319+
AS_VAR_IF([php_cv_shm_mmap_posix], [yes], [
320+
AC_DEFINE([HAVE_SHM_MMAP_POSIX], [1],
321+
[Define to 1 if you have the POSIX mmap() SHM support.])
322+
AS_CASE([$ac_cv_search_shm_open], ["none required"|no], [],
323+
[PHP_EVAL_LIBLINE([$ac_cv_search_shm_open], [OPCACHE_SHARED_LIBADD])])
324+
])
325+
326326
PHP_NEW_EXTENSION([opcache], m4_normalize([
327327
shared_alloc_mmap.c
328328
shared_alloc_posix.c

0 commit comments

Comments
 (0)