...and stop bundling libeditline. Patch attached in the next comment deals with it using a rather ham-fisted approach, but it works. Probably something better can be done, so on FreeBSD it will still use editline, but today I grew annoyed with it. Patch should be applied at the end, as it touches same lib/Makefile.am as sqlite patch. This should fix (in a way) bug 258015.
Created attachment 204472 [details, diff] patch fixing the problem
Heimdal does use system readline now. Closing.