File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,9 +37,17 @@ if test "$PHP_CLI" != "no"; then
3737 dnl Select SAPI.
3838 PHP_SELECT_SAPI([ cli] ,
3939 [ program] ,
40- [ php_cli.c php_cli_main.c php_http_parser.c php_cli_server.c ps_title.c php_cli_process_title .c] ,
40+ [ php_cli_main.c] ,
4141 [ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1] )
4242
43+ dnl Everything except the main() entry point, so that the embed SAPI can link
44+ dnl the same objects into libphp for do_php_cli().
45+ PHP_ADD_SOURCES_X([ sapi/cli] ,
46+ [ php_cli.c php_http_parser.c php_cli_server.c ps_title.c php_cli_process_title.c] ,
47+ [ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1] ,
48+ [ PHP_CLI_SHARED_OBJS] )
49+ PHP_CLI_OBJS="$PHP_CLI_OBJS $PHP_CLI_SHARED_OBJS"
50+
4351 AS_CASE ( [ $host_alias] ,
4452 [ *aix*] , [
4553 AS_VAR_IF ( [ php_sapi_module] , [ shared] , [
Original file line number Diff line number Diff line change @@ -27,12 +27,8 @@ if test "$PHP_EMBED" != "no"; then
2727 [ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1] )
2828 PHP_INSTALL_HEADERS([ sapi/embed] , [ php_embed.h] )
2929
30- dnl Include CLI sources for do_php_cli() in libphp.
31- dnl We rebuild them here because cli isn't guaranteed to compile with -fPIC
32- PHP_ADD_SOURCES([ sapi/cli] ,
33- [ php_cli.c php_http_parser.c php_cli_server.c ps_title.c php_cli_process_title.c] ,
34- [ -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1] ,
35- [ sapi] )
30+ dnl Link the CLI objects into libphp for do_php_cli().
31+ PHP_SAPI_OBJS="$PHP_SAPI_OBJS $PHP_CLI_SHARED_OBJS"
3632 ] )
3733else
3834 AC_MSG_RESULT ( [ no] )
You can’t perform that action at this time.
0 commit comments