I've been stumbling into this problem for quite some time now whenever i try to compile libirecovery without tools for building tsschecker, this problem began back in November 2024 in commits 24818b2 and 7a5e619.
Somehow, HAVE_READLINE does not get defined during configuring even though it's not needed anyway when building without tools, i haven't played around with the configure code much since i do not currently have much time to tinker with it, i also do not know if anybody else is having the same problem when building just the library.
here is some info that may help:
Host System: Windows 11 (x86_64)
Target System: Windows (Intel x86_64)
Toolchain: MSYS2 using the mingw64 shell.
I use this script to automate building tsschecker and it's dependencies, i'm trying to update it to work with the latest commits but i can't fully test it since i can't build irecovery: build_tsschecker_mingw64.sh