Skip to content

Commit 1ea58b6

Browse files
oerdnjnikic
authored andcommitted
Fix rl_completion_matches detection
Also fix a typo when checking for rl_on_new_line in readline library.
1 parent 332b58f commit 1ea58b6

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

ext/readline/config.m4

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,20 @@ if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
6060
-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
6161
])
6262

63-
PHP_CHECK_LIBRARY(edit, rl_on_new_line,
63+
PHP_CHECK_LIBRARY(readline, rl_on_new_line,
6464
[
6565
AC_DEFINE(HAVE_RL_ON_NEW_LINE, 1, [ ])
6666
],[],[
6767
-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
6868
])
6969

70+
PHP_CHECK_LIBRARY(readline, rl_completion_matches,
71+
[
72+
AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1, [ ])
73+
],[],[
74+
-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
75+
])
76+
7077
AC_DEFINE(HAVE_LIBREADLINE, 1, [ ])
7178

7279
elif test "$PHP_LIBEDIT" != "no"; then
@@ -114,11 +121,17 @@ elif test "$PHP_LIBEDIT" != "no"; then
114121
-L$READLINE_DIR/$PHP_LIBDIR
115122
])
116123

124+
PHP_CHECK_LIBRARY(edit, rl_completion_matches,
125+
[
126+
AC_DEFINE(HAVE_RL_COMPLETION_MATCHES, 1, [ ])
127+
],[],[
128+
-L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
129+
])
130+
117131
AC_DEFINE(HAVE_LIBEDIT, 1, [ ])
118132
fi
119133

120134
if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then
121-
AC_CHECK_FUNCS([rl_completion_matches])
122135
PHP_NEW_EXTENSION(readline, readline.c readline_cli.c, $ext_shared, cli)
123136
PHP_SUBST(READLINE_SHARED_LIBADD)
124137
fi

0 commit comments

Comments
 (0)