@@ -11,6 +11,9 @@ PHP_ARG_ENABLE(phpdbg-webhelper, for phpdbg web SAPI support,
1111PHP_ARG_ENABLE(phpdbg-debug, for phpdbg debug build,
1212[ --enable-phpdbg-debug Build phpdbg in debug mode] , no, no)
1313
14+ PHP_ARG_ENABLE(phpdbg-readline, for phpdbg readline support,
15+ [ --enable-phpdbg-readline Enable readline support in phpdbg (depends on static ext/readline)] , yes, yes)
16+
1417if test "$BUILD_PHPDBG" = "" && test "$PHP_PHPDBG" != "no"; then
1518 AC_HEADER_TIOCGWINSZ
1619 AC_DEFINE ( HAVE_PHPDBG , 1 , [ ] )
@@ -24,8 +27,17 @@ if test "$BUILD_PHPDBG" = "" && test "$PHP_PHPDBG" != "no"; then
2427 PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
2528 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"
2629
27- if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
28- PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS"
30+ AC_MSG_CHECKING ( [ for phpdbg and readline integration] )
31+ if test "$PHP_PHPDBG_READLINE" = "yes"; then
32+ if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
33+ AC_DEFINE ( HAVE_PHPDBG_READLINE , 1 , [ ] )
34+ PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS"
35+ AC_MSG_RESULT ( [ ok] )
36+ else
37+ AC_MSG_RESULT ( [ readline is not available] )
38+ fi
39+ else
40+ AC_MSG_RESULT ( [ disabled] )
2941 fi
3042
3143 PHP_SUBST(PHP_PHPDBG_CFLAGS)
0 commit comments