Skip to content

Commit ddee033

Browse files
committed
fix compilation
1 parent 5794331 commit ddee033

3 files changed

Lines changed: 9 additions & 4 deletions

File tree

main/cli/cli.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
#ifndef CLI_H
1818
#define CLI_H
1919

20+
#include "php.h"
21+
2022
#ifdef PHP_WIN32
2123
# define PHP_CLI_API __declspec(dllexport)
2224
#elif defined(__GNUC__) && __GNUC__ >= 4

sapi/cli/config.m4

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,10 @@ if test "$PHP_CLI" != "no"; then
3535
[php_cli_main.c],
3636
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
3737

38-
PHP_ADD_SOURCES([main/cli],
38+
PHP_ADD_SOURCES_X([main/cli],
3939
[php_cli.c php_http_parser.c php_cli_server.c ps_title.c php_cli_process_title.c],
40-
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
40+
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1],
41+
[PHP_CLI_OBJS])
4142

4243
AS_CASE([$host_alias],
4344
[*aix*], [

sapi/embed/config.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,10 @@ if test "$PHP_EMBED" != "no"; then
5252
AS_VAR_IF([php_cv_var_PS_STRINGS], [yes],
5353
[AC_DEFINE([HAVE_PS_STRINGS], [], [Define if the PS_STRINGS exists.])])
5454
55-
dnl When CLI SAPI is also enabled, these are already in PHP_GLOBAL_OBJS.
56-
if test "$PHP_CLI" = "no"; then
55+
dnl When CLI SAPI is also enabled, sources are already compiled into PHP_CLI_OBJS
56+
if test "$PHP_CLI" != "no"; then
57+
PHP_SAPI_OBJS="$PHP_SAPI_OBJS main/cli/php_cli.lo main/cli/php_http_parser.lo main/cli/php_cli_server.lo main/cli/ps_title.lo main/cli/php_cli_process_title.lo"
58+
else
5759
PHP_ADD_SOURCES([main/cli],
5860
[php_cli.c php_http_parser.c php_cli_server.c ps_title.c php_cli_process_title.c],
5961
[-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1],

0 commit comments

Comments
 (0)