]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Allow alternate location for libssl
authorOtto Moerbeek <otto.moerbeek@open-xchange.com>
Fri, 28 Mar 2025 09:55:14 +0000 (10:55 +0100)
committerOtto Moerbeek <otto.moerbeek@open-xchange.com>
Mon, 14 Apr 2025 13:48:18 +0000 (15:48 +0200)
Needed at least on OpenBSD to get boringssl for dnsdist with quiche,
but other platforms might benefit as well

meson/libssl/meson.build
meson_options.txt
pdns/dnsdistdist/meson_options.txt
pdns/recursordist/meson_options.txt

index 725d955d2b671d69b78967fe9bf8416bd1bf68d7..55a849c683af712487c2355ba766c00fd906d6ee 100644 (file)
@@ -1,5 +1,18 @@
 opt_libssl = get_option('tls-libssl')
-dep_libssl = dependency('libssl', required: opt_libssl)
+opt_libssl_dir = get_option('tls-libssl-dir')
+
+
+if opt_libssl_dir != ''
+  dep_libssl = declare_dependency(
+    include_directories: [opt_libssl_dir / 'include'],
+  )
+  add_global_link_arguments(
+    ['-L' + opt_libssl_dir / 'lib', '-lssl'],
+    language: ['c', 'cpp'],
+  )
+else
+  dep_libssl = dependency('libssl', required: opt_libssl)
+endif
 
 if dep_libssl.found()
   funcs = [
index cf19f6a1881e2fa680771d96436616288833f0ae..afcf7a7a666b6363d75bffbb6dc45d6dc0b10911 100644 (file)
@@ -8,6 +8,7 @@ option('signers-libsodium', type: 'feature', value: 'auto', description: 'Enable
 option('signers-libcrypto', type: 'feature', value: 'auto', description: 'Enable OpenSSL libcrypto-based signers)')
 option('signers-libcrypto-path', type: 'string', value: '', description: 'Custom path to find OpenSSL libcrypto')
 option('tls-libssl', type: 'feature', value: 'auto', description: 'OpenSSL-based TLS')
+option('tls-libssl-dir', type: 'string', value: '', description: 'Alternate OpenSSL location')
 option('tls-gnutls', type: 'feature', value: 'auto', description: 'GnuTLS-based TLS')
 option('dns-over-tls', type: 'feature', value: 'auto', description: 'DNS over TLS (requires GnuTLS or OpenSSL)')
 option('ipcipher', type: 'feature', value: 'auto', description: 'IPcipher (requires libcrypto)')
index d277eabe5eeb450c7b18174bc486ddd8dac063c2..b245eb775a9239979d24e97e187f93fe9e0f769e 100644 (file)
@@ -12,6 +12,7 @@ option('hardening-experimental-scp', type: 'feature', value: 'disabled', descrip
 option('hardening-fortify-source', type: 'combo', choices: ['auto', 'disabled', '1', '2', '3'], value: '2', description: 'Source fortification level')
 option('ipcipher', type: 'feature', value: 'auto', description: 'IPCipher')
 option('tls-libssl', type: 'feature', value: 'auto', description: 'OpenSSL-based TLS')
+option('tls-libssl-dir', type: 'string', value: '', description: 'Alternate OpenSSL location')
 option('tls-libssl-engines', type: 'boolean', value: false, description: 'OpenSSL-based TLS with TLS engines')
 option('tls-libssl-providers', type: 'boolean', value: false, description: 'OpenSSL-based TLS with TLS providers')
 option('dns-over-tls', type: 'feature', value: 'auto', description: 'DNS over TLS (requires GnuTLS or OpenSSL)')
index 9e2931579a74faa2025afd663152cadc0cadfbd0..09d8668154b4bc384f4491107697546c0a67f806 100644 (file)
@@ -7,7 +7,8 @@ option('signers-libsodium', type: 'feature', value: 'auto', description: 'Enable
 option('signers-libcrypto', type: 'feature', value: 'auto', description: 'Enable OpenSSL libcrypto-based signers)')
 option('signers-libcrypto-path', type: 'string', value: '', description: 'Custom path to find OpenSSL libcrypto')
 option('tls-libssl', type: 'feature', value: 'auto', description: 'OpenSSL-based TLS')
-option('dns-over-tls', type: 'feature', value: 'auto', description: 'DNS over TLS (requires OpenSSL)')
+option('tls-libssl-dir', type: 'string', value: '', description: 'Alternate OpenSSL location')
+option('dns-over-tls', type: 'feature', value: 'auto', description: 'DNS over TLS (requires GnuTLS or OpenSSL)')
 option('unit-tests', type: 'boolean', value: false, description: 'Build and run unit tests')
 option('unit-tests-backends', type: 'boolean', value: false, description: 'Not relevant for recursor')
 option('reproducible', type: 'boolean', value: false, description: 'Reproducible builds (for distro maintainers, makes debugging difficult)')