Skip to content

Commit 6e57550

Browse files
authored
Autotools: Normalize DTrace sources argument (#15111)
Using the m4_normalize, the source files can be added more intuitively using blank-or-newline delimited list of files. This adds also some basic help text.
1 parent 2141094 commit 6e57550

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

build/php.m4

+6-1
Original file line numberDiff line numberDiff line change
@@ -2270,6 +2270,11 @@ AS_VAR_IF([php_cv_have_write_stdout], [yes],
22702270
dnl
22712271
dnl PHP_INIT_DTRACE(providerdesc, header-file, sources [, module])
22722272
dnl
2273+
dnl Initialize the DTrace support using the DTrace "providerdesc" file and
2274+
dnl generate "header-file". The "sources" is a blank-or-newline-separated list
2275+
dnl of files. The optional "module" is PHP extension name or path when used in
2276+
dnl extensions.
2277+
dnl
22732278
AC_DEFUN([PHP_INIT_DTRACE],
22742279
[AC_CHECK_HEADER([sys/sdt.h],,
22752280
[AC_MSG_ERROR([Cannot find sys/sdt.h which is required for DTrace support.])])
@@ -2308,7 +2313,7 @@ dnl Add providerdesc.o or .lo into global objects when needed.
23082313
23092314
dnl DTrace objects.
23102315
old_IFS=[$]IFS
2311-
for ac_src in $3; do
2316+
for ac_src in m4_normalize([$3]); do
23122317
IFS=.
23132318
set $ac_src
23142319
ac_obj=[$]1

configure.ac

+8-5
Original file line numberDiff line numberDiff line change
@@ -1020,11 +1020,14 @@ PHP_ARG_ENABLE([dtrace],
10201020
[no])
10211021

10221022
AS_VAR_IF([PHP_DTRACE], [yes],
1023-
[PHP_INIT_DTRACE([Zend/zend_dtrace.d],
1024-
[Zend/zend_dtrace_gen.h],
1025-
[main/main.c Zend/zend_API.c \
1026-
Zend/zend_execute.c Zend/zend_exceptions.c \
1027-
Zend/zend_dtrace.c Zend/zend.c])])
1023+
[PHP_INIT_DTRACE([Zend/zend_dtrace.d], [Zend/zend_dtrace_gen.h], [
1024+
main/main.c
1025+
Zend/zend_API.c
1026+
Zend/zend_dtrace.c
1027+
Zend/zend_exceptions.c
1028+
Zend/zend_execute.c
1029+
Zend/zend.c
1030+
])])
10281031

10291032
AC_MSG_CHECKING([how big to make fd sets])
10301033
PHP_ARG_ENABLE([fd-setsize],,

0 commit comments

Comments
 (0)