From 8d8bdff6d7eccb05bf16e18141263ee72ea8296b Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 12 Aug 2013 09:49:17 +0000 Subject: Target a minimal terminfo library rather than necessarily a full curses library for color support detection. This still will use a curses library if that is all we have available on the system. This change tries to use a smaller subset of the curses library, specifically the subset that is on some systems split off into a separate library. For example, if you install ncurses configured --with-tinfo, a 'libtinfo' is install that provides just the terminfo querying functionality. That library is now used instead of curses when it is available. This happens to fix a build error on systems with that library because when we tried to link ncurses into the binary, we didn't pull tinfo in as well. =] It should also provide an easy path for supporting the NetBSD libterminfo library, but as I don't have access to a NetBSD system I'm leaving adding that support to those folks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188160 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Config/config.h.cmake | 9 ++++++--- include/llvm/Config/config.h.in | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) (limited to 'include/llvm/Config') diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake index 4b0aa4bc31..5090a65ff4 100644 --- a/include/llvm/Config/config.h.cmake +++ b/include/llvm/Config/config.h.cmake @@ -48,9 +48,6 @@ /* Define to 1 if you have the `closedir' function. */ #cmakedefine HAVE_CLOSEDIR ${HAVE_CLOSEDIR} -/* Define if curses provides the has_color() function on this platform. */ -#cmakedefine HAVE_CURSES - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_CURSES_H @@ -420,9 +417,15 @@ /* Define to 1 if you have that is POSIX.1 compatible. */ #cmakedefine HAVE_SYS_WAIT_H ${HAVE_SYS_WAIT_H} +/* Define if the setupterm() function is supported this platform. */ +#cmakedefine HAVE_TERMINFO ${HAVE_TERMINFO} + /* Define to 1 if you have the header file. */ #cmakedefine HAVE_TERMIOS_H ${HAVE_TERMIOS_H} +/* Define to 1 if you have the header file. */ +#cmakedefine HAVE_TERM_H + /* Define if the neat program is available */ #cmakedefine HAVE_TWOPI ${HAVE_TWOPI} diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in index 7bb1caad41..55c66cc0eb 100644 --- a/include/llvm/Config/config.h.in +++ b/include/llvm/Config/config.h.in @@ -69,9 +69,6 @@ /* can use __crashreporter_info__ */ #undef HAVE_CRASHREPORTER_INFO -/* Define if curses provides the has_color() function on this platform. */ -#undef HAVE_CURSES - /* Define to 1 if you have the header file. */ #undef HAVE_CURSES_H @@ -455,9 +452,15 @@ /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H +/* Define if the setupterm() function is supported this platform. */ +#undef HAVE_TERMINFO + /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H +/* Define to 1 if you have the header file. */ +#undef HAVE_TERM_H + /* Define if the neat program is available */ #undef HAVE_TWOPI -- cgit v1.2.3