HELP! problems when building mysql in NetBSD 6

I can't build mysql51-client on NetBSD 6 on port Amiga. I need to make
this work just to keep my business going is there anyone out there who has
a solution for me.

This is the error that I get:
checking libedit variant of rl_completion_entry_function... no
checking defined rl_compentry_func_t and rl_completion_func_t... no
checking HIST_ENTRY is declared in readline/readline.h...
configure: error: Could not find system readline or libedit libraries
Use --with-readline or --with-libedit to use the bundled
versions of libedit or readline
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/databases/mysql51-client
*** Error code 1
Stop.
make: stopped in /usr/pkgsrc/databases/mysql51-client

Is readline missing from my system or is it just not finding it? If it is just
not finding readline, how do I tell it where it is?

I have tried editing Makefile.common. I changed --without-readline to
--with-readline. I now get this error:

Has anyone else tried to build mysql and are they having the same problems? I
really need this system to work. I just can't afford any more downtime. I would
really like to get this issue resolved as soon as possible. What can be done to
make it build? Or should I consider downgrading to NetBSD 5?