Skip to content

Commit ed67c37

Browse files
committed
Find and link math library as needed with AC_SEARCH_LIBS
On some systems (Haiku) the math library is part of the C library and it doesn't need to be explicitly prepended to LIBS. The redundant HAVE_LIBM symbol defined by the AC_CHECK_LIB has been removed.
1 parent e9f8def commit ed67c37

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
lines changed

UPGRADING.INTERNALS

+1
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ PHP 8.4 INTERNALS UPGRADE NOTES
6868
- Symbol HAVE_BSD_ICONV has been removed.
6969
- Symbol ZEND_FIBER_ASM has been removed.
7070
- Symbols HAVE_DLOPEN and HAVE_DLSYM have been removed.
71+
- Symbol HAVE_LIBM has been removed.
7172
- M4 macro PHP_DEFINE (atomic includes) removed (use AC_DEFINE and config.h).
7273
- M4 macro PHP_WITH_SHARED has been removed (use PHP_ARG_WITH).
7374
- M4 macro PHP_STRUCT_FLOCK has been removed (use AC_CHECK_TYPES).

configure.ac

+1-1
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ PHP_CHECK_FUNC(gethostname, nsl, network)
364364
PHP_CHECK_FUNC(gethostbyaddr, nsl, network)
365365
AC_SEARCH_LIBS([dlopen], [dl],
366366
[AC_DEFINE([HAVE_LIBDL], [1], [Define to 1 if the dl library is available.])])
367-
AC_CHECK_LIB(m, sin)
367+
AC_SEARCH_LIBS([sin], [m])
368368

369369
case $host_alias in
370370
riscv64*)

win32/build/config.w32.h.in

-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@
8686
#undef HAVE_ALLOCA_H
8787
#undef HAVE_KILL
8888
#define HAVE_GETPID 1
89-
#define HAVE_LIBM 1
9089
#undef HAVE_RINT
9190
/* int and long are still 32bit in 64bit compiles */
9291
#define SIZEOF_INT 4

0 commit comments

Comments
 (0)