Skip to content

Commit faabb69

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 171e398 commit faabb69

File tree

3 files changed

+2
-2
lines changed

3 files changed

+2
-2
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+
- Symbol HAVE_LIBM has 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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ PHP_CHECK_FUNC(dlsym, dl)
367367
if test "$ac_cv_func_dlopen" = "yes"; then
368368
AC_DEFINE(HAVE_LIBDL, 1, [ ])
369369
fi
370-
AC_CHECK_LIB(m, sin)
370+
AC_SEARCH_LIBS([sin], [m])
371371

372372
case $host_alias in
373373
riscv64*)

win32/build/config.w32.h.in

Lines changed: 0 additions & 1 deletion
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)