> when I had to recompile 5.4.4 with readline I found the new GNU readline depends on termcap.
Are you sure? Where is this documented?
Doesn't it depend on how readline was built?
I hope we're not back to this discussion:
If you link libreadline as a dynamic library the dependency does not have to be specified, because the dynamic loader will load libreadline.so's dependencies automatically, but if you link it statically you will have to specify the libncurses library, because the linker can't figure it out from libreadline.a's contents.
Showing the dependencies (libtinfo is the low-level terminal database library, part of ncurses)
$ ldd /lib/x86_64-linux-gnu/libreadline.so.7
libtinfo.so.6 => /lib/x86_64-linux-gnu/libtinfo.so.6 (0x00007fe511a5c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe51189c000)