Skip to content

Commit 5038e7a

Browse files
committed
Remove configure option --enable-phpdbg-readline
Readline support in sapi/phpdbg can be determined automatically during the build process whether ext/readline is enabled and built statically.
1 parent 43b62b7 commit 5038e7a

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

UPGRADING.INTERNALS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ PHP 8.4 INTERNALS UPGRADE NOTES
4646

4747
b. Unix build system changes
4848
- The configure option --with-zlib-dir has been removed.
49+
- The configure option --enable-phpdbg-readline has been removed. Readline
50+
support in sapi/phpdbg is determined automatically whether ext/readline is
51+
enabled and built statically.
4952
- COOKIE_IO_FUNCTIONS_T symbol has been removed (use cookie_io_functions_t).
5053
- HAVE_SOCKADDR_UN_SUN_LEN symbol renamed to HAVE_STRUCT_SOCKADDR_UN_SUN_LEN.
5154
- PHP_CHECK_IN_ADDR_T M4 macro and 'in_addr_t' fallback definition to 'u_int'

sapi/phpdbg/config.m4

Lines changed: 14 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
2215
if 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

Comments
 (0)