From 31a332fbc9e4bcf147411ba756d14ff2b4906805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Fri, 13 Apr 2018 10:07:35 +0200 Subject: meson: Define check_gio_tls_src conditionally The `check_gio_tls_src` which contains the source code to test if the backend has TLs support should only be defined if `tls_check` is enabled. https://bugzilla.gnome.org/show_bug.cgi?id=795233 --- meson.build | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 7b004f3d..a95e5432 100644 --- a/meson.build +++ b/meson.build @@ -84,14 +84,14 @@ libpsl_dep = dependency('libpsl', version : libpsl_required_version) ################### # GIO TLS support # ################### -check_gio_tls_src = '''#include -int main(void) { - return !g_tls_backend_supports_tls (g_tls_backend_get_default ()); -} -''' - enable_tls_check = get_option('tls_check') if enable_tls_check + check_gio_tls_src = '''#include + int main(void) { + return !g_tls_backend_supports_tls (g_tls_backend_get_default ()); + } + ''' + assert(cc.compiles(check_gio_tls_src, name : 'GIO has real TLS support', dependencies : glib_dep), 'libsoup requires glib-networking or glib-openssl for TLS support') endif -- cgit v1.2.1