I did --with-readline=/usr/lib using libreadline.a from gdb-4.11. I
did this on both linux and on hpux9.01.
If you use libreadline.a from gdb4.11 you will need xmalloc, xrealloc
and friends. These are found in libiberty.a. I just manually added
-liberty to the link step.