I was building Joe under AIX 4.2. It seems that configure wrongly guessed the pressence of <sys/termios.h>, however <termios.h> seems to exists.
When I commented HAVE_POSIX_TERMIOS in autoconf.h, joe builds.
 
Matej Spiller-Muys