I think I'd personally put the line a bit farther. If you distribute libreadline, that would be fine without GPLing the main program. If you make any check to verify that you are running a specific version of libreadline, then that is not fine, because you are preventing me from replacing it with a different version.