CVE-2024-3094 has demonstrated that the obscure autotools macro language and the infeasible-to-audit barf of configure are good places for hiding malware.
autotools is not only slow and a barrier to support of non-unix platforms, but also a security liability of executing unreviewed arbitrary code that is able to compromise the entire build.
Please consider dropping autotools. Libevent happens to support cmake which is slightly less terrible in this regard.