mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 01:49:48 +00:00
[#3553] Added botan check
This commit is contained in:
parent
de6059ebf3
commit
88d1fb4207
7
compiler-checks/botan-hash.cc
Normal file
7
compiler-checks/botan-hash.cc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#include <botan/hash.h>
|
||||||
|
using namespace Botan;
|
||||||
|
auto h = HashFunction::create("MD5");
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
return 0;
|
||||||
|
}
|
31
meson.build
31
meson.build
@ -223,15 +223,9 @@ LOG4CPLUS_DEP = dependency('log4cplus', fallback: ['log4cplus', 'log4cplus'])
|
|||||||
CRYPTO_DEP = disabler()
|
CRYPTO_DEP = disabler()
|
||||||
botan = disabler()
|
botan = disabler()
|
||||||
foreach dep : ['botan-3', 'botan']
|
foreach dep : ['botan-3', 'botan']
|
||||||
botan = dependency(dep, required: false)
|
botan = dependency(dep, version: '>=3.4.0', required: false)
|
||||||
if botan.found()
|
if botan.found()
|
||||||
version = botan.version()
|
break
|
||||||
if version.version_compare('<3.4.0')
|
|
||||||
message(f'Rejecting too old Botan (@version@ < 3.4.0)')
|
|
||||||
botan = disabler()
|
|
||||||
else
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
openssl = dependency('openssl', required: false)
|
openssl = dependency('openssl', required: false)
|
||||||
@ -411,7 +405,6 @@ if cpp_standard.version_compare('<201400')
|
|||||||
error('\n'.join(msgs))
|
error('\n'.join(msgs))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
# Add Botan 3 to this.
|
|
||||||
if NETCONF_DEP.found() and cpp_standard.version_compare('<202000')
|
if NETCONF_DEP.found() and cpp_standard.version_compare('<202000')
|
||||||
msgs = ['NETCONF dependency requires at least C++20.']
|
msgs = ['NETCONF dependency requires at least C++20.']
|
||||||
if cpp_std_opt == 'none'
|
if cpp_std_opt == 'none'
|
||||||
@ -427,6 +420,15 @@ if NETCONF_DEP.found() and cpp_standard.version_compare('<202000')
|
|||||||
NETCONF_DEP = disabler()
|
NETCONF_DEP = disabler()
|
||||||
endif
|
endif
|
||||||
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(
|
result = cpp.run(
|
||||||
fs.read('compiler-checks/boost-has-threads.cc'),
|
fs.read('compiler-checks/boost-has-threads.cc'),
|
||||||
@ -470,6 +472,17 @@ if CRYPTO_DEP.name() == openssl.name()
|
|||||||
endif
|
endif
|
||||||
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(
|
result = cpp.run(
|
||||||
fs.read('compiler-checks/have-optreset.cc'),
|
fs.read('compiler-checks/have-optreset.cc'),
|
||||||
name: 'HAVE_OPTRESET',
|
name: 'HAVE_OPTRESET',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user