Add autotools this is more hackery and bodgery should use pkgconfig
and make ncurses optional.