@@ -12,13 +12,6 @@ PHP_ARG_ENABLE([phpdbg-debug],
1212 [ no] ,
1313 [ no] )
1414
15- PHP_ARG_ENABLE([ phpdbg-readline] ,
16- [ for phpdbg readline support] ,
17- [ AS_HELP_STRING ( [ --enable-phpdbg-readline] ,
18- [ Enable readline support in phpdbg (depends on static ext/readline)] ) ] ,
19- [ no] ,
20- [ no] )
21-
2215if test "$PHP_PHPDBG" != "no"; then
2316 AC_HEADER_TIOCGWINSZ
2417 AC_DEFINE ( HAVE_PHPDBG , 1 , [ ] )
@@ -32,17 +25,21 @@ if test "$PHP_PHPDBG" != "no"; then
3225 PHP_PHPDBG_CFLAGS="-D_GNU_SOURCE -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
3326 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_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_io.c phpdbg_out.c"
3427
35- AC_MSG_CHECKING ( [ for phpdbg and readline integration] )
36- if test "$PHP_PHPDBG_READLINE" = "yes"; then
37- if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
38- AC_DEFINE ( HAVE_PHPDBG_READLINE , 1 , [ ] )
39- PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS"
40- AC_MSG_RESULT ( [ ok] )
41- else
42- AC_MSG_RESULT ( [ readline is not available] )
43- fi
28+ AC_MSG_CHECKING ( [ for readline integration in phpdbg] )
29+ if test -n "$with_readline" && test "$with_readline" != "no"; then
30+ AS_CASE ( [ $with_readline] ,
31+ [ shared,*|shared] ,[ AC_MSG_RESULT ( [ disabled (depends on static ext/readline)] ) ] ,[
32+ AC_MSG_RESULT ( [ yes, readline] )
33+ PHP_PHPDBG_CFLAGS="$PHP_PHPDBG_CFLAGS -DHAVE_PHPDBG_READLINE"
34+ ] )
35+ elif test -n "$with_libedit" && test "$with_libedit" != "no"; then
36+ AS_CASE ( [ $with_libedit] ,
37+ [ shared,*|shared] ,[ AC_MSG_RESULT ( [ disabled (depends on static ext/readline)] ) ] ,[
38+ AC_MSG_RESULT ( [ yes, libedit] )
39+ PHP_PHPDBG_CFLAGS="$PHP_PHPDBG_CFLAGS -DHAVE_PHPDBG_READLINE"
40+ ] )
4441 else
45- AC_MSG_RESULT ( [ disabled] )
42+ AC_MSG_RESULT ( [ disabled (depends on static ext/readline) ] )
4643 fi
4744
4845 AC_CACHE_CHECK ( [ for userfaultfd faulting on write-protected memory support] , ac_cv_phpdbg_userfaultfd_writefault , AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [ [
0 commit comments