Index: compiler-rt/cmake/config-ix.cmake =================================================================== --- compiler-rt/cmake/config-ix.cmake +++ compiler-rt/cmake/config-ix.cmake @@ -129,7 +129,7 @@ # Look for terminfo library, used in unittests that depend on LLVMSupport. if(LLVM_ENABLE_TERMINFO) - foreach(library terminfo tinfo curses ncurses ncursesw) + foreach(library ${CURSES_TINFO} terminfo tinfo curses ncurses ncursesw) string(TOUPPER ${library} library_suffix) check_library_exists( ${library} setupterm "" COMPILER_RT_HAS_TERMINFO_${library_suffix}) Index: llvm/CMakeLists.txt =================================================================== --- llvm/CMakeLists.txt +++ llvm/CMakeLists.txt @@ -338,6 +338,7 @@ CACHE STRING "Set target to use for LLVM JIT or use \"host\" for automatic detection.") option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON) +set(CURSES_TINFO "" CACHE STRING "Set library where tinfo symbols are.") set(LLVM_ENABLE_LIBXML2 "ON" CACHE STRING "Use libxml2 if available. Can be ON, OFF, or FORCE_ON") Index: llvm/cmake/config-ix.cmake =================================================================== --- llvm/cmake/config-ix.cmake +++ llvm/cmake/config-ix.cmake @@ -127,7 +127,7 @@ endif() if(LLVM_ENABLE_TERMINFO) set(HAVE_TERMINFO 0) - foreach(library terminfo tinfo curses ncurses ncursesw) + foreach(library ${CURSES_TINFO} terminfo tinfo curses ncurses ncursesw) string(TOUPPER ${library} library_suffix) check_library_exists(${library} setupterm "" HAVE_TERMINFO_${library_suffix}) if(HAVE_TERMINFO_${library_suffix})