mirror of
https://gitlab.isc.org/isc-projects/kea
synced 2025-08-22 18:08:16 +00:00
[#3731] Some improvements
This commit is contained in:
parent
f5cb4eeb2d
commit
4228626061
@ -34,20 +34,14 @@ C++ Compiler:
|
|||||||
LD_ID: @LD_ID@
|
LD_ID: @LD_ID@
|
||||||
LD_ARGS: @LD_ARGS@
|
LD_ARGS: @LD_ARGS@
|
||||||
'
|
'
|
||||||
|
|
||||||
if test '@HAVE_PYTHON@' != 'no'; then
|
|
||||||
add_to_report '
|
add_to_report '
|
||||||
Python:
|
Python:
|
||||||
PYTHON: @PYTHON_PATH@
|
PYTHON: @PYTHON_PATH@
|
||||||
|
PYTHON_VERSION: @PYTHON_VERSION@
|
||||||
PKGPYTHONDIR: @PKGPYTHONDIR@
|
PKGPYTHONDIR: @PKGPYTHONDIR@
|
||||||
'
|
|
||||||
fi
|
|
||||||
|
|
||||||
add_to_report '
|
|
||||||
Boost:
|
Boost:
|
||||||
BOOST_VERSION: @BOOST_VERSION@
|
BOOST_VERSION: @BOOST_VERSION@
|
||||||
BOOST_INCLUDE: @BOOST_INCLUDE@
|
|
||||||
BOOST_LIBDIR: @BOOST_LIBDIR@
|
|
||||||
|
|
||||||
@CRYPTO_NAME@:
|
@CRYPTO_NAME@:
|
||||||
CRYPTO_VERSION: @CRYPTO_VERSION@
|
CRYPTO_VERSION: @CRYPTO_VERSION@
|
||||||
@ -92,10 +86,18 @@ PostgreSQL:
|
|||||||
'
|
'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test '@HAVE_NETCONF@' != 'no'; then
|
||||||
add_to_report '
|
add_to_report '
|
||||||
NETCONF:
|
Netconf:
|
||||||
@HAVE_NETCONF@
|
LIBYANG_PREFIX: @LIBYANG_PREFIX@
|
||||||
|
SYSREPO_PREFIX: @SYSREPO_PREFIX@
|
||||||
'
|
'
|
||||||
|
else
|
||||||
|
add_to_report '
|
||||||
|
Netconf:
|
||||||
|
no
|
||||||
|
'
|
||||||
|
fi
|
||||||
|
|
||||||
if test '@HAVE_GTEST@' != 'no'; then
|
if test '@HAVE_GTEST@' != 'no'; then
|
||||||
add_to_report '
|
add_to_report '
|
||||||
@ -110,3 +112,26 @@ Google Test:
|
|||||||
no
|
no
|
||||||
'
|
'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test '@HAVE_KRB5@' != 'no'; then
|
||||||
|
add_to_report '
|
||||||
|
Kerberos5 GSS-API support:
|
||||||
|
KRB5_GSSAPI_VERSION: @KRB5_GSSAPI_VERSION@
|
||||||
|
KRB5_GSSAPI_CFLAGS: @KRB5_GSSAPI_CFLAGS@
|
||||||
|
KRB5_GSSAPI_LIBS: @KRB5_GSSAPI_LIBS@
|
||||||
|
KRB5_GSSAPI_VENDOR: @KRB5_GSSAPI_VENDOR@
|
||||||
|
'
|
||||||
|
else
|
||||||
|
add_to_report '
|
||||||
|
Kerberos5 GSS-API support:
|
||||||
|
no
|
||||||
|
'
|
||||||
|
fi
|
||||||
|
|
||||||
|
add_to_report '
|
||||||
|
Developer:
|
||||||
|
Tests: @TESTS_ENABLED@
|
||||||
|
Valgrind: @VALGRIND@
|
||||||
|
Fuzzing: @FUZZ_ENABLED@
|
||||||
|
AFL: @HAVE_AFL@
|
||||||
|
'
|
||||||
|
100
meson.build
100
meson.build
@ -35,7 +35,6 @@ netconf_opt = get_option('netconf')
|
|||||||
postgresql_opt = get_option('postgresql')
|
postgresql_opt = get_option('postgresql')
|
||||||
|
|
||||||
FUZZ_OPT = get_option('fuzz')
|
FUZZ_OPT = get_option('fuzz')
|
||||||
SHELL_OPT = get_option('shell')
|
|
||||||
TESTS_OPT = get_option('tests')
|
TESTS_OPT = get_option('tests')
|
||||||
|
|
||||||
#### Configuration Data
|
#### Configuration Data
|
||||||
@ -117,7 +116,7 @@ INSTALL = find_program('install', required: true)
|
|||||||
PDFLATEX = find_program('pdflatex', required: false)
|
PDFLATEX = find_program('pdflatex', required: false)
|
||||||
PIP_COMPILE = find_program('pip-compile', required: false)
|
PIP_COMPILE = find_program('pip-compile', required: false)
|
||||||
PLANTUML = find_program('plantuml', required: false)
|
PLANTUML = find_program('plantuml', required: false)
|
||||||
PYTHON = find_program('python3', 'python', required: false)
|
PYTHON = find_program('python3', 'python', required: true)
|
||||||
SPHINX = find_program('sphinx-build', 'sphinx-build-3', required: false)
|
SPHINX = find_program('sphinx-build', 'sphinx-build-3', required: false)
|
||||||
XMLLINT = find_program('xmllint', required: false)
|
XMLLINT = find_program('xmllint', required: false)
|
||||||
|
|
||||||
@ -211,11 +210,6 @@ GTEST_DEP = dependency(
|
|||||||
required: TESTS_OPT.enabled() or FUZZ_OPT.enabled(),
|
required: TESTS_OPT.enabled() or FUZZ_OPT.enabled(),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Kea shell
|
|
||||||
if SHELL_OPT.enabled() and not PYTHON.found()
|
|
||||||
error('kea-shell requires python. Python not found.')
|
|
||||||
endif
|
|
||||||
|
|
||||||
# Crypto
|
# Crypto
|
||||||
if crypto_opt == 'botan'
|
if crypto_opt == 'botan'
|
||||||
if botan.found()
|
if botan.found()
|
||||||
@ -337,9 +331,13 @@ result = cpp.run(
|
|||||||
)
|
)
|
||||||
FUZZING_WITH_CLUSTERFUZZLITE = result.returncode() == 0
|
FUZZING_WITH_CLUSTERFUZZLITE = result.returncode() == 0
|
||||||
|
|
||||||
|
have_afl = false
|
||||||
if FUZZ_OPT.enabled()
|
if FUZZ_OPT.enabled()
|
||||||
result = cpp.run(fs.read('compiler-checks/have-afl.cc'), name: 'HAVE_AFL')
|
result = cpp.run(fs.read('compiler-checks/have-afl.cc'), name: 'HAVE_AFL')
|
||||||
conf_data.set('HAVE_AFL', result.returncode() == 0)
|
if result.returncode() == 0
|
||||||
|
have_afl = true
|
||||||
|
endif
|
||||||
|
conf_data.set('HAVE_AFL', have_afl)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
if GTEST_DEP.found()
|
if GTEST_DEP.found()
|
||||||
@ -474,22 +472,18 @@ endif
|
|||||||
report_conf_data.set('CXX_ARGS', ' '.join(compile_args))
|
report_conf_data.set('CXX_ARGS', ' '.join(compile_args))
|
||||||
report_conf_data.set('LD_ID', cpp.get_linker_id())
|
report_conf_data.set('LD_ID', cpp.get_linker_id())
|
||||||
report_conf_data.set('LD_ARGS', ' '.join(link_args))
|
report_conf_data.set('LD_ARGS', ' '.join(link_args))
|
||||||
if PYTHON.found()
|
report_conf_data.set('PYTHON_PATH', PYTHON.full_path())
|
||||||
report_conf_data.set('HAVE_PYTHON', 'yes')
|
report_conf_data.set('PYTHON_VERSION', PYTHON.version())
|
||||||
report_conf_data.set('PYTHON_PATH', PYTHON.full_path())
|
result = run_command(
|
||||||
result = run_command(
|
PYTHON,
|
||||||
PYTHON,
|
'-c',
|
||||||
'-c',
|
'import sysconfig; print(sysconfig.get_paths()[\'purelib\'])',
|
||||||
'import sysconfig; print(sysconfig.get_paths()[\'purelib\'])',
|
check: false,
|
||||||
check: false,
|
)
|
||||||
)
|
if result.returncode() == 0
|
||||||
if result.returncode() == 0
|
report_conf_data.set('PKGPYTHONDIR', result.stdout().strip() + '/kea')
|
||||||
report_conf_data.set('PKGPYTHONDIR', result.stdout().strip() + '/kea')
|
|
||||||
else
|
|
||||||
report_conf_data.set('PKGPYTHONDIR', 'unknown')
|
|
||||||
endif
|
|
||||||
else
|
else
|
||||||
report_conf_data.set('HAVE_PYTHON', 'no')
|
report_conf_data.set('PKGPYTHONDIR', 'unknown')
|
||||||
endif
|
endif
|
||||||
result = cpp.run(
|
result = cpp.run(
|
||||||
fs.read('compiler-checks/get-boost-version.cc'),
|
fs.read('compiler-checks/get-boost-version.cc'),
|
||||||
@ -501,14 +495,6 @@ if result.returncode() == 0
|
|||||||
else
|
else
|
||||||
report_conf_data.set('BOOST_VERSION', 'unknown')
|
report_conf_data.set('BOOST_VERSION', 'unknown')
|
||||||
endif
|
endif
|
||||||
report_conf_data.set(
|
|
||||||
'BOOST_INCLUDE',
|
|
||||||
boost_dep.get_variable('includedir', default_value: 'unknown'),
|
|
||||||
)
|
|
||||||
report_conf_data.set(
|
|
||||||
'BOOST_LIBDIR',
|
|
||||||
boost_dep.get_variable('libdir', default_value: 'unknown'),
|
|
||||||
)
|
|
||||||
report_conf_data.set(
|
report_conf_data.set(
|
||||||
'CRYPTO_INCLUDE',
|
'CRYPTO_INCLUDE',
|
||||||
CRYPTO_DEP.get_variable('includedir', default_value: 'unknown'),
|
CRYPTO_DEP.get_variable('includedir', default_value: 'unknown'),
|
||||||
@ -611,8 +597,18 @@ else
|
|||||||
endif
|
endif
|
||||||
if NETCONF_DEP.found()
|
if NETCONF_DEP.found()
|
||||||
report_conf_data.set('HAVE_NETCONF', 'yes')
|
report_conf_data.set('HAVE_NETCONF', 'yes')
|
||||||
|
report_conf_data.set(
|
||||||
|
'LIBYANG_PREFIX',
|
||||||
|
NETCONF_DEP.get_variable('libyang_prefix', default_value: 'unknown'),
|
||||||
|
)
|
||||||
|
report_conf_data.set(
|
||||||
|
'SYSREPO_PREFIX',
|
||||||
|
NETCONF_DEP.get_variable('sysrepo_prefix', default_value: 'unknown'),
|
||||||
|
)
|
||||||
else
|
else
|
||||||
report_conf_data.set('HAVE_NETCONF', 'no')
|
report_conf_data.set('HAVE_NETCONF', 'no')
|
||||||
|
report_conf_data.set('LIBYANG_PREFIX', 'unknown')
|
||||||
|
report_conf_data.set('SYSREPO_PREFIX', 'unknown')
|
||||||
endif
|
endif
|
||||||
if FUZZ_OPT.enabled() or TESTS_OPT.enabled()
|
if FUZZ_OPT.enabled() or TESTS_OPT.enabled()
|
||||||
report_conf_data.set('HAVE_GTEST', 'yes')
|
report_conf_data.set('HAVE_GTEST', 'yes')
|
||||||
@ -631,6 +627,48 @@ else
|
|||||||
report_conf_data.set('GTEST_INCLUDE', 'unknown')
|
report_conf_data.set('GTEST_INCLUDE', 'unknown')
|
||||||
report_conf_data.set('GTEST_LIBDIR', 'unknown')
|
report_conf_data.set('GTEST_LIBDIR', 'unknown')
|
||||||
endif
|
endif
|
||||||
|
if KRB5_DEP.found()
|
||||||
|
report_conf_data.set('HAVE_KRB5', 'yes')
|
||||||
|
report_conf_data.set('KRB5_GSSAPI_VERSION', KRB5_DEP.version())
|
||||||
|
report_conf_data.set(
|
||||||
|
'KRB5_GSSAPI_CFLAGS',
|
||||||
|
KRB5_DEP.get_variable('cflags', default_value: 'unknown'),
|
||||||
|
)
|
||||||
|
report_conf_data.set(
|
||||||
|
'KRB5_GSSAPI_LIBS',
|
||||||
|
KRB5_DEP.get_variable('libs', default_value: 'unknown'),
|
||||||
|
)
|
||||||
|
report_conf_data.set(
|
||||||
|
'KRB5_GSSAPI_VENDOR',
|
||||||
|
KRB5_DEP.get_variable('vendor', default_value: 'unknown'),
|
||||||
|
)
|
||||||
|
else
|
||||||
|
report_conf_data.set('HAVE_KRB5', 'no')
|
||||||
|
report_conf_data.set('KRB5_GSSAPI_VERSION', 'unknown')
|
||||||
|
report_conf_data.set('KRB5_GSSAPI_CFLAGS', 'unknown')
|
||||||
|
report_conf_data.set('KRB5_GSSAPI_LIBS', 'unknown')
|
||||||
|
report_conf_data.set('KRB5_GSSAPI_VENDOR', 'unknown')
|
||||||
|
endif
|
||||||
|
if TESTS_OPT.enabled()
|
||||||
|
report_conf_data.set('TESTS_ENABLED', 'enabled')
|
||||||
|
else
|
||||||
|
report_conf_data.set('TESTS_ENABLED', 'disabled')
|
||||||
|
endif
|
||||||
|
if valgrind.found()
|
||||||
|
report_conf_data.set('VALGRIND', valgrind.full_path())
|
||||||
|
else
|
||||||
|
report_conf_data.set('VALGRIND', 'no')
|
||||||
|
endif
|
||||||
|
if FUZZ_OPT.enabled()
|
||||||
|
report_conf_data.set('FUZZ_ENABLED', 'enabled')
|
||||||
|
else
|
||||||
|
report_conf_data.set('FUZZ_ENABLED', 'disabled')
|
||||||
|
endif
|
||||||
|
if have_afl
|
||||||
|
report_conf_data.set('HAVE_AFL', 'yes')
|
||||||
|
else
|
||||||
|
report_conf_data.set('HAVE_AFL', 'no')
|
||||||
|
endif
|
||||||
|
|
||||||
#### Custom Targets
|
#### Custom Targets
|
||||||
|
|
||||||
|
@ -19,7 +19,16 @@ option(
|
|||||||
description: 'Support for PostgreSQL backends.',
|
description: 'Support for PostgreSQL backends.',
|
||||||
)
|
)
|
||||||
|
|
||||||
# Options for enabling various parts of code.
|
# Options for enabling testing code (not real features).
|
||||||
option('fuzz', type: 'feature', description: 'Support for fuzz testing.')
|
option(
|
||||||
option('shell', type: 'feature', description: 'Builds kea-shell.')
|
'fuzz',
|
||||||
option('tests', type: 'feature', description: 'Support for tests.')
|
type: 'feature',
|
||||||
|
value: 'disabled',
|
||||||
|
description: 'Support for fuzz testing.',
|
||||||
|
)
|
||||||
|
option(
|
||||||
|
'tests',
|
||||||
|
type: 'feature',
|
||||||
|
value: 'disabled',
|
||||||
|
description: 'Support for tests.',
|
||||||
|
)
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
if not SHELL_OPT.enabled()
|
|
||||||
subdir_done()
|
|
||||||
endif
|
|
||||||
|
|
||||||
kea_shell_conf_data = configuration_data()
|
kea_shell_conf_data = configuration_data()
|
||||||
kea_shell_conf_data.set('PYTHON', PYTHON.full_path())
|
kea_shell_conf_data.set('PYTHON', PYTHON.full_path())
|
||||||
kea_shell_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
|
kea_shell_conf_data.set('PACKAGE_VERSION', PROJECT_VERSION)
|
||||||
|
@ -23,7 +23,11 @@ if krb5_config.found()
|
|||||||
compile_args: cflags.stdout().split(),
|
compile_args: cflags.stdout().split(),
|
||||||
link_args: libs.stdout().split(),
|
link_args: libs.stdout().split(),
|
||||||
version: krb5_version,
|
version: krb5_version,
|
||||||
variables: {'vendor': vendor},
|
variables: {
|
||||||
|
'cflags': cflags.stdout().strip(),
|
||||||
|
'libs': libs.stdout().strip(),
|
||||||
|
'vendor': vendor,
|
||||||
|
},
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -54,6 +54,19 @@ foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
|
|||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
if all_deps_found
|
if all_deps_found
|
||||||
|
variables = {}
|
||||||
|
if netconf_deps['yang'].found()
|
||||||
|
libyang_prefix = netconf_deps['yang'].get_variable('prefix')
|
||||||
|
else
|
||||||
|
libyang_prefix = 'unknown'
|
||||||
|
endif
|
||||||
|
variables += {'libyang_prefix': libyang_prefix}
|
||||||
|
if netconf_deps['sysrepo'].found()
|
||||||
|
sysrepo_prefix = netconf_deps['sysrepo'].get_variable('prefix')
|
||||||
|
else
|
||||||
|
sysrepo_prefix = 'unknown'
|
||||||
|
endif
|
||||||
|
variables += {'sysrepo_prefix': sysrepo_prefix}
|
||||||
netconf = declare_dependency(
|
netconf = declare_dependency(
|
||||||
dependencies: [
|
dependencies: [
|
||||||
netconf_deps['yang'],
|
netconf_deps['yang'],
|
||||||
@ -61,12 +74,10 @@ if all_deps_found
|
|||||||
netconf_deps['sysrepo'],
|
netconf_deps['sysrepo'],
|
||||||
netconf_deps['sysrepo-cpp'],
|
netconf_deps['sysrepo-cpp'],
|
||||||
],
|
],
|
||||||
variables: {
|
variables: variables,
|
||||||
'libyang_prefix': netconf_deps['yang'].found() ? netconf_deps['yang'].get_variable('prefix') : 'unknown',
|
|
||||||
'sysrepo_prefix': netconf_deps['sysrepo'].found() ? netconf_deps['sysrepo'].get_variable('prefix') : 'unknown',
|
|
||||||
},
|
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
netconf = disabler()
|
# Can't use a disabler here?
|
||||||
|
netconf = declare_dependency('', required: false)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user