Skip to content

Commit e9f8def

Browse files
authored
Find and link dl library as needed with AC_SEARCH_LIBS (#13482)
AC_SEARCH_LIBS can be used to check for dlopen and if dl library needs to be prepended to LIBS. The dlsym is available with the same scope as dlopen (if dlopen is present, also dlsym is). The redundant HAVE_DLOPEN and HAVE_DLSYM symbols have been removed.
1 parent 657167f commit e9f8def

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

UPGRADING.INTERNALS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
6767
- Symbol MISSING_FCLOSE_DECL and M4 macro PHP_MISSING_FCLOSE_DECL removed.
6868
- Symbol HAVE_BSD_ICONV has been removed.
6969
- Symbol ZEND_FIBER_ASM has been removed.
70+
- Symbols HAVE_DLOPEN and HAVE_DLSYM have been removed.
7071
- M4 macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and config.h).
7172
- M4 macro PHP_WITH_SHARED has been removed (use PHP_ARG_WITH).
7273
- M4 macro PHP_STRUCT_FLOCK has been removed (use AC_CHECK_TYPES).

configure.ac

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,8 @@ PHP_CHECK_FUNC(socketpair, socket, network)
362362
PHP_CHECK_FUNC(htonl, socket, network)
363363
PHP_CHECK_FUNC(gethostname, nsl, network)
364364
PHP_CHECK_FUNC(gethostbyaddr, nsl, network)
365-
PHP_CHECK_FUNC(dlopen, dl)
366-
PHP_CHECK_FUNC(dlsym, dl)
367-
if test "$ac_cv_func_dlopen" = "yes"; then
368-
AC_DEFINE(HAVE_LIBDL, 1, [ ])
369-
fi
365+
AC_SEARCH_LIBS([dlopen], [dl],
366+
[AC_DEFINE([HAVE_LIBDL], [1], [Define to 1 if the dl library is available.])])
370367
AC_CHECK_LIB(m, sin)
371368

372369
case $host_alias in

0 commit comments

Comments
 (0)