Continuing the discussion re pushing some of Open MPI's experiences upstream, I have attached our opal_setup_libevent.m4 script for building libevent as part of OMPI. Note that the comments describe several scenarios where the existing libevent tests aren't quite adequate for detecting when various functionality should be "on" vs "off". These have been rather thoroughly tested by the respective developers, so we offer them to you for consideration.
I also have added a set of options to your
configure.in and associated files that might prove useful. Nothing profound - they just allow users to "deselect" certain support options (e.g., DNS, http). I've attached a diff (options.diff) that shows the changes, though I suspect you'll want to clean them up.