Make it a private static library to be used in commming commits.
Contrary to upstream, we use the imported *.impl.* definitions.
For convenience (not to move a lot of meson code around), define
the HAVE_GTK_WAYLAND and HAVE_GTK_X11 in config.h instead of
compiler flags.
These are copied from [xdp-desktop-portal], to avoid adding it and all
its dependencies as buildtime dependencies of our own (and to the
flatpak manifest).
[xdp-desktop-portal]: https://github.com/flatpak/xdg-desktop-portal/
`x11_interop` is the symbol of a global variable, but gets reused for
a local one.
We should try to keep this code in sync with xdp-desktop-porta-gnome
so, instead of chaning the symbol, ignore the compiler error.
This is code copied from xdg-desktop-portal-gnome repository today[0].
We need it to implement the FileChooser portal ourselves.
It's not included in the build yet, as it needs modifications first.
[0] b92a8cc5f6