From 014881ca3283cf69008303a766df404a61862f1c Mon Sep 17 00:00:00 2001 From: Gleb Popov <6yearold@gmail.com> Date: Fri, 24 Dec 2021 21:25:11 +0300 Subject: [PATCH] Add Meson logic to properly locate OpenSSL on FreeBSD. --- meson.build | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 83fbb1689..bb3038516 100644 --- a/meson.build +++ b/meson.build @@ -428,7 +428,16 @@ need_alsa = get_option('pipewire-alsa').enabled() or 'media-session' in get_opti alsa_dep = dependency('alsa', version : '>=1.1.7', required: need_alsa) summary({'pipewire-alsa': alsa_dep.found()}, bool_yn: true) -openssl_lib = dependency('openssl', required: get_option('raop')) +if build_machine.system() == 'freebsd' +# On FreeBSD the OpenSSL library may come from base or a package. +# Check for a package first and fallback to the base library if we can't find it via pkgconfig + openssl_lib = dependency('openssl', required: false) + if not openssl_lib.found() + openssl_lib = declare_dependency(link_args : [ '-lssl', '-lcrypto']) + endif +else + openssl_lib = dependency('openssl', required: get_option('raop')) +endif summary({'OpenSSL (for raop-sink)': openssl_lib.found()}, bool_yn: true) lilv_lib = dependency('lilv-0', required: get_option('lv2'))