Commit e9cd8662 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

merge

parents ba012305 5c7a6228
...@@ -79,7 +79,7 @@ MACRO (MYSQL_CHECK_MULTIBYTE) ...@@ -79,7 +79,7 @@ MACRO (MYSQL_CHECK_MULTIBYTE)
ENDMACRO() ENDMACRO()
MACRO (FIND_CURSES) MACRO (FIND_CURSES)
INCLUDE (FindCurses) FIND_PACKAGE(Curses)
MARK_AS_ADVANCED(CURSES_CURSES_H_PATH CURSES_FORM_LIBRARY CURSES_HAVE_CURSES_H) MARK_AS_ADVANCED(CURSES_CURSES_H_PATH CURSES_FORM_LIBRARY CURSES_HAVE_CURSES_H)
IF(NOT CURSES_FOUND) IF(NOT CURSES_FOUND)
SET(ERRORMSG "Curses library not found. Please install appropriate package, SET(ERRORMSG "Curses library not found. Please install appropriate package,
...@@ -104,6 +104,18 @@ MACRO (FIND_CURSES) ...@@ -104,6 +104,18 @@ MACRO (FIND_CURSES)
SET(CURSES_LIBRARY "curses" CACHE INTERNAL "" FORCE) SET(CURSES_LIBRARY "curses" CACHE INTERNAL "" FORCE)
SET(CURSES_CURSES_LIBRARY "curses" CACHE INTERNAL "" FORCE) SET(CURSES_CURSES_LIBRARY "curses" CACHE INTERNAL "" FORCE)
ENDIF() ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
# -Wl,--as-needed breaks linking with -lcurses, e.g on Fedora
# Lower-level libcurses calls are exposed by libtinfo
CHECK_LIBRARY_EXISTS(${CURSES_LIBRARY} tputs "" HAVE_TPUTS_IN_CURSES)
IF(NOT HAVE_TPUTS_IN_CURSES)
CHECK_LIBRARY_EXISTS(tinfo tputs "" HAVE_TPUTS_IN_TINFO)
IF(HAVE_TPUTS_IN_TINFO)
SET(CURSES_LIBRARY tinfo)
ENDIF()
ENDIF()
ENDIF()
ENDMACRO() ENDMACRO()
MACRO (MYSQL_USE_BUNDLED_READLINE) MACRO (MYSQL_USE_BUNDLED_READLINE)
......
...@@ -18,7 +18,7 @@ INCLUDE(CheckIncludeFile) ...@@ -18,7 +18,7 @@ INCLUDE(CheckIncludeFile)
include(CheckFunctionExists) include(CheckFunctionExists)
CHECK_INCLUDE_FILES(term.h HAVE_TERM_H) CHECK_INCLUDE_FILES(term.h HAVE_TERM_H)
SET(CMAKE_REQUIRED_LIBRARIES ${CURSES_CURSES_LIBRARY}) SET(CMAKE_REQUIRED_LIBRARIES ${CURSES_LIBRARY})
CHECK_CXX_SOURCE_COMPILES(" CHECK_CXX_SOURCE_COMPILES("
#include <term.h> #include <term.h>
int main() int main()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment