The following bug has been logged online:
Bug reference: 1866
Logged by: Bob Friesenhahn
Email address: bfriesen@simple.dallas.tx.us
PostgreSQL version: 7.4.8
Operating system: Solaris 9 (SPARC)
Description: -lreadline needs -lcurses under Solaris.
Details:
The Postgres configure script finds the readline 5.0 headers and decides
that readline is available (in spite of many individual errors while testing
for functions in config.log). The end result is that postgres is built as
if readline is available but neither -lreadline or -lcurses is applied when
linking psql so it fails to link. Manually adding -lreadline -lcurses while
linking pgsql results in a successful link, possibly with reduced
functionality.