summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-09-25 07:33:52 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2022-09-25 07:53:06 +0900
commite0f435f93580c84a93cc083a7fc23a5751ca8424 (patch)
tree4a1dae4a46cd7e09d57023d2bc93633790fe4f57 /meson.build
parente56074a2121d2db7964321156fe522232b16034d (diff)
downloadsystemd-e0f435f93580c84a93cc083a7fc23a5751ca8424.tar.gz
meson: libfido2 requires openssl
Fixes compile error with -Dopenssl=false. ``` In file included from ../../home/watanabe/git/systemd/src/shared/pkcs11-util.h:12, from ../../home/watanabe/git/systemd/src/cryptenroll/cryptenroll.c:24: ../../home/watanabe/git/systemd/src/shared/openssl-util.h:56:21: error: conflicting types for ‘X509’; have ‘struct X509’ 56 | typedef struct X509 X509; | ^~~~ In file included from /usr/include/openssl/crypto.h:25, from /usr/include/openssl/bio.h:20, from /usr/include/openssl/asn1.h:16, from /usr/include/openssl/ec.h:17, from /usr/include/fido.h:10, from ../../home/watanabe/git/systemd/src/shared/libfido2-util.h:18, from ../../home/watanabe/git/systemd/src/cryptenroll/cryptenroll-fido2.h:7, from ../../home/watanabe/git/systemd/src/cryptenroll/cryptenroll.c:6: /usr/include/openssl/ossl_typ.h:123:24: note: previous declaration of ‘X509’ with type ‘X509’ {aka ‘struct x509_st’} 123 | typedef struct x509_st X509; | ^~~~ ```
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 10 insertions, 3 deletions
diff --git a/meson.build b/meson.build
index a20e94c55a..4f193ce17b 100644
--- a/meson.build
+++ b/meson.build
@@ -1440,9 +1440,16 @@ conf.set10('HAVE_P11KIT', have)
want_libfido2 = get_option('libfido2')
if want_libfido2 != 'false' and not skip_deps
- libfido2 = dependency('libfido2',
- required : want_libfido2 == 'true')
- have = libfido2.found()
+ if conf.get('HAVE_OPENSSL') == 1
+ libfido2 = dependency('libfido2',
+ required : want_libfido2 == 'true')
+ have = libfido2.found()
+ elif want_libfido2 == 'true'
+ error('libfido2=true requires openssl')
+ else
+ have = false
+ libfido2 = []
+ endif
else
have = false
libfido2 = []