diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2018-04-13 10:07:35 +0200 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2018-04-13 16:16:35 +0200 |
commit | 31a332fbc9e4bcf147411ba756d14ff2b4906805 (patch) | |
tree | de684b40672ef31a0abe5302a723d68cabad0ab7 | |
parent | a1626e8ebe078c40ede13217bb815655a1ab80e5 (diff) | |
download | libsoup-31a332fbc9e4bcf147411ba756d14ff2b4906805.tar.gz |
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
-rw-r--r-- | meson.build | 12 |
1 files 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 <gio/gio.h> -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 <gio/gio.h> + 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 |