I'm using an MSYS + GnuWin32 environment to compile the entire Gtk suite. Works great, until I launch the Gtk configure script. The problem seems to be because of the shell but I cannot really understand why it fails in this one case and nowhere else.
I'm attaching a tiny script which fails the same way to show what happens. (well... hopefully you can reproduce the problem!) Let me know if I can help. The shell code is a bit out of my scope right now... and it probably isn't too easy to fix such a bug!
The attached file also includes the MSYS & Shell versions.