Cross-compilation was only partially fixed by
024481c94b
as selinux was still enabled depending on host file existence
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
src/osflags hard codes the build architecture pkg-config. After making it
substitutable and substituting it from the build environment, iodine cross
builds successfully.
Original patch from Helmut Grohne <helmut@subdivi.de> in
https://bugs.debian.org/921822, adjusted to Git HEAD.
Recent versions of systemd don't ship with libsystemd-daemon.so anymore,
but instead use libsystemd.so for everything. This is obviously
problematic for using the same LDFLAGS on old systemd and new systemd.
So, they also ship compatability pkgconfig files, which use the old
names but return the new library. So, the most portable way to support
both old and new systemd is to use pkgconfig. It's not a problem either,
since systems that use systemd are bound to also have pkgconfig
installed.