summaryrefslogtreecommitdiff
path: root/cmake/readline.cmake
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2016-12-04 12:37:01 +0100
committerSergei Golubchik <serg@mariadb.org>2016-12-05 14:27:45 +0100
commit18cdff6765b954431934f6e6d0b1e281c8f0e0b8 (patch)
tree649ba5b77d052f9019c22352c14f862ff006bbd9 /cmake/readline.cmake
parent02d153c7b9739ce4c2445805aeaf4b185c6ac6f0 (diff)
downloadmariadb-git-18cdff6765b954431934f6e6d0b1e281c8f0e0b8.tar.gz
MDEV-10293 'setupterm' was not declared in this scope
Check for readline before checking for curses headers, because MYSQL_CHECK_READLINE fails when curses is not found, but CHECK_INCLUDE_FILES simply remembers the fact and continues. So if there's no curses, MYSQL_CHECK_READLINE will abort, the user will then installs curses and continue the build. Thus, CHECK_INCLUDE_HEADERS will remember that there is no curses, but other checks from MYSQL_CHECK_READLINE will remember that curses are there. It will result in inconsistent HAVE_xxx defines.
Diffstat (limited to 'cmake/readline.cmake')
-rw-r--r--cmake/readline.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/cmake/readline.cmake b/cmake/readline.cmake
index c72f8d0da5c..64e04ef8663 100644
--- a/cmake/readline.cmake
+++ b/cmake/readline.cmake
@@ -230,5 +230,6 @@ MACRO (MYSQL_CHECK_READLINE)
SET(CMAKE_REQUIRED_LIBRARIES)
SET(CMAKE_REQUIRED_INCLUDES)
ENDIF(NOT WIN32)
+ CHECK_INCLUDE_FILES ("curses.h;term.h" HAVE_TERM_H)
ENDMACRO()