Joseph,
How about just compiling --without-readline?
Also, if you have Sun Studio 11 available, you'll get better performance out of your PostgreSQL.
-- --Josh
Josh BerkusPostgreSQL @ SunSan Francisco