Building LineEditor when histedit.h and libedit are in non-standard locations

We have CentOS machines where histedit.h is not installed in a standard location. But completion and history provided by LineEditor are very useful features in clang-query and so I always build clang tools with LLVM_ENABLE_LIBEDIT=ON with the location of libedit.a and histedit.h specified via CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH respectively.

However, the above will not work out of the box. Other changes in llvm/cmake/config-ix.cmake and llvm/lib/LineEditor/CMakeLists.txt are required.

If there is interest, I can submit a patch on Phabricator. Please let me know. I don’t want to waste any effort if this doesn’t seem like a useful thing to the community.