Please remember to use WikiFormatting when pasting shell output into a ticket.
The problem is apparently caused by gdbm's configure script detecting your nawk install, which it prefers over /usr/bin/awk. However, I cannot reproduce your problem with the current nawk from MacPorts installed, although configure picks it up correctly. Can you attach the config.log?
A quickfix for your problem would probably be to uninstall nawk or install mawk or gawk, because those are preferred over nawk in gdbm's configure.