@@ -3,12 +3,15 @@ dnl $Id$
33dnl
44
55PHP_ARG_ENABLE(phpdbg, for phpdbg support,
6- [ --enable-phpdbg Build phpdbg] , no, no)
6+ [ --enable-phpdbg Build phpdbg] , no, no)
7+
8+ PHP_ARG_ENABLE(phpdbg-webhelper, for phpdbg web SAPI support,
9+ [ --enable-phpdbg-webhelper Build phpdbg web SAPI support] , yes, yes)
710
811PHP_ARG_ENABLE(phpdbg-debug, for phpdbg debug build,
9- [ --enable-phpdbg-debug Build phpdbg in debug mode] , no, no)
12+ [ --enable-phpdbg-debug Build phpdbg in debug mode] , no, no)
1013
11- if test "$PHP_PHPDBG" != "no"; then
14+ if test "$BUILD_PHPDBG" == "" && test "$ PHP_PHPDBG" != "no"; then
1215 AC_HEADER_TIOCGWINSZ
1316 AC_DEFINE ( HAVE_PHPDBG , 1 , [ ] )
1417
@@ -18,8 +21,19 @@ if test "$PHP_PHPDBG" != "no"; then
1821 AC_DEFINE ( PHPDBG_DEBUG , 0 , [ ] )
1922 fi
2023
24+ if test "$PHP_PHPDBG_WEBHELPER" != "no"; then
25+ if ! test -d ext/phpdbg_webhelper; then
26+ ln -s ../sapi/phpdbg ext/phpdbg_webhelper
27+ fi
28+ if test "$PHP_JSON" != "no"; then
29+ PHP_NEW_EXTENSION(phpdbg_webhelper, phpdbg_rinit_hook.c phpdbg_webdata_transfer.c, $ext_shared)
30+ else
31+ AC_MSG_ERROR ( Webhelper extension of phpdbg needs json enabled )
32+ fi
33+ fi
34+
2135 PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE"
22- PHP_PHPDBG_FILES="phpdbg.c phpdbg_parser.c phpdbg_lexer.c phpdbg_prompt.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_info.c phpdbg_cmd.c phpdbg_set.c phpdbg_frame.c phpdbg_watch.c phpdbg_btree.c"
36+ PHP_PHPDBG_FILES="phpdbg.c phpdbg_parser.c phpdbg_lexer.c phpdbg_prompt.c phpdbg_help.c phpdbg_break.c phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c phpdbg_info.c phpdbg_cmd.c phpdbg_set.c phpdbg_frame.c phpdbg_watch.c phpdbg_btree.c phpdbg_sigsafe.c phpdbg_wait.c phpdbg_io.c phpdbg_eol.c phpdbg_out.c "
2337
2438 if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
2539 PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS"
0 commit comments