FHS is just the split up at the top level into bin, lib, include, etc, share as opposed to having a folder called, e.g. MyApplication. Some people hate it, but it allows sharing libraries easily. Apple go for something of a hybrid with Frameworks. MSYS2 goes full Linux-style, even for our mingw-w64 (native) softare. "C:\Program Files\MyApplication" is the complete opposite. No sharing. No good for anyone.
Usually software is configured so that at `make install` time it will pull the DLLs of its dependencies beside its executables on Windows, so that, for example a Qt-based game would be packaged with the Qt DLLs in the same folder as the executable.
On MSYS2 we disable this code-path (ok, build-system code-path) and adopt the Linux path instead, so that our final package contains only the executable and a record to say "I also need the Qt shared libraries package version 5.5-3".
In fact, pacman doesn't allow us to make two packages with the same final files in it since it's a System Package Manager and it disallows such conflicts (unless the packages are marked as conflicting).
The other common thing you'll see with Windows software is people compiling and linking to static libraries because it's safer than DLL hell. It might be safer in that regard, but it's a security nightmare for the user (though they often can't know it), so we don't do that either. Our library packages do tend to come with static libraries, but our executables link to shared libraries by default which are also provided.
This way, when a security issue is found in a library, we don't need to update a load of packages containing executables that linked to that library statically, since none (or very few, some may slip through by mistake) do.
Windows isn't the only one non POSIX and even POSIX ones do have substantial differences.
OS X is POSIX certified, and Linux and BSD are obviously UNIX-like and mostly compliant.
Apart from the precise meaning of POSIX, windows is the only OS in widespread use not part of the UNIX-like family.
Not so niche are iOS and Android, which aren't fully POSIX compliant.
Then being POSIX compliant is only half of the story, because each OS tends to be certified to specific versions and there is room for implementation specific behaviours.
For example, Aix used to have Windows like model for dynamic libraries. OS X and its derivatives have Frameworks and so on.
Finally POSIX only applications are constrained to CLI and daemons only, as everything else falls outside POSIX.
That is not a small group, especially as it includes your build environment. In Windows, many times I had a problem that I cannot run ./configure (or worse: the package used a home grown build system that assumed unix-y environment; py2cairo, I'm looking at you), not only because of bash/sed/m4/awk/etc, but also not counting with cl.exe (VS compiler).
Side note: OSX has not only frameworks, but also dylibs. You can treat existing framework as dylib, it will link fine.
Assuming the build environment is about CLI and daemons as I mentioned.
Anything else isn't guaranteed to work. To pick on your example, Cairo needs more than just POSIX to compile. X11 isn't part of POSIX.
Have you experience with big UNIXes like Aix, Solaris, HP-UX, Tru64 and DG-UX?
It been awhile since I used most of them (1994 - 2006), but I clearly remember surprises with those scripts (autotools and friends) when running them outside GNU/Linux.
Maybe the situation has improved there, since like many of us, my UNIX like experience is nowadays constrained to GNU/Linux distributions and Mac OS X.
X11 for Cairo is optional. As is OpenGL or Win32 GDI. But yes, POSIX as it is, is a very limited API and for practical purposes, you need other APIs.
Yes, I have past experience with DX-UG/Tru64 and Solaris. At the time when Alpha AXP was a current chip, it was a little wonder to get to compile the same source code with different compilers, as they had different ideas about what a valid C code is. For Solaris, the easiest way to build anything was to get gcc instead of sun studio compiler. I think that Sun's GNU packages were built using gcc too.
Nowadays, I don't know about all other unices, because I'm using only Linux and OSX too. From the commonly used OSes, the most annoying to build something on is Windows.