Firstly, compile something with cygwin is to compile something for cygwin1.dll, compile something with mingw is compile something for windows.
Here list some packages must be installed by cygwin/mingw:
automake, automake-wrapper, autoconf, autogen?, libtool, gcc, g++ make; msys-base
in cmd, install mingw pkgs with:
mingw-get install ..
also in cygwin from github we have a tool apt-cyg.
apt-cyg install ..