When ncurses is found the current build system will use it to build the
"noping" utility. However, that will create an automagic dependencies on
ncurses which is a problem for some distributions.
This commit adds the ability to control the ncurses usage:
a) If the user calls "configure" like before nothing changes: Configure
tries to find a suitable ncurses installation to build "noping". If
not found build system will just skip building of "noping" utility.
b) If the user calls "configure" with new "--with-ncurses" option,
configure will now fail if no suitable ncurses installation was
found.
c) If the user calls "configure" with new "--without-ncurses" option, the
build system will now skip building of "noping" utility and ncurses
will not be used.
In addition, this commit also changes the way configure will detect
ncurses: Configure now tries to use pkg-config to find ncurses but still
falls back to previous legacy checks. This will add support for ncurses
installation built with "--with-termlib" which causes several symbols to
get moved from libncurses.so to libtinfo.so.