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

Conversation

petk
Copy link
Member

@petk petk commented Aug 9, 2024

PHP_READLINE, PHP_LIBEDIT, and PHP_READLINE_LIBS variables are not available in sapi before the extensions arguments get processed by the configure script. But the Autoconf raw default variables with_readline and with_libedit are. This checks if readline support can be enabled in phpdbg

This is partial fix towards the more proper GH-13184 or similar in the future to make phpdbg readline integration easier to use.

Previous check silently enabled the phpdbg readline integration when readline is built as shared and failed on the make step:

undefined reference to 'readline'
undefined reference to 'add_history'

These cases enable it:

./configure --enable-phpdbg-readline --with-libedit
./configure --enable-phpdbg-readline --with-readline

These cases don't enable it:

./configure --enable-phpdbg-readline
./configure --enable-phpdbg-readline --with-libedit=shared
./configure --enable-phpdbg-readline --with-readline=shared

PHP_READLINE, PHP_LIBEDIT, and PHP_READLINE_LIBS variables are not
available in sapi before the extensions arguments get processed by the
configure script. But the Autoconf raw default variables with_readline
and with_libedit are. This checks if readline support can be enabled in
phpdbg

This is partial fix towards the more proper phpGH-13184 or similar in the
future to make phpdbg readline integration easier to use.

Previous check silently enabled the phpdbg readline integration when
readline is built as shared and failed on the make step:

    undefined reference to 'readline'
    undefined reference to 'add_history'

These cases enable it:
    ./configure --enable-phpdbg-readline --with-libedit
    ./configure --enable-phpdbg-readline --with-readline
These cases don't enable it:
    ./configure --enable-phpdbg-readline
    ./configure --enable-phpdbg-readline --with-libedit=shared
    ./configure --enable-phpdbg-readline --with-readline=shared
@petk
Copy link
Member Author

petk commented Aug 9, 2024

I'll do something else here because this phpdbg (probably) only needs the library linked to make this work ok, not the readline extension directly.

@petk
Copy link
Member Author

petk commented Sep 13, 2024

This will be fixed with #13184

@petk petk closed this Sep 13, 2024
@petk petk deleted the patch-phpdbg-readline-libs branch September 13, 2024 18:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant