Skip to content
Snippets Groups Projects
Commit 2fb01099 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Merge remote-tracking branch 'origin/gh-747-remove_dep_gnu_readline'

parents d5773d6c ccdd1538
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,13 @@ IF (READLINE_READLINE_LIBRARY AND READLINE_INCLUDE_DIR)
SET (READLINE_FOUND TRUE)
SET (READLINE_INCLUDE_DIR ${READLINE_INCLUDE_DIR})
SET (READLINE_LIBRARIES ${READLINE_READLINE_LIBRARY})
MESSAGE(STATUS "Found GNU readline: ${READLINE_READLINE_LIBRARY}, include dir ${READLINE_INCLUDE_DIR}")
IF (EXISTS ${READLINE_INCLUDE_DIR}/readline/rlconf.h)
MESSAGE(STATUS "Found GNU readline")
set(HAVE_GNU_READLINE 1)
ELSE()
MESSAGE(STATUS "Found readline")
ENDIF ()
MESSAGE(STATUS "readline library: ${READLINE_READLINE_LIBRARY}, include dir ${READLINE_INCLUDE_DIR}")
IF (TERMCAP_FOUND)
SET (READLINE_LIBRARIES ${READLINE_LIBRARIES} ${TERMCAP_LIBRARY})
ENDIF (TERMCAP_FOUND)
......
......@@ -330,12 +330,14 @@ tarantool_lua_init(const char *tarantool_bin, int argc, char **argv)
luaopen_json(L);
lua_pop(L, 1);
#if defined(HAVE_GNU_READLINE)
/*
* Disable libreadline signals handlers. All signals are handled in
* main thread by libev watchers.
*/
rl_catch_signals = 0;
rl_catch_sigwinch = 0;
#endif
static const struct luaL_reg consolelib[] = {
{"readline", tarantool_console_readline},
{"add_history", tarantool_console_add_history},
......
......@@ -108,6 +108,10 @@
* Defined if this platform supports openmp and it is enabled
*/
#cmakedefine HAVE_OPENMP 1
/*
* Defined if compatible with GNU readline installed.
*/
#cmakedefine HAVE_GNU_READLINE 1
/*
* Set if compiler has __builtin_XXX methods.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment