Skip to content

Commit

Permalink
Autotools: Sync HAVE_ERASE_EMPTY_LINE help text (php#14857)
Browse files Browse the repository at this point in the history
HAVE_ERASE_EMPTY_LINE always gets the last AC_DEFINE help text, so it is
simpler to have the same help message for both definitions (readline and
editline). First text never got into header via autoheader anyway.
  • Loading branch information
petk authored Jul 7, 2024
1 parent 1db75d4 commit 2acd4c2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ext/readline/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ else
php_with_readline=no
fi

AH_TEMPLATE([HAVE_ERASE_EMPTY_LINE],
[Define to 1 if edit/readline library has 'rl_erase_empty_line' variable.])

if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
for i in $PHP_READLINE /usr/local /usr; do
test -f $i/include/readline/readline.h && READLINE_DIR=$i && break
Expand Down Expand Up @@ -76,8 +79,7 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
])

AC_CHECK_DECL([rl_erase_empty_line],
[AC_DEFINE([HAVE_ERASE_EMPTY_LINE], [1],
[Define to 1 if readline library has rl_erase_empty_line variable.])],,
[AC_DEFINE([HAVE_ERASE_EMPTY_LINE], [1])],,
[#include <readline/readline.h>])

AC_DEFINE(HAVE_HISTORY_LIST, 1, [ ])
Expand Down Expand Up @@ -139,8 +141,7 @@ elif test "$PHP_LIBEDIT" != "no"; then
])

AC_CHECK_DECL([rl_erase_empty_line],
[AC_DEFINE([HAVE_ERASE_EMPTY_LINE], [1],
[Define to 1 if edit library has rl_erase_empty_line variable.])],,
[AC_DEFINE([HAVE_ERASE_EMPTY_LINE], [1])],,
[#include <editline/readline.h>])

AC_DEFINE(HAVE_LIBEDIT, 1, [ ])
Expand Down

0 comments on commit 2acd4c2

Please sign in to comment.