Summary of the changes:
- add config.h (CMake and autotools target).
- Handle ncurses with a proper CMake find_package() call
- Handle ncurses panel library with proper find_library()
- Stop hardcoding broken '-lncurses -lpanel' entries
- Handle pkgsrc/NetBSD headers location (<ncurses/ncurses.h>)
Typo here: ncureses