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