checks for programs needed during build

When I tried to build cgdb on a new install of my system the make process failed a couple of times because of external programs. This small fix adds basic checks for
* flex/lex
* makeinfo
* help2man