@@ -3,79 +3,7 @@ dnl config.m4 for extension readline
3
3
PHP_ARG_WITH(libedit,for libedit readline replacement,
4
4
[ --with-libedit Include libedit readline replacement (CLI/CGI only)] )
5
5
6
- if test "$PHP_LIBEDIT" = "no"; then
7
- PHP_ARG_WITH(readline,for readline support,
8
- [ --with-readline[ =DIR] Include readline support (CLI/CGI only)] )
9
- else
10
- dnl "register" the --with-readline option to preven invalid "unknown configure option" warning
11
- php_with_readline=no
12
- fi
13
-
14
- if test "$PHP_READLINE" && test "$PHP_READLINE" != "no"; then
15
- for i in $PHP_READLINE /usr/local /usr; do
16
- test -f $i/include/readline/readline.h && READLINE_DIR=$i && break
17
- done
18
-
19
- if test -z "$READLINE_DIR"; then
20
- AC_MSG_ERROR ( Please reinstall readline - I cannot find readline.h )
21
- fi
22
-
23
- PHP_ADD_INCLUDE($READLINE_DIR/include)
24
-
25
- PHP_READLINE_LIBS=""
26
- AC_CHECK_LIB ( ncurses , tgetent ,
27
- [
28
- PHP_ADD_LIBRARY(ncurses,,READLINE_SHARED_LIBADD)
29
- PHP_READLINE_LIBS="$PHP_READLINE_LIBS -lncurses"
30
- ] ,[
31
- AC_CHECK_LIB ( termcap , tgetent ,
32
- [
33
- PHP_ADD_LIBRARY(termcap,,READLINE_SHARED_LIBADD)
34
- PHP_READLINE_LIBS="$PHP_READLINE_LIBS -ltermcap"
35
- ] )
36
- ] )
37
-
38
- PHP_CHECK_LIBRARY(readline, readline,
39
- [
40
- PHP_ADD_LIBRARY_WITH_PATH(readline, $READLINE_DIR/$PHP_LIBDIR, READLINE_SHARED_LIBADD)
41
- ] , [
42
- AC_MSG_ERROR ( readline library not found )
43
- ] , [
44
- -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
45
- ] )
46
-
47
- PHP_CHECK_LIBRARY(readline, rl_pending_input,
48
- [ ] , [
49
- AC_MSG_ERROR ( [ invalid readline installation detected. Try --with-libedit instead.] )
50
- ] , [
51
- -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
52
- ] )
53
-
54
- PHP_CHECK_LIBRARY(readline, rl_callback_read_char,
55
- [
56
- AC_DEFINE ( HAVE_RL_CALLBACK_READ_CHAR , 1 , [ ] )
57
- ] ,[ ] ,[
58
- -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
59
- ] )
60
-
61
- PHP_CHECK_LIBRARY(readline, rl_on_new_line,
62
- [
63
- AC_DEFINE ( HAVE_RL_ON_NEW_LINE , 1 , [ ] )
64
- ] ,[ ] ,[
65
- -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
66
- ] )
67
-
68
- PHP_CHECK_LIBRARY(readline, rl_completion_matches,
69
- [
70
- AC_DEFINE ( HAVE_RL_COMPLETION_MATCHES , 1 , [ ] )
71
- ] ,[ ] ,[
72
- -L$READLINE_DIR/$PHP_LIBDIR $PHP_READLINE_LIBS
73
- ] )
74
-
75
- AC_DEFINE ( HAVE_HISTORY_LIST , 1 , [ ] )
76
- AC_DEFINE ( HAVE_LIBREADLINE , 1 , [ ] )
77
-
78
- elif test "$PHP_LIBEDIT" != "no"; then
6
+ if test "$PHP_LIBEDIT" != "no"; then
79
7
if test "$PHP_LIBEDIT" != "yes"; then
80
8
AC_MSG_WARN ( [ libedit directory ignored, rely on pkg-config] )
81
9
fi
@@ -131,9 +59,7 @@ elif test "$PHP_LIBEDIT" != "no"; then
131
59
] )
132
60
133
61
AC_DEFINE ( HAVE_LIBEDIT , 1 , [ ] )
134
- fi
135
-
136
- if test "$PHP_READLINE" != "no" || test "$PHP_LIBEDIT" != "no"; then
137
62
PHP_NEW_EXTENSION(readline, readline.c readline_cli.c, $ext_shared, cli)
138
63
PHP_SUBST(READLINE_SHARED_LIBADD)
139
64
fi
65
+
0 commit comments