Some distros, RHEL 8 for instance, don't provide ncurses package
containing static libraries. When ncurses-devel is installed and we're
compiling static version of libpfm4, the ncurses check for rtop target
passes but linking fails later due to the missing libraries.
The ncurses installation check has been updated to also attempt linking
to the required ncurses libraries.