llvm-config currently ignores LLVM_ENABLE_TERMINFO and always passes -ltinfo when linking the executable.
This currently breaks cross-compilation of LLVM for a target system without a native libtinfo available, which is not ideal.
This patch simply removes -ltinfo from the llvm-config link line if LLVM_ENABLE_TERMINFO is false.