Should this be extended to also know when to use curses versus libtermcap? This is needed for gtexinfo and bash and tcsh and others. My problem was that on some Linux systems, ncurses wasn't included and so was not buildlinked so configure/builds fail.