Skip to content

Commit 604daff

Browse files
authored
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.
1 parent 807273e commit 604daff

File tree

2 files changed

+14
-21
lines changed

2 files changed

+14
-21
lines changed

Zend/Zend.m4

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -122,21 +122,11 @@ AC_DEFUN([ZEND_CHECK_FLOAT_PRECISION],[
122122
])
123123

124124
dnl
125-
dnl LIBZEND_BASIC_CHECKS
126-
dnl
127-
dnl Basic checks specific for the Zend engine library.
128-
dnl
129-
AC_DEFUN([LIBZEND_BASIC_CHECKS],[
130-
AC_REQUIRE([AC_PROG_CC])
131-
132-
AC_CHECK_HEADERS([cpuid.h])
133-
134-
dnl
135-
dnl LIBZEND_DLSYM_CHECK
125+
dnl ZEND_DLSYM_CHECK
136126
dnl
137127
dnl Ugly hack to check if dlsym() requires a leading underscore in symbol name.
138128
dnl
139-
AC_DEFUN([LIBZEND_DLSYM_CHECK],[
129+
AC_DEFUN([ZEND_DLSYM_CHECK], [dnl
140130
AC_MSG_CHECKING([whether dlsym() requires a leading underscore in symbol names])
141131
_LT_AC_TRY_DLOPEN_SELF([
142132
AC_MSG_RESULT(no)
@@ -148,6 +138,16 @@ _LT_AC_TRY_DLOPEN_SELF([
148138
], [])
149139
])
150140

141+
dnl
142+
dnl ZEND_INIT
143+
dnl
144+
dnl Configure checks and initialization specific for the Zend engine library.
145+
dnl
146+
AC_DEFUN([ZEND_INIT], [dnl
147+
AC_REQUIRE([AC_PROG_CC])
148+
149+
AC_CHECK_HEADERS([cpuid.h])
150+
151151
dnl Check for library functions.
152152
AC_CHECK_FUNCS(m4_normalize([
153153
getpid
@@ -195,12 +195,7 @@ AS_VAR_IF([php_cv_have_stack_limit], [yes],
195195
[Define to 1 if checking the stack limit is supported.])])
196196
197197
ZEND_CHECK_FLOAT_PRECISION
198-
])
199-
200-
dnl
201-
dnl LIBZEND_OTHER_CHECKS
202-
dnl
203-
AC_DEFUN([LIBZEND_OTHER_CHECKS],[
198+
ZEND_DLSYM_CHECK
204199
205200
AC_MSG_CHECKING(whether to enable thread-safety)
206201
AC_MSG_RESULT($ZEND_ZTS)

configure.ac

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1349,9 +1349,7 @@ else
13491349
])
13501350
fi
13511351

1352-
LIBZEND_BASIC_CHECKS
1353-
LIBZEND_DLSYM_CHECK
1354-
LIBZEND_OTHER_CHECKS
1352+
ZEND_INIT
13551353

13561354
PHP_ADD_INCLUDE([$abs_srcdir], [1])
13571355
PHP_ADD_INCLUDE([$abs_srcdir/main], [1])

0 commit comments

Comments
 (0)