[ --with-readline[=DIR] Include readline support. DIR is the readline
install directory.])
+if test "$PHP_READLINE" != "no" -o "$PHP_LIBEDIT" != "no"; then
+ if test "$PHP_SAPI" != "cgi"; then
+ AC_MSG_ERROR([readline extension can only be used with CGI build!])
+ fi
+fi
+
if test "$PHP_READLINE" != "no"; then
for i in /usr/local /usr $PHP_READLINE; do
if test -f $i/include/readline/readline.h; then
PHP_FE(readline_info, NULL)
PHP_FE(readline_add_history, NULL)
PHP_FE(readline_clear_history, NULL)
-#ifdef HAVE_READLINE
+#ifdef HAVE_LIBREADLINE
PHP_FE(readline_list_history, NULL)
#else
PHP_FALIAS(readline_list_history, warn_not_available, NULL)
add_assoc_string(return_value,"line_buffer",SAFE_STRING(rl_line_buffer),1);
add_assoc_long(return_value,"point",rl_point);
add_assoc_long(return_value,"end",rl_end);
-#ifdef HAVE_READLINE
+#ifdef HAVE_LIBREADLINE
add_assoc_long(return_value,"mark",rl_mark);
add_assoc_long(return_value,"done",rl_done);
add_assoc_long(return_value,"pending_input",rl_pending_input);
RETVAL_LONG(rl_point);
} else if (! strcasecmp((*what)->value.str.val,"end")) {
RETVAL_LONG(rl_end);
-#ifdef HAVE_READLINE
+#ifdef HAVE_LIBREADLINE
} else if (! strcasecmp((*what)->value.str.val,"mark")) {
RETVAL_LONG(rl_mark);
} else if (! strcasecmp((*what)->value.str.val,"done")) {
/* }}} */
/* {{{ proto array readline_list_history(void)
Lists the history */
-#ifdef HAVE_READLINE
+#ifdef HAVE_LIBREADLINE
PHP_FUNCTION(readline_list_history)
{
HIST_ENTRY **history;