soup: Lookup libsoup dylib files on Apple platforms
authorPhilippe Normand <philn@igalia.com>
Sun, 27 Feb 2022 14:45:01 +0000 (15:45 +0100)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 3 Mar 2022 16:59:16 +0000 (16:59 +0000)
Fixes #1007

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1805>

subprojects/gst-plugins-good/ext/soup/gstsouploader.c

index 2c525a6..8f6ae9d 100644 (file)
 GST_DEBUG_CATEGORY_EXTERN (gst_soup_debug);
 #define GST_CAT_DEFAULT gst_soup_debug
 
 GST_DEBUG_CATEGORY_EXTERN (gst_soup_debug);
 #define GST_CAT_DEFAULT gst_soup_debug
 
-#define LIBSOUP_3_SONAME "libsoup-3.0.so.0"
-#define LIBSOUP_2_SONAME "libsoup-2.4.so.1"
+#ifdef __APPLE__
+#define MODULE_SUFFIX ".dylib"
+#else
+#define MODULE_SUFFIX "." G_MODULE_SUFFIX
+#endif
+
+#define LIBSOUP_3_SONAME "libsoup-3.0" MODULE_SUFFIX
+#define LIBSOUP_2_SONAME "libsoup-2.4" MODULE_SUFFIX
 
 #define LOAD_SYMBOL(name) G_STMT_START {                                \
     if (!g_module_symbol (module, G_STRINGIFY (name), (gpointer *) &G_PASTE (vtable->_, name))) { \
 
 #define LOAD_SYMBOL(name) G_STMT_START {                                \
     if (!g_module_symbol (module, G_STRINGIFY (name), (gpointer *) &G_PASTE (vtable->_, name))) { \