soup: Runtime compatibility support for libsoup2 and libsoup3

Philippe Normand requested to merge philn/gstreamer:magic-soup into main

The src and sink elements no longer link against libsoup. It is now loaded at runtime. If any version is resident already, it is used. Otherwise we first try to load libsoup3 and if it's not found we fallback to libsoup2.

OTOH, for the unit-tests, the libsoup dependency remains compile-time and we link against the found libsoup.

Based on initial patch by Daniel Kolesa dkolesa@igalia.com and Patrick Griffis pgriffis@igalia.com.

Edited by Philippe Normand

Merge request reports