If we are using an enviroment where it is set up to be like a Visual Studio
cmd.exe prompt, and if CC is not set, we assume that we are using Visual Studio
Thus, we need to call pkg-config with the --msvc-syntax flag. This also apples
if we choose to use clang-cl, so that we can use the correct C compiler/linker
flags when we compile the generated C-code.
Use compiler flags that would work on Visual Studio so that tests can
run much better than without. Currently, one may need to set the
PKG_CONFIG envvar to `<pkg-config-executable> --msvc-syntax` for this to
work best.
On Windows builds using Visual Studio-like compilers, we are using
cmd.exe shells, so we do the symlinking of the tools and man pages using
the commands that Windows provides.
Also, group the various programs and man pages together so that we have
single commands for each of the subdirs that we want to run the install
scripts, to make things simpler.
Visual Studio does not come with unistd.h and utime.h, so building items
that originate from glib-2.0.vapi et al will fail if items that depend
on these headers are used.
Do overcome this, add compat headers for them that will include the
appropriate headers from Visual Studio (or the Windows SDK), to fix the
build.
meson.build: Don't use GCC-specific CFlags on MSVC
They cause more trouble than help on Visual Studio builds. Instead, use
msvc_recommended_pragmas.h which is included with GLib that should cover
at least most of the items covered by those CFlags.