If you are following the guide at
http://kmeleon.sourceforge.net/docs/build.php, you ARE going to run in some other problems.
With Cygwin it should be easy. Some of the required packages were merged together and are now available as different package (I don't remember the exact name, but I believe it is base-something..). But if you already have complete Cygwin, I would try to change the path to Cygwin in env.bat to where you actually have it installed. It should work.
When you are about to compile the source, do not use nmake command, it does not work anymore, but instead use "make -f client.mk build". Then everything should work ok, if you have MSVC6. If you have something newer and don't want to spend half a day thinking why everything seems ok, but nothing works, as I did, then download proper version of required libs from
ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/ and replace those in original buildtools.
Compiling K-Meleon itself is easy. I had some problems with missing includes, but I'm not sure if it was with original 0.9 source of with the SM version. Anyway if compiler complains about missing ns*.h, just look where exactly it is in mozilla\dist\include and add that path to includes.