FWIW, the code builds and runs fine with MSYS2 on a native Windows box.
Great, thanks for the heads up :)
The changes look fine to me except the debug fun (`cat config.log` in scripts/cross-build-mingw.sh)
Do you see a problem with it? I only output it when configure fails, which helps getting more info when running on Travis as we can't look at the files afterward. I could move this to the Travis script, though it calls the build script and can't know really why it failed if it did, but it's not too much of a problem to try and cat a non-existing file on failure anyway, so I could do that.
and I cannot really judge the m4 code as it is just magic to me :(.
I didn't write it, it comes from the common m4 macro repository, AutoConf Archive, or rather the Debian stable version of it. I however read it and it looks good to me.