meson: Make glib-networking test minimally informative

It is suboptimal to see the test failure, check the meson-log.txt and
stderr part says nothing. This annoyed me when implementing both
Snap and MSVC support. So, let's boost that stderr on meson-log.txt.
This commit is contained in:
Bruno Lopes 2025-11-30 11:03:27 -03:00
parent 349e8aede8
commit 00fe9d807b
No known key found for this signature in database

View file

@ -571,8 +571,15 @@ if meson.is_cross_build() and not meson.can_run_host_binaries()
else # not meson.is_cross_build() or meson.can_run_host_binaries()
glib_networking_works_run = cc.run(
'''#include <gio/gio.h>
#include <stdio.h>
int main() {
return !g_tls_backend_supports_tls (g_tls_backend_get_default ());
GTlsBackend *module = g_tls_backend_get_default ();
if (!g_tls_backend_supports_tls (module)) {
fprintf (stderr, "No valid SSL/TLS module found (%s). Maybe you need to set GIO_MODULE_DIR?\n", G_OBJECT_TYPE_NAME (module));
return 1;
}
fprintf (stdout, "Valid SSL/TLS module found (%s).\n", G_OBJECT_TYPE_NAME (module));
return 0;
}''',
dependencies: gio,
)