for a terminal library.
[in an ideal world, ncurses wouldn't even be listed, but according
to the comments in configure.ac, some Linux distributions don't have
libcurses, only libncurses, so it should stay.]
fixes a problem when building with an external gcc, since gcc, when
installed into /prefix, unconditionally searches /prefix/lib for
libraries at link time causing it to find libncurses in /prefix/lib
(the normal gcc ugliness). this leads to the runtime linker being
unable to find libncurses.
noted by gavan@, fix tested by gavan@ and myself.