Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autotools: Enhance phpdbg readline enabling #15313

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions sapi/phpdbg/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,30 @@ PHP_ARG_ENABLE([phpdbg-readline],
[no])

if test "$PHP_PHPDBG" != "no"; then
AS_VAR_IF([PHP_PHPDBG_READLINE], [yes], [
AC_MSG_CHECKING([if readline can be enabled in phpdbg])
phpdbg_readline="no (readline extension is not enabled)"
AS_IF(m4_normalize([
(test -n "$with_readline" && test "x$with_readline" != xno) ||
(test -n "$with_libedit" && test "x$with_libedit" != xno)
]), [phpdbg_readline=yes])
AS_CASE([$with_readline], [*shared*],
[phpdbg_readline="no (shared readline extension not supported)"])
AS_CASE([$with_libedit], [*shared*],
[phpdbg_readline="no (shared readline extension not supported)"])
AS_VAR_IF([phpdbg_readline], [yes], [
AC_DEFINE([HAVE_PHPDBG_READLINE], [1],
[Define to 1 if the phpdbg SAPI has libedit/readline integration.])
])
AC_MSG_RESULT([$phpdbg_readline])
])

AC_HEADER_TIOCGWINSZ

PHP_PHPDBG_CFLAGS="-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
AS_VAR_IF([PHP_PHPDBG_DEBUG], [no],,
[AS_VAR_APPEND([PHP_PHPDBG_CFLAGS], [" -DPHPDBG_DEBUG=1"])])

AC_MSG_CHECKING([for phpdbg and readline integration])
if test "$PHP_PHPDBG_READLINE" = "yes"; then
if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then
AC_DEFINE([HAVE_PHPDBG_READLINE], [1],
[Define to 1 if the phpdbg SAPI has libedit/readline integration.])
PHPDBG_EXTRA_LIBS="$PHP_READLINE_LIBS"
AC_MSG_RESULT([ok])
else
AC_MSG_RESULT([readline is not available])
fi
else
AC_MSG_RESULT([disabled])
fi

AH_TEMPLATE([HAVE_USERFAULTFD_WRITEFAULT],
[Define to 1 if faulting on write-protected memory support can be compiled
for userfaultfd.])
Expand Down
Loading