Rename and refactor Zend.m4 macros (#14671)

- LIBZEND_* -> ZEND_*
- A single "public" initialization M4 macro ZEND_INIT that wraps Zend
  engine related configure step checks and initialization.
This commit is contained in:
Peter Kokot 2024-06-26 22:57:01 +02:00 committed by GitHub
parent 807273e263
commit 604dafff3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 14 additions and 21 deletions

View File

@ -122,21 +122,11 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
])
dnl
dnl LIBZEND_BASIC_CHECKS
dnl
dnl Basic checks specific for the Zend engine library.
dnl
AC_DEFUN([LIBZEND_BASIC_CHECKS],[
AC_REQUIRE([AC_PROG_CC])
AC_CHECK_HEADERS([cpuid.h])
dnl
dnl LIBZEND_DLSYM_CHECK
dnl ZEND_DLSYM_CHECK
dnl
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
dnl
AC_DEFUN([LIBZEND_DLSYM_CHECK],[
AC_DEFUN([ZEND_DLSYM_CHECK], [dnl
AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names])
_LT_AC_TRY_DLOPEN_SELF([
AC_MSG_RESULT(no)
@ -148,6 +138,16 @@ _LT_AC_TRY_DLOPEN_SELF([
], [])
])
dnl
dnl ZEND_INIT
dnl
dnl Configure checks and initialization specific for the Zend engine library.
dnl
AC_DEFUN([ZEND_INIT], [dnl
AC_REQUIRE([AC_PROG_CC])
AC_CHECK_HEADERS([cpuid.h])
dnl Check for library functions.
AC_CHECK_FUNCS(m4_normalize([
getpid
@ -195,12 +195,7 @@ AS_VAR_IF([php_cv_have_stack_limit], [yes],
[Define to 1 if checking the stack limit is supported.])])
ZEND_CHECK_FLOAT_PRECISION
])
dnl
dnl LIBZEND_OTHER_CHECKS
dnl
AC_DEFUN([LIBZEND_OTHER_CHECKS],[
ZEND_DLSYM_CHECK
AC_MSG_CHECKING(whether to enable thread-safety)
AC_MSG_RESULT($ZEND_ZTS)

View File

@ -1349,9 +1349,7 @@ else
])
fi
LIBZEND_BASIC_CHECKS
LIBZEND_DLSYM_CHECK
LIBZEND_OTHER_CHECKS
ZEND_INIT
PHP_ADD_INCLUDE([$abs_srcdir], [1])
PHP_ADD_INCLUDE([$abs_srcdir/main], [1])