CRYPTO_DEP = disabler()
botan = disabler()
foreach dep : ['botan-3', 'botan']
- botan = dependency(dep, required: false)
+ botan = dependency(dep, version: '>=3.4.0', required: false)
if botan.found()
- version = botan.version()
- if version.version_compare('<3.4.0')
- message(f'Rejecting too old Botan (@version@ < 3.4.0)')
- botan = disabler()
- else
- break
- endif
+ break
endif
endforeach
openssl = dependency('openssl', required: false)
error('\n'.join(msgs))
endif
endif
-# Add Botan 3 to this.
if NETCONF_DEP.found() and cpp_standard.version_compare('<202000')
msgs = ['NETCONF dependency requires at least C++20.']
if cpp_std_opt == 'none'
NETCONF_DEP = disabler()
endif
endif
+if CRYPTO_DEP.name() == botan.name() and cpp_standard.version_compare('<202000')
+ msgs = ['Botan dependency requires at least C++20.']
+ if cpp_std_opt == 'none'
+ msgs += no_cpp_std_opt_msg
+ else
+ msgs += cpp_std_opt_msg
+ endif
+ error('\n'.join(msgs))
+endif
result = cpp.run(
fs.read('compiler-checks/boost-has-threads.cc'),
endif
endif
+if CRYPTO_DEP.name() == botan.name()
+ result = cpp.run(
+ fs.read('compiler-checks/botan-hash.cc'),
+ name: 'CHECK_BOTAN_LIBRARY',
+ dependencies: [boost_dep, CRYPTO_DEP, threads_dep],
+ )
+ if result.returncode() != 0
+ error('Botan library does not work.')
+ endif
+endif
+
result = cpp.run(
fs.read('compiler-checks/have-optreset.cc'),
name: 'HAVE_OPTRESET',