Skip to content

Commit 059fe19

Browse files
committed
force feature checks on cli sapi to run when we use embed sapi
1 parent fd33542 commit 059fe19

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

sapi/cli/config.m4

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ PHP_ARG_ENABLE([cli],
55
[yes],
66
[no])
77

8-
if test "$PHP_CLI" != "no"; then
8+
dnl Embed SAPI builds cli files too, so run the feature checks
9+
if test "$PHP_CLI" != "no" || test "$PHP_EMBED" != "no"; then
910
AC_CHECK_FUNCS([setproctitle])
1011

1112
AC_CHECK_HEADERS([sys/pstat.h])
@@ -23,7 +24,9 @@ if test "$PHP_CLI" != "no"; then
2324
[php_cv_var_PS_STRINGS=no])])
2425
AS_VAR_IF([php_cv_var_PS_STRINGS], [yes],
2526
[AC_DEFINE([HAVE_PS_STRINGS], [], [Define if the PS_STRINGS exists.])])
27+
fi
2628

29+
if test "$PHP_CLI" != "no"; then
2730
PHP_ADD_MAKEFILE_FRAGMENT([$abs_srcdir/sapi/cli/Makefile.frag])
2831

2932
dnl Set filename.

sapi/embed/config.m4

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
PHP_ARG_ENABLE([embed],,
2-
[AS_HELP_STRING([[--enable-embed[=TYPE]]],
3-
[Enable building of embedded SAPI library TYPE is either
4-
'shared' or 'static'. [TYPE=shared]])],
5-
[no],
6-
[no])
7-
81
AC_MSG_CHECKING([for embedded SAPI library support])
92

103
if test "$PHP_EMBED" != "no"; then
@@ -39,7 +32,6 @@ if test "$PHP_EMBED" != "no"; then
3932
PHP_SAPI_OBJS="$PHP_SAPI_OBJS sapi/embed/cli/php_cli.lo sapi/embed/cli/php_http_parser.lo sapi/embed/cli/php_cli_server.lo sapi/embed/cli/ps_title.lo sapi/embed/cli/php_cli_process_title.lo"
4033
4134
PHP_INSTALL_HEADERS([sapi/embed], [php_embed.h])
42-
PHP_INSTALL_HEADERS([sapi/cli], [cli.h])
4335
])
4436
else
4537
AC_MSG_RESULT([no])

sapi/embed/config0.m4

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
dnl Check if embed SAPI is enable before running CLI SAPI feature checks, they are required for embed's do_php_cli too
2+
PHP_ARG_ENABLE([embed],,
3+
[AS_HELP_STRING([[--enable-embed[=TYPE]]],
4+
[Enable building of embedded SAPI library TYPE is either
5+
'shared' or 'static'. [TYPE=shared]])],
6+
[no],
7+
[no])

0 commit comments

Comments
 (0)