From 2dc85a2060f6859c1abad9c9378801a73154b053 Mon Sep 17 00:00:00 2001 From: Witold Filipczyk Date: Sat, 8 Oct 2022 11:21:25 +0200 Subject: [PATCH] [meson] compilation fix when neither openssl nor gnutls were enabled --- meson.build | 8 +++++++- src/network/ssl/test/meson.build | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 0561bd28..eb433386 100644 --- a/meson.build +++ b/meson.build @@ -131,7 +131,13 @@ else conf_data.set('CONFIG_OS_UNIX', false) endif -conf_data.set('CONFIG_SSL', true) + +if conf_data.get('CONFIG_GNUTLS') or conf_data.get('CONFIG_OPENSSL') + conf_data.set('CONFIG_SSL', true) +else + conf_data.set('CONFIG_SSL', false) +endif + conf_data.set('CONFIG_OS_OS2', false) conf_data.set('CONFIG_OS_RISCOS', false) diff --git a/src/network/ssl/test/meson.build b/src/network/ssl/test/meson.build index d4bf914e..5450acb8 100644 --- a/src/network/ssl/test/meson.build +++ b/src/network/ssl/test/meson.build @@ -1,2 +1,2 @@ -t = executable('match-hostname-test', 'match-hostname-test.c', meson.current_source_dir() + '/../match-hostname.c', testdeps, c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) +t = executable('match-hostname-test', 'match-hostname-test.c', meson.source_root()+'/src/network/ssl/match-hostname.c', testdeps, c_args:['-DHAVE_CONFIG_H'], include_directories:['.', '..', '../..', '../../..', '../../../..']) test('match-hostname-test', t)