There's a lot of boilerplate code in amqp_api.c for API functions corresponding to synchronous AMQP methods. And some of the functions that should be there are missing (e.g. basic.qos, basic.cancel). Instead, we can generate these functions from the protocol definition, plus a little information to describe where the function arguments do not reflect all of the method fields.
…versions of autoconf)
Those conventions are crazier than I thought. I leaned about this from <http://blogs.msdn.com/b/oldnewthing/archive/2010/09/17/10063629.aspx>.
And fix up the resulting warnings We don't use "-ansi -pedantic" in the tools dir, because that code relies on libpopt, and so is unlikely ever to work with the Microsoft compiler anyway.
So we need to specify the winsock2 library name explicitly. It gets found by searching along the path in the LIB environment variable.