]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3443] Additions to the initial meson Proof of Concept
authorAndrei Pavel <andrei@isc.org>
Wed, 29 Jan 2025 11:23:29 +0000 (13:23 +0200)
committerAndrei Pavel <andrei@isc.org>
Tue, 4 Feb 2025 14:28:22 +0000 (16:28 +0200)
70 files changed:
compiler-checks/chrono-same-duration.cc [new file with mode: 0644]
compiler-checks/have-generic-tls-method.cc [new file with mode: 0644]
compiler-checks/have-sa-len.cc [new file with mode: 0644]
configure.ac
kea_version.h.in
meson-config.h.in [moved from config.h.in with 97% similarity]
meson-kea_version.h.in [new file with mode: 0644]
meson.build
src/bin/dhcp4/meson.build
src/bin/dhcp6/meson.build
src/bin/lfc/meson.build
src/bin/perfdhcp/meson.build
src/hooks/dhcp/bootp/meson.build
src/hooks/dhcp/flex_option/meson.build
src/hooks/dhcp/high_availability/meson.build
src/hooks/dhcp/lease_cmds/meson.build
src/hooks/dhcp/mysql/meson.build
src/hooks/dhcp/perfmon/meson.build
src/hooks/dhcp/pgsql/meson.build
src/hooks/dhcp/run_script/meson.build
src/hooks/dhcp/stat_cmds/meson.build
src/hooks/dhcp/user_chk/meson.build
src/lib/asiodns/meson.build
src/lib/asiodns/tests/meson.build
src/lib/asiolink/meson.build
src/lib/cc/meson.build
src/lib/cc/tests/meson.build
src/lib/config/meson.build
src/lib/config_backend/meson.build
src/lib/config_backend/tests/meson.build
src/lib/cryptolink/meson.build
src/lib/cryptolink/tests/meson.build
src/lib/d2srv/meson.build
src/lib/database/meson.build
src/lib/database/tests/meson.build
src/lib/dhcp/meson.build
src/lib/dhcp_ddns/meson.build
src/lib/dhcp_ddns/tests/meson.build
src/lib/dhcpsrv/meson.build
src/lib/dns/meson.build
src/lib/dns/tests/meson.build
src/lib/eval/meson.build
src/lib/eval/tests/meson.build
src/lib/exceptions/meson.build
src/lib/exceptions/tests/meson.build
src/lib/hooks/meson.build
src/lib/http/meson.build
src/lib/log/compiler/meson.build
src/lib/log/interprocess/meson.build
src/lib/log/meson.build
src/lib/log/tests/Makefile.am
src/lib/log/tests/meson.build
src/lib/log/tests/tempdir.h.in [deleted file]
src/lib/mysql/meson.build
src/lib/pgsql/meson.build
src/lib/process/cfgrpt/config_report.cc.in [moved from src/lib/process/cfgrpt/config_report.cc with 100% similarity]
src/lib/process/cfgrpt/meson.build
src/lib/process/meson.build
src/lib/stats/meson.build
src/lib/stats/tests/meson.build
src/lib/tcp/meson.build
src/lib/testutils/meson.build
src/lib/util/io/meson.build
src/lib/util/meson.build
src/lib/util/tests/meson.build
src/lib/util/unittests/meson.build
src/lib/yang/meson.build
src/share/api/meson.build
src/share/database/meson.build
src/share/yang/meson.build

diff --git a/compiler-checks/chrono-same-duration.cc b/compiler-checks/chrono-same-duration.cc
new file mode 100644 (file)
index 0000000..1e58f1e
--- /dev/null
@@ -0,0 +1,8 @@
+#include <chrono>
+#include <type_traits>
+
+int main() {
+    static_assert(std::is_same<std::chrono::system_clock::duration,
+                               std::chrono::steady_clock::duration>::value,
+                  "");
+}
diff --git a/compiler-checks/have-generic-tls-method.cc b/compiler-checks/have-generic-tls-method.cc
new file mode 100644 (file)
index 0000000..98b2b2f
--- /dev/null
@@ -0,0 +1,5 @@
+#include <boost/asio/ssl.hpp>
+
+int main() {
+    auto _(boost::asio::ssl::context::tls);
+}
diff --git a/compiler-checks/have-sa-len.cc b/compiler-checks/have-sa-len.cc
new file mode 100644 (file)
index 0000000..12f96c9
--- /dev/null
@@ -0,0 +1,7 @@
+#include <sys/types.h>
+#include <sys/socket.h>
+
+int main() {
+    struct sockaddr sa;
+    sa.sa_len = 0;
+}
index e80f0c08011accb5270f50e400c8f3642c7db362..7fde06458d915e411119e0813bb43cf83c074121 100644 (file)
@@ -1712,7 +1712,6 @@ AC_CONFIG_FILES([src/lib/log/tests/logger_lock_test.sh],
                 [chmod +x src/lib/log/tests/logger_lock_test.sh])
 AC_CONFIG_FILES([src/lib/log/tests/severity_test.sh],
                 [chmod +x src/lib/log/tests/severity_test.sh])
-AC_CONFIG_FILES([src/lib/log/tests/tempdir.h])
 AC_CONFIG_FILES([src/lib/mysql/Makefile])
 AC_CONFIG_FILES([src/lib/mysql/testutils/Makefile])
 AC_CONFIG_FILES([src/lib/mysql/tests/Makefile])
index 3f5dc81bf5565f565fc77d7c123f228988bc94e5..cb86e32187952eeb5d7a774702952e820509b727 100644 (file)
@@ -1,3 +1,3 @@
-#mesondefine EXTENDED_VERSION
-#mesondefine PACKAGE_VERSION_TYPE
-#mesondefine PREMIUM_EXTENDED_VERSION
+#define EXTENDED_VERSION "@KEA_SRCID@"
+#define PREMIUM_EXTENDED_VERSION "@PREMIUM@"
+#define PACKAGE_VERSION_TYPE "@PACKAGE_VERSION_TYPE@"
similarity index 97%
rename from config.h.in
rename to meson-config.h.in
index 17f9a5deb98032e7ba761e1aad04e19c82082014..a43b9f4035ffefdc538bf86bd20fd4df02606069 100644 (file)
@@ -71,7 +71,7 @@
 #mesondefine HAVE_BOTAN_BUILD_H
 
 /* Whether getsockopt(IPV6_USE_MIN_MTU) does not work */
-#mesondefine HAVE_BROKEN_GET_IPV
+#mesondefine HAVE_BROKEN_GET_IPV6_USE_MIN_MTU
 
 /* Whether gtest defines edit_distance::CreateUnifiedDiff */
 #mesondefine HAVE_CREATE_UNIFIED_DIFF
 #mesondefine HAVE_GSSAPI_GSSAPI_H
 
 /* Whether you have the <gssapi/gssapi_krb5.h> header file. */
-#mesondefine HAVE_GSSAPI_GSSAPI_KRB
+#mesondefine HAVE_GSSAPI_GSSAPI_KRB5_H
 
 /* gss_str_to_oid is available */
 #mesondefine HAVE_GSS_STR_TO_OID
 #mesondefine HAVE_IS_BASE_OF
 
 /* Whether you have the <krb5.h> header file. */
-#mesondefine HAVE_KRB
+#mesondefine HAVE_KRB5_H
 
 /* Whether you have the <krb5/krb5.h> header file. */
-#mesondefine HAVE_KRB
+#mesondefine HAVE_KRB5_KRB5_H
 
 /* Whether you have the <log4cplus/logger.h> header file. */
-#mesondefine HAVE_LOG
+#mesondefine HAVE_LOG4CPLUS_LOGGER_H
 
 /* MySQL is present */
 #mesondefine HAVE_MYSQL
 #mesondefine HAVE_SYS_TYPES_H
 
 /* Whether boost::asio::ssl::context::tlsv12 is available */
-#mesondefine HAVE_TLS_
+#mesondefine HAVE_TLS_1_2_METHOD
 
 /* Whether you have the <unistd.h> header file. */
 #mesondefine HAVE_UNISTD_H
 #mesondefine LIBC_MUSL
 
 /* Explicit initialization of log4cplus possible */
-#mesondefine LOG
+#mesondefine LOG4CPLUS_INITIALIZER_H
 
 /* Define to the sub-directory where libtool stores uninstalled libraries. */
 #mesondefine LT_OBJDIR
diff --git a/meson-kea_version.h.in b/meson-kea_version.h.in
new file mode 100644 (file)
index 0000000..3f5dc81
--- /dev/null
@@ -0,0 +1,3 @@
+#mesondefine EXTENDED_VERSION
+#mesondefine PACKAGE_VERSION_TYPE
+#mesondefine PREMIUM_EXTENDED_VERSION
index b9798ebd0b59195242d0221d9db91db581c70dce..7089f6c9f95c4403fd3080b561ba7a6a2c75d3eb 100644 (file)
-project('kea', 'cpp', version: '2.7.6-git', default_options : ['default_library=shared'])
+project(
+    'kea',
+    'cpp',
+    version: '2.7.7-git',
+    default_options: ['default_library=shared'],
+)
 
 cpp = meson.get_compiler('cpp')
+project_version = meson.project_version()
+
+#### Imports
 
 fs = import('fs')
 
-conf_data = configuration_data({
-  # 'CHRONO_SAME_DURATION': true,
-  # 'CONFIG_H_WAS_INCLUDED': true,
-  # 'ENABLE_DEBUG': false,
-  # 'ENABLE_LOGGER_CHECKS': false,
-  'EXTENDED_VERSION': '"@0@"'.format(meson.project_version()),
-  # 'FUZZING': false,
-  # 'FUZZING_IN_CI': false,
-  # 'HAS_UNDEFINED_PTHREAD_BEHAVIOR': false,
-  # 'HAVE_AFL': false,
-  # 'HAVE_BOOST_ASIO_COROUTINE_HPP': false,
-  # 'HAVE_BOOST_ASIO_HPP': false,
-  # 'HAVE_BOOST_ASIO_IP_ADDRESS_HPP': false,
-  # 'HAVE_BOOST_ASIO_SIGNAL_SET_HPP': false,
-  # 'HAVE_BOOST_ASIO_SSL_HPP': false,
-  # 'HAVE_BOOST_ATOMIC_HPP': false,
-  # 'HAVE_BOOST_CIRCULAR_BUFFER_HPP': false,
-  # 'HAVE_BOOST_DATE_TIME_POSIX_TIME_POSIX_TIME_TYPES_HPP': false,
-  # 'HAVE_BOOST_FOREACH_HPP': false,
-  # 'HAVE_BOOST_FUNCTIONAL_HASH_HPP': false,
-  # 'HAVE_BOOST_INTEGER_COMMON_FACTOR_HPP': false,
-  # 'HAVE_BOOST_INTERPROCESS_SYNC_INTERPROCESS_UPGRADABLE_MUTEX_HPP': false,
-  # 'HAVE_BOOST_SHARED_PTR_HPP': false,
-  # 'HAVE_BOOST_SYSTEM_ERROR_CODE_HPP': false,
-  # 'HAVE_BOTAN_ASIO_STREAM_H': false,
-  # 'HAVE_BOTAN_BUILD_H': false,
-  # 'HAVE_BROKEN_GET_IPV': false,
-  # 'HAVE_CREATE_UNIFIED_DIFF': false,
-  # 'HAVE_DLFCN_H': false,
-  # 'HAVE_EVP_MD_CTX_CREATE': false,
-  # 'HAVE_EVP_MD_CTX_DESTROY': false,
-  # 'HAVE_EVP_MD_CTX_FREE': false,
-  # 'HAVE_EVP_MD_CTX_NEW': false,
-  # 'HAVE_EVP_PKEY_NEW_MAC_KEY': false,
-  # 'HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY': false,
-  'HAVE_GENERIC_TLS_METHOD': true,
-  # 'HAVE_GSSAPI_GSSAPI_H': false,
-  # 'HAVE_GSSAPI_GSSAPI_KRB': false,
-  # 'HAVE_GSS_STR_TO_OID': false,
-  # 'HAVE_INTTYPES_H': false,
-  # 'HAVE_IS_BASE_OF': false,
-  # 'HAVE_KRB': false,
-  # 'HAVE_LOG': false,
-  # 'HAVE_MYSQL': false,
-  # 'HAVE_MYSQL_GET_OPTION': false,
-  # 'HAVE_MYSQL_MY_BOOL': false,
-  # 'HAVE_MYSQL_OPT_RECONNECT': false,
-  # 'HAVE_NETCONF': false,
-  # 'HAVE_OPTRESET': false,
-  # 'HAVE_PGSQL': false,
-  # 'HAVE_PGSQL_SSL': false,
-  # 'HAVE_PGSQL_TCP_USER_TIMEOUT': false,
-  # 'HAVE_PSELECT': false,
-  # 'HAVE_SA_LEN': false,
-  # 'HAVE_STDBOOL_H': false,
-  # 'HAVE_STDINT_H': false,
-  # 'HAVE_STDIO_H': false,
-  # 'HAVE_STDLIB_H': false,
-  # 'HAVE_STREAM_TRUNCATED_ERROR': false,
-  # 'HAVE_STRINGS_H': false,
-  # 'HAVE_STRING_H': false,
-  # 'HAVE_SYS_DEVPOLL_H': false,
-  # 'HAVE_SYS_FILIO_H': false,
-  # 'HAVE_SYS_STAT_H': false,
-  # 'HAVE_SYS_TYPES_H': false,
-  # 'HAVE_TLS_': false,
-  # 'HAVE_UNISTD_H': false,
-  # 'HAVE_UTILS_ERRCODES_H': false,
-  # 'HAVE_VALGRIND_HEADERS': false,
-  # 'HAVE_VALGRIND_VALGRIND_H': false,
-  # 'HAVE__BOOL': false,
-  # 'LIBC_MUSL': false,
-  # 'LOG': false,
-  # 'LT_OBJDIR': false,
-  # 'OS_BSD': false,
-  # 'OS_FREEBSD': false,
-  # 'OS_LINUX': false,
-  # 'OS_NETBSD': false,
-  # 'OS_OPENBSD': false,
-  # 'OS_OSX': false,
-  # 'OS_SOLARIS': false,
-  # 'PACKAGE': 'kea',
-  # 'PACKAGE_BUGREPORT': 'kea-dev@lists.isc.org',
-  # 'PACKAGE_NAME': 'kea',
-  # 'PACKAGE_STRING': 'kea @0@'.format(meson.project_version()),
-  # 'PACKAGE_TARNAME': 'kea',
-  # 'PACKAGE_URL': '',
-  # 'PACKAGE_VERSION': meson.project_version(),
-  'PACKAGE_VERSION_TYPE': '"tarball"',
-  # 'PREMIUM': false,
-  'PREMIUM_EXTENDED_VERSION': '"@0@"'.format(meson.project_version()),
-  # 'STDC_HEADERS': false,
-  # 'TOP_BUILDDIR': false,
-  # 'USE_STATIC_LINK': false,
-  'VERSION': '"@0@"'.format(meson.project_version()),
-  # 'WITH_BOTAN': false,
-  # 'WITH_HEIMDAL': false,
-  # 'WITH_OPENSSL': false,
-  # 'YYTEXT_POINTER': false,
-  # 'SIZE_T': 'size_t',
-  # 'SSIZE_T': 'ssize_t',
-})
+#### Variables
+
+TOP_BUILD_DIR = meson.current_build_dir()
+TOP_SOURCE_DIR = meson.current_source_dir()
+KEA_ADMIN = f'@TOP_BUILD_DIR@/src/bin/admin/kea-admin'
+KEA_LFC = f'@TOP_BUILD_DIR@/src/bin/lfc/kea-lfc'
+
+#### Configuration Data
+
+conf_data = configuration_data(
+    {
+        # 'CONFIG_H_WAS_INCLUDED': true,
+        # 'ENABLE_DEBUG': false,
+        # 'ENABLE_LOGGER_CHECKS': false,
+        'EXTENDED_VERSION': f'"@project_version@"',
+        # 'FUZZING': false,
+        # 'FUZZING_IN_CI': false,
+        # 'HAS_UNDEFINED_PTHREAD_BEHAVIOR': false,
+        # 'HAVE_AFL': false,
+        # 'HAVE_BOOST_ASIO_COROUTINE_HPP': false,
+        # 'HAVE_BOOST_ASIO_HPP': false,
+        # 'HAVE_BOOST_ASIO_IP_ADDRESS_HPP': false,
+        # 'HAVE_BOOST_ASIO_SIGNAL_SET_HPP': false,
+        # 'HAVE_BOOST_ASIO_SSL_HPP': false,
+        # 'HAVE_BOOST_ATOMIC_HPP': false,
+        # 'HAVE_BOOST_CIRCULAR_BUFFER_HPP': false,
+        # 'HAVE_BOOST_DATE_TIME_POSIX_TIME_POSIX_TIME_TYPES_HPP': false,
+        # 'HAVE_BOOST_FOREACH_HPP': false,
+        # 'HAVE_BOOST_FUNCTIONAL_HASH_HPP': false,
+        # 'HAVE_BOOST_INTEGER_COMMON_FACTOR_HPP': false,
+        # 'HAVE_BOOST_INTERPROCESS_SYNC_INTERPROCESS_UPGRADABLE_MUTEX_HPP': false,
+        # 'HAVE_BOOST_SHARED_PTR_HPP': false,
+        # 'HAVE_BOOST_SYSTEM_ERROR_CODE_HPP': false,
+        # 'HAVE_BOTAN_ASIO_STREAM_H': false,
+        # 'HAVE_BOTAN_BUILD_H': false,
+        # 'HAVE_BROKEN_GET_IPV': false,
+        # 'HAVE_CREATE_UNIFIED_DIFF': false,
+        # 'HAVE_DLFCN_H': false,
+        # 'HAVE_EVP_MD_CTX_CREATE': false,
+        # 'HAVE_EVP_MD_CTX_DESTROY': false,
+        # 'HAVE_EVP_MD_CTX_FREE': false,
+        # 'HAVE_EVP_MD_CTX_NEW': false,
+        # 'HAVE_EVP_PKEY_NEW_MAC_KEY': false,
+        # 'HAVE_EVP_PKEY_NEW_RAW_PRIVATE_KEY': false,
+        # 'HAVE_GSSAPI_GSSAPI_H': false,
+        # 'HAVE_GSSAPI_GSSAPI_KRB': false,
+        # 'HAVE_GSS_STR_TO_OID': false,
+        # 'HAVE_INTTYPES_H': false,
+        # 'HAVE_IS_BASE_OF': false,
+        # 'HAVE_KRB': false,
+        # 'HAVE_LOG': false,
+        # 'HAVE_MYSQL_GET_OPTION': false,
+        # 'HAVE_MYSQL_OPT_RECONNECT': false,
+        # 'HAVE_NETCONF': false,
+        # 'HAVE_OPTRESET': false,
+        # 'HAVE_PGSQL_SSL': false,
+        # 'HAVE_PGSQL_TCP_USER_TIMEOUT': false,
+        # 'HAVE_PSELECT': false,
+        # 'HAVE_STDBOOL_H': false,
+        # 'HAVE_STDINT_H': false,
+        # 'HAVE_STDIO_H': false,
+        # 'HAVE_STDLIB_H': false,
+        # 'HAVE_STRINGS_H': false,
+        # 'HAVE_STRING_H': false,
+        # 'HAVE_SYS_DEVPOLL_H': false,
+        # 'HAVE_SYS_FILIO_H': false,
+        # 'HAVE_SYS_STAT_H': false,
+        # 'HAVE_SYS_TYPES_H': false,
+        # 'HAVE_TLS_': false,
+        # 'HAVE_UNISTD_H': false,
+        # 'HAVE_UTILS_ERRCODES_H': false,
+        # 'HAVE_VALGRIND_HEADERS': false,
+        # 'HAVE_VALGRIND_VALGRIND_H': false,
+        # 'HAVE__BOOL': false,
+        # 'LIBC_MUSL': false,
+        # 'LOG': false,
+        # 'LT_OBJDIR': false,
+        # 'PACKAGE': 'kea',
+        # 'PACKAGE_BUGREPORT': 'kea-dev@lists.isc.org',
+        # 'PACKAGE_NAME': 'kea',
+        # 'PACKAGE_STRING': f'kea "@project_version@"',
+        # 'PACKAGE_TARNAME': 'kea',
+        # 'PACKAGE_URL': '',
+        # 'PACKAGE_VERSION': meson.project_version(),
+        'PACKAGE_VERSION_TYPE': '"tarball"',
+        # 'PREMIUM': false,
+        'PREMIUM_EXTENDED_VERSION': f'"@project_version@"',
+        # 'STDC_HEADERS': false,
+        # 'TOP_BUILDDIR': false,
+        # 'USE_STATIC_LINK': false,
+        'VERSION': f'"@project_version@"',
+        # 'WITH_HEIMDAL': false,
+        # 'YYTEXT_POINTER': false,
+        # 'SIZE_T': 'size_t',
+        # 'SSIZE_T': 'ssize_t',
+    },
+)
+
+#### Dependencies
 
 boost = dependency('boost', version: '>=1.66')
-botan = dependency('botan', required: false)
 gtest = dependency('gtest', required: false)
 log4cplus = dependency('log4cplus')
+
+# Cryptography
+crypto = disabler()
+botan = disabler()
+foreach dep : ['botan-2', 'botan', 'botan-3']
+    botan = dependency(dep, required: false)
+    if botan.found()
+        break
+    endif
+endforeach
+openssl = dependency('openssl', required: false)
+if botan.found() and false  # remove "or flase" when botan+mariadb gets fixes
+    crypto = botan
+    conf_data.set('WITH_BOTAN', true)
+    message('Using Botan.')
+elif openssl.found()
+    crypto = openssl
+    conf_data.set('WITH_OPENSSL', true)
+    message('Using OpenSSL.')
+endif
+if not crypto.found()
+    error('Build failed: Could not find neither botan nor openssl libraries.')
+endif
+
+# Kerberos
 krb5 = dependency('krb5', required: false)
-mysql = dependency('mariadb', required: false)
-if not mysql.found()
-  mysql = dependency('mysql', required: false)
+if not krb5.found()
+    krb5_config = find_program('krb5-config', required: false)
+    cflags = run_command([krb5_config, '--cflags'], check: false)
+    libs = run_command([krb5_config, '--libs'], check: false)
+    if cflags.returncode() == 0 and libs.returncode() == 0
+        krb5 = declare_dependency(
+            compile_args: cflags.stdout().split(),
+            link_args: libs.stdout().split(),
+        )
+    endif
 endif
+
+# MySQL
+mysql = dependency('mariadb', required: false)
 if not mysql.found()
-  mysql_config = find_program('mariadb_config', required: false)
-  if mysql_config.found()
-    mysql = declare_dependency(compile_args: run_command([mysql_config, '--cflags']).stdout().split(),
-                               link_args: run_command([mysql_config, '--libs']).stdout().split())
-  endif
+    mysql = dependency('mysql', required: false)
 endif
-if not mysql.found()
-  mysql_config = find_program('mysql_config')
-  if mysql_config.found()
-    mysql = declare_dependency(compile_args: run_command([mysql_config, '--cflags']).stdout().split(),
-                               link_args: run_command([mysql_config, '--libs']).stdout().split())
-  endif
+foreach mysql_config : ['mariadb_config', 'mysql_config']
+    if mysql.found()
+        continue
+    endif
+    mysql_config = find_program(mysql_config, required: false)
+    if not mysql_config.found()
+        continue
+    endif
+    cflags = run_command([mysql_config, '--cflags'], check: false)
+    libs = run_command([mysql_config, '--libs'], check: false)
+    if cflags.returncode() == 0 and libs.returncode() == 0
+        mysql = declare_dependency(
+            compile_args: cflags.stdout().split(),
+            link_args: libs.stdout().split(),
+        )
+        break
+    endif
+endforeach
+if mysql.found()
+    conf_data.set('HAVE_MYSQL', true)
 endif
+
+# PostgreSQL
 postgresql = dependency('libpq', required: false)
-openssl = dependency('openssl', required: false)
+if not postgresql.found()
+    pg_config = find_program('pg_config', required: false)
+    cflags = run_command([pg_config, '--cflags'], check: false)
+    libs = run_command([pg_config, '--libs'], check: false)
+    if cflags.returncode() == 0 and libs.returncode() == 0
+        krb5 = declare_dependency(
+            compile_args: cflags.stdout().split(),
+            link_args: libs.stdout().split(),
+        )
+    endif
+endif
+postgresql_server_header = disabler()
+foreach dir : ['/usr/include/pgsql/server', '/usr/include/postgresql/server']
+    if not fs.is_dir(dir)
+        continue
+    endif
+    exists = cpp.has_header(
+        'utils/errcodes.h',
+        include_directories: [include_directories(dir)],
+        required: false,
+    )
+    if exists
+        postgresql_server_header = declare_dependency(include_directories: dir)
+        break
+    endif
+endforeach
+if postgresql.found()
+    conf_data.set('HAVE_PGSQL', true)
+endif
 
+# NETCONF
 netconf_deps = {}
 netconf_deps_array = []
 netconf_deps_found = true
 foreach dep : ['yang', 'yang-cpp', 'sysrepo', 'sysrepo-cpp']
-  netconf_deps = netconf_deps + {dep: cpp.find_library(dep, dirs: [f'/opt/@dep@/lib'], required: false)}
-  if netconf_deps[dep].found()
-    netconf_deps = netconf_deps + {dep: declare_dependency(
-      dependencies: netconf_deps[dep],
-      include_directories: include_directories(f'/opt/@dep@/include'),
-    )}
-    netconf_deps_array += netconf_deps[dep]
-  else
-    netconf_deps_found = false
-    break
-  endif
+    netconf_deps = netconf_deps + {dep: dependency(dep, required: false)}
+    if not netconf_deps[dep].found()
+        lib = cpp.find_library(dep, dirs: [f'/opt/@dep@/lib'], required: false)
+        if lib.found()
+            netconf_deps = netconf_deps + {
+                dep: declare_dependency(
+                    dependencies: lib,
+                    include_directories: include_directories(
+                        f'/opt/@dep@/include',
+                    ),
+                ),
+            }
+        endif
+    endif
+    if netconf_deps[dep].found()
+        netconf_deps_array += netconf_deps[dep]
+    else
+        netconf_deps_found = false
+    endif
 endforeach
-if netconf_deps_found
-  add_project_arguments('-std=c++20', language: 'cpp')
-endif
 
-if openssl.found()
-  crypto = openssl
-  conf_data.set('WITH_OPENSSL', true)
-  message('Using OpenSSL.')
-elif botan.found()
-  crypto = botan
-  conf_data.set('WITH_BOTAN', true)
-  message('Using Botan.')
-else
-  error('Build failed: Could not find neither botan nor openssl libraries.')
-endif
+#### Compiler Checks
 
-result = cpp.run(fs.read('compiler-checks/stream-truncated-error.cc'), name: 'HAVE_STREAM_TRUNCATED_ERROR', dependencies: [crypto])
-if result.compiled() and result.returncode() == 0
-  conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', true)
-endif
+result = cpp.run(
+    fs.read('compiler-checks/chrono-same-duration.cc'),
+    name: 'CHRONO_SAME_DURATION',
+    dependencies: [boost],
+)
+conf_data.set('CHRONO_SAME_DURATION', result.returncode() == 0)
+
+result = cpp.run(
+    fs.read('compiler-checks/have-generic-tls-method.cc'),
+    name: 'HAVE_GENERIC_TLS_METHOD',
+    dependencies: [crypto],
+)
+conf_data.set('HAVE_GENERIC_TLS_METHOD', result.returncode() == 0)
+
+result = cpp.run(fs.read('compiler-checks/have-sa-len.cc'), name: 'HAVE_SA_LEN')
+conf_data.set('HAVE_SA_LEN', result.returncode() == 0)
 
 if mysql.found()
-  result = cpp.run(fs.read('compiler-checks/mysql-my-bool.cc'), name: 'HAVE_MYSQL_MY_BOOL', dependencies: [mysql])
-  if result.compiled() and result.returncode() == 0
-    conf_data.set('HAVE_MYSQL_MY_BOOL', true)
-  endif
+    result = cpp.run(
+        fs.read('compiler-checks/mysql-my-bool.cc'),
+        name: 'HAVE_MYSQL_MY_BOOL',
+        dependencies: [mysql],
+    )
+    conf_data.set('HAVE_MYSQL_MY_BOOL', result.returncode() == 0)
 endif
 
-system = build_machine.system()
-if system == 'linux'
-  conf_data.set('OS_LINUX', true)
-elif system == 'freebsd'
-  conf_data.set('OS_BSD', true)
-  conf_data.set('OS_FREEBSD', true)
-  conf_data.set('HAVE_SA_LEN', true)
-elif system == 'netbsd'
-  conf_data.set('OS_BSD', true)
-  conf_data.set('OS_NETBSD', true)
-  conf_data.set('HAVE_SA_LEN', true)
-elif system == 'openbsd'
-  conf_data.set('OS_BSD', true)
-  conf_data.set('OS_OPENBSD', true)
-  conf_data.set('HAVE_SA_LEN', true)
-elif system == 'sun'
-  conf_data.set('OS_SOLARIS', true)
-elif system == 'darwin'
-  conf_data.set('OS_BSD', true)
-  conf_data.set('OS_OSX', true)
-  conf_data.set('HAVE_SA_LEN', true)
+result = cpp.run(
+    fs.read('compiler-checks/stream-truncated-error.cc'),
+    name: 'HAVE_STREAM_TRUNCATED_ERROR',
+    dependencies: [crypto],
+)
+conf_data.set('HAVE_STREAM_TRUNCATED_ERROR', result.returncode() == 0)
+
+#### System-specific Variables
+
+SYSTEM = build_machine.system()
+if SYSTEM == 'linux'
+    conf_data.set('OS_LINUX', true)
+elif SYSTEM == 'freebsd'
+    conf_data.set('OS_BSD', true)
+    conf_data.set('OS_FREEBSD', true)
+elif SYSTEM == 'netbsd'
+    conf_data.set('OS_BSD', true)
+    conf_data.set('OS_NETBSD', true)
+elif SYSTEM == 'openbsd'
+    conf_data.set('OS_BSD', true)
+    conf_data.set('OS_OPENBSD', true)
+elif SYSTEM == 'sun'
+    conf_data.set('OS_SOLARIS', true)
+elif SYSTEM == 'darwin'
+    conf_data.set('OS_BSD', true)
+    conf_data.set('OS_OSX', true)
 else
-  error(f'Build failed: Unsupported system "@system@".')
+    error(f'Build failed: Unsupported system "@SYSTEM@".')
 endif
-message(f'Detected system "@system@".')
+message(f'Detected system "@SYSTEM@".')
+
+#### System-specific Compiler Flags
 
 prefix = get_option('prefix')
-if system == 'darwin'
-  add_project_arguments('-D__APPLE_USE_RFC_3542', language: 'cpp')
-  add_project_link_arguments(f'-Wl,-rpath,@prefix@/lib', language: 'cpp')
+if SYSTEM == 'darwin'
+    add_project_arguments('-D__APPLE_USE_RFC_3542', language: 'cpp')
+    add_project_link_arguments(f'-Wl,-rpath,@prefix@/lib', language: 'cpp')
 else
-  conf_data.set('CHRONO_SAME_DURATION', true)
-  add_project_link_arguments(f'-Wl,-rpath=@prefix@/lib', language: 'cpp')
+    add_project_link_arguments(f'-Wl,-rpath=@prefix@/lib', language: 'cpp')
 endif
 
-have_premium = false
-if fs.is_dir('premium')
-  have_premium = true
-  conf_data.set('PREMIUM', true)
+have_premium = fs.is_dir('premium')
+if have_premium
+    conf_data.set('PREMIUM', true)
 endif
 
-configure_file(input : 'config.h.in',
-               output : 'config.h',
-               configuration : conf_data)
+#### Configuration Files
+
+# TODO: Change to config.h.in when autotools are removed.
+configure_file(
+    input: 'meson-config.h.in',
+    output: 'config.h',
+    configuration: conf_data,
+)
+
+# TODO: Change to kea_version.h.in when autotools are removed.
+configure_file(
+    input: 'meson-kea_version.h.in',
+    output: 'kea_version.h',
+    configuration: conf_data,
+)
 
-configure_file(input : 'kea_version.h.in',
-               output : 'kea_version.h',
-               configuration : conf_data)
+#### Default Includes
 
-includes = [
-  include_directories('.'),
-  include_directories('src/bin'),
-  include_directories('src/lib'),
+INCLUDES = [
+    include_directories('.'),
+    include_directories('src/bin'),
+    include_directories('src/lib'),
 ]
 
-kea_admin = '@0@/src/bin/admin/kea-admin'.format(meson.current_build_dir())
-kea_lfc = '@0@/src/bin/lfc/kea-lfc'.format(meson.current_build_dir())
+#### Build Starts Here
 
-libs_built_so_far = []
+LIBS_BUILT_SO_FAR = []
 subdir('src')
 if have_premium
-  subdir('premium')
+    subdir('premium')
 endif
index 2e9c55453aa19693d387175430232bf94d0031bd..3dc437661f298bc19589a32fec6287e572022304 100644 (file)
@@ -1,22 +1,25 @@
-dhcp4_lib = static_library('dhcp4',
-  'client_handler.cc',
-  'ctrl_dhcp4_srv.cc',
-  'dhcp4to6_ipc.cc',
-  'dhcp4_lexer.cc',
-  'dhcp4_log.cc',
-  'dhcp4_messages.cc',
-  'dhcp4_parser.cc',
-  'dhcp4_srv.cc',
-  'json_config_parser.cc',
-  'parser_context.cc',
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far,
+dhcp4_lib = static_library(
+    'dhcp4',
+    'client_handler.cc',
+    'ctrl_dhcp4_srv.cc',
+    'dhcp4to6_ipc.cc',
+    'dhcp4_lexer.cc',
+    'dhcp4_log.cc',
+    'dhcp4_messages.cc',
+    'dhcp4_parser.cc',
+    'dhcp4_srv.cc',
+    'json_config_parser.cc',
+    'parser_context.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR,
 )
-kea_dhcp4_exe = executable('kea-dhcp4',
-  'main.cc',
-  dependencies: [crypto],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'sbin',
-  link_with: libs_built_so_far + [dhcp4_lib],
+executable(
+    'kea-dhcp4',
+    'main.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'sbin',
+    link_with: LIBS_BUILT_SO_FAR + [dhcp4_lib],
 )
index ce4e9a87c97aa47cecba1416fc95fc1356c185d0..146eb9765e851f5edd31b374616c964b8ba3ae39 100644 (file)
@@ -1,32 +1,36 @@
-dhcp6_lib = static_library('dhcp6',
-  'client_handler.cc',
-  'client_handler.h',
-  'ctrl_dhcp6_srv.cc',
-  'ctrl_dhcp6_srv.h',
-  'dhcp6to4_ipc.cc',
-  'dhcp6to4_ipc.h',
-  'dhcp6_lexer.cc',
-  'dhcp6_log.cc',
-  'dhcp6_log.h',
-  'dhcp6_messages.cc',
-  'dhcp6_messages.h',
-  'dhcp6_parser.cc',
-  'dhcp6_parser.h',
-  'dhcp6_srv.cc',
-  'dhcp6_srv.h',
-  'json_config_parser.cc',
-  'json_config_parser.h',
-  'main.cc',
-  'parser_context.cc',
-  'parser_context.h',
-  'parser_context_decl.h',
-  include_directories: includes
+dhcp6_lib = static_library(
+    'dhcp6',
+    'client_handler.cc',
+    'client_handler.h',
+    'ctrl_dhcp6_srv.cc',
+    'ctrl_dhcp6_srv.h',
+    'dhcp6to4_ipc.cc',
+    'dhcp6to4_ipc.h',
+    'dhcp6_lexer.cc',
+    'dhcp6_log.cc',
+    'dhcp6_log.h',
+    'dhcp6_messages.cc',
+    'dhcp6_messages.h',
+    'dhcp6_parser.cc',
+    'dhcp6_parser.h',
+    'dhcp6_srv.cc',
+    'dhcp6_srv.h',
+    'json_config_parser.cc',
+    'json_config_parser.h',
+    'main.cc',
+    'parser_context.cc',
+    'parser_context.h',
+    'parser_context_decl.h',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR,
 )
-kea_dhcp6_exe = executable('kea-dhcp6',
-  'main.cc',
-  dependencies: [crypto],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'sbin',
-  link_with: libs_built_so_far + [dhcp6_lib],
+executable(
+    'kea-dhcp6',
+    'main.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'sbin',
+    link_with: LIBS_BUILT_SO_FAR + [dhcp6_lib],
 )
index 870a0da2ba388c182482bf11c3e00a2da7f8db7b..f8bb3160ad9983c6bdacdff9b86c11392b18ac0a 100644 (file)
@@ -1,17 +1,19 @@
-lfc_lib = static_library('lfc',
-  'lfc_controller.cc',
-  'lfc_controller.h',
-  'lfc_log.cc',
-  'lfc_log.h',
-  'lfc_messages.cc',
-  'lfc_messages.h',
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far,
+lfc_lib = static_library(
+    'lfc',
+    'lfc_controller.cc',
+    'lfc_controller.h',
+    'lfc_log.cc',
+    'lfc_log.h',
+    'lfc_messages.cc',
+    'lfc_messages.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR,
 )
-kea_lfc_exe = executable('kea-lfc',
-  'main.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'sbin',
-  link_with: libs_built_so_far + [lfc_lib],
+executable(
+    'kea-lfc',
+    'main.cc',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'sbin',
+    link_with: LIBS_BUILT_SO_FAR + [lfc_lib],
 )
index 74cc31269fb25cae45dbe0b6f8d2545eddc82c30..fa73e45f164166550e1740b9e70d868d61d6f398 100644 (file)
@@ -1,36 +1,38 @@
-perfdhcplib_lib = static_library('perfdhcplib',
-  'abstract_scen.h',
-  'avalanche_scen.cc',
-  'avalanche_scen.h',
-  'basic_scen.cc',
-  'basic_scen.h',
-  'command_options.cc',
-  'command_options.h',
-  'localized_option.h',
-  'packet_storage.h',
-  'perf_pkt4.cc',
-  'perf_pkt4.h',
-  'perf_pkt6.cc',
-  'perf_pkt6.h',
-  'perf_socket.cc',
-  'perf_socket.h',
-  'pkt_transform.cc',
-  'pkt_transform.h',
-  'rate_control.cc',
-  'rate_control.h',
-  'receiver.cc',
-  'receiver.h',
-  'stats_mgr.cc',
-  'stats_mgr.h',
-  'test_control.cc',
-  'test_control.h',
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far,
+perfdhcplib_lib = static_library(
+    'perfdhcplib',
+    'abstract_scen.h',
+    'avalanche_scen.cc',
+    'avalanche_scen.h',
+    'basic_scen.cc',
+    'basic_scen.h',
+    'command_options.cc',
+    'command_options.h',
+    'localized_option.h',
+    'packet_storage.h',
+    'perf_pkt4.cc',
+    'perf_pkt4.h',
+    'perf_pkt6.cc',
+    'perf_pkt6.h',
+    'perf_socket.cc',
+    'perf_socket.h',
+    'pkt_transform.cc',
+    'pkt_transform.h',
+    'rate_control.cc',
+    'rate_control.h',
+    'receiver.cc',
+    'receiver.h',
+    'stats_mgr.cc',
+    'stats_mgr.h',
+    'test_control.cc',
+    'test_control.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR,
 )
-perfdhcp_exe = executable('perfdhcp',
-  'main.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'sbin',
-  link_with: libs_built_so_far + [perfdhcplib_lib],
+executable(
+    'perfdhcp',
+    'main.cc',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'sbin',
+    link_with: LIBS_BUILT_SO_FAR + [perfdhcplib_lib],
 )
index 88fa697a2959f6f3a0b154c42c43a04e09b7d4ac..efcd23effa3983667756a5f15c5a3cc806fa0347 100644 (file)
@@ -1,12 +1,13 @@
-dhcp_bootp_lib = library('dhcp_bootp',
-  'bootp_callouts.cc',
-  'bootp_log.cc',
-  'bootp_log.h',
-  'bootp_messages.cc',
-  'bootp_messages.h',
-  'version.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_bootp_lib = library(
+    'dhcp_bootp',
+    'bootp_callouts.cc',
+    'bootp_log.cc',
+    'bootp_log.h',
+    'bootp_messages.cc',
+    'bootp_messages.h',
+    'version.cc',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index a7753d0b2008e1d56c0a00a5496d2a4e9c36b527..881a163f534e3a3f29d111ee7d7d0626dc65f039 100644 (file)
@@ -1,14 +1,16 @@
-dhcp_flex_option_lib = library('dhcp_flex_option',
-  'flex_option.cc',
-  'flex_option.h',
-  'flex_option_callouts.cc',
-  'flex_option_log.cc',
-  'flex_option_log.h',
-  'flex_option_messages.cc',
-  'flex_option_messages.h',
-  'version.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_flex_option_lib = library(
+    'dhcp_flex_option',
+    'flex_option.cc',
+    'flex_option.h',
+    'flex_option_callouts.cc',
+    'flex_option_log.cc',
+    'flex_option_log.h',
+    'flex_option_messages.cc',
+    'flex_option_messages.h',
+    'version.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index cbbd345c89b6fb61678b6cf6a02fc3b856b95000..99730a78d85f0cbdb5bdddbaf2ecb6f9e133dceb 100644 (file)
@@ -1,35 +1,36 @@
-dhcp_high_availability_lib = library('dhcp_high_availability',
-  'command_creator.cc',
-  'command_creator.h',
-  'communication_state.cc',
-  'communication_state.h',
-  'ha_callouts.cc',
-  'ha_config.cc',
-  'ha_config.h',
-  'ha_config_parser.cc',
-  'ha_config_parser.h',
-  'ha_impl.cc',
-  'ha_impl.h',
-  'ha_log.cc',
-  'ha_log.h',
-  'ha_messages.cc',
-  'ha_messages.h',
-  'ha_relationship_mapper.h',
-  'ha_server_type.h',
-  'ha_service.cc',
-  'ha_service.h',
-  'ha_service_states.cc',
-  'ha_service_states.h',
-  'lease_sync_filter.cc',
-  'lease_sync_filter.h',
-  'lease_update_backlog.cc',
-  'lease_update_backlog.h',
-  'query_filter.cc',
-  'query_filter.h',
-  'version.cc',
-  dependencies: [crypto],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_high_availability_lib = library(
+    'dhcp_high_availability',
+    'command_creator.cc',
+    'command_creator.h',
+    'communication_state.cc',
+    'communication_state.h',
+    'ha_callouts.cc',
+    'ha_config.cc',
+    'ha_config.h',
+    'ha_config_parser.cc',
+    'ha_config_parser.h',
+    'ha_impl.cc',
+    'ha_impl.h',
+    'ha_log.cc',
+    'ha_log.h',
+    'ha_messages.cc',
+    'ha_messages.h',
+    'ha_relationship_mapper.h',
+    'ha_server_type.h',
+    'ha_service.cc',
+    'ha_service.h',
+    'ha_service_states.cc',
+    'ha_service_states.h',
+    'lease_sync_filter.cc',
+    'lease_sync_filter.h',
+    'lease_update_backlog.cc',
+    'lease_update_backlog.h',
+    'query_filter.cc',
+    'query_filter.h',
+    'version.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index 90160399f22e44d30f5f977e23d087a8fe78a6eb..e686d8963b1eec270629e2d242363f7344a5dc99 100644 (file)
@@ -1,17 +1,19 @@
-dhcp_lease_cmds_lib = library('dhcp_lease_cmds',
-  'lease_cmds.cc',
-  'lease_cmds.h',
-  'lease_cmds_callouts.cc',
-  'lease_cmds_exceptions.h',
-  'lease_cmds_log.cc',
-  'lease_cmds_log.h',
-  'lease_cmds_messages.cc',
-  'lease_cmds_messages.h',
-  'lease_parser.cc',
-  'lease_parser.h',
-  'version.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_lease_cmds_lib = library(
+    'dhcp_lease_cmds',
+    'lease_cmds.cc',
+    'lease_cmds.h',
+    'lease_cmds_callouts.cc',
+    'lease_cmds_exceptions.h',
+    'lease_cmds_log.cc',
+    'lease_cmds_log.h',
+    'lease_cmds_messages.cc',
+    'lease_cmds_messages.h',
+    'lease_parser.cc',
+    'lease_parser.h',
+    'version.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index ae0616b6bb4e8e9d942ed5c391d4ddb04b0fde93..63a6581f6bc8fd5c3b0b70e2c297c28134208dce 100644 (file)
@@ -1,36 +1,37 @@
 if not mysql.found()
-  subdir_done()
+    subdir_done()
 endif
 
-dhcp_mysql_lib = library('dhcp_mysql',
-  'mysql_callouts.cc',
-  'mysql_cb_dhcp4.cc',
-  'mysql_cb_dhcp4.h',
-  'mysql_cb_dhcp6.cc',
-  'mysql_cb_dhcp6.h',
-  'mysql_cb_impl.cc',
-  'mysql_cb_impl.h',
-  'mysql_cb_log.cc',
-  'mysql_cb_log.h',
-  'mysql_cb_messages.cc',
-  'mysql_cb_messages.h',
-  'mysql_hb_log.cc',
-  'mysql_hb_log.h',
-  'mysql_hb_messages.cc',
-  'mysql_hb_messages.h',
-  'mysql_host_data_source.cc',
-  'mysql_host_data_source.h',
-  'mysql_lb_log.cc',
-  'mysql_lb_log.h',
-  'mysql_lb_messages.cc',
-  'mysql_lb_messages.h',
-  'mysql_lease_mgr.cc',
-  'mysql_lease_mgr.h',
-  'mysql_query_macros_dhcp.h',
-  'version.cc',
-  dependencies: [mysql],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_mysql_lib = library(
+    'dhcp_mysql',
+    'mysql_callouts.cc',
+    'mysql_cb_dhcp4.cc',
+    'mysql_cb_dhcp4.h',
+    'mysql_cb_dhcp6.cc',
+    'mysql_cb_dhcp6.h',
+    'mysql_cb_impl.cc',
+    'mysql_cb_impl.h',
+    'mysql_cb_log.cc',
+    'mysql_cb_log.h',
+    'mysql_cb_messages.cc',
+    'mysql_cb_messages.h',
+    'mysql_hb_log.cc',
+    'mysql_hb_log.h',
+    'mysql_hb_messages.cc',
+    'mysql_hb_messages.h',
+    'mysql_host_data_source.cc',
+    'mysql_host_data_source.h',
+    'mysql_lb_log.cc',
+    'mysql_lb_log.h',
+    'mysql_lb_messages.cc',
+    'mysql_lb_messages.h',
+    'mysql_lease_mgr.cc',
+    'mysql_lease_mgr.h',
+    'mysql_query_macros_dhcp.h',
+    'version.cc',
+    dependencies: [crypto, mysql],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index c203a82c77745ad86274db2dbd07ff6421aabfbd..180afeb952199b12b069cd3b62d5e79982a6db63 100644 (file)
@@ -1,24 +1,26 @@
-dhcp_perfmon_lib = library('dhcp_perfmon',
-  'alarm.cc',
-  'alarm.h',
-  'alarm_store.cc',
-  'alarm_store.h',
-  'monitored_duration.cc',
-  'monitored_duration.h',
-  'monitored_duration_store.cc',
-  'monitored_duration_store.h',
-  'perfmon_callouts.cc',
-  'perfmon_config.cc',
-  'perfmon_config.h',
-  'perfmon_log.cc',
-  'perfmon_log.h',
-  'perfmon_messages.cc',
-  'perfmon_messages.h',
-  'perfmon_mgr.cc',
-  'perfmon_mgr.h',
-  'version.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_perfmon_lib = library(
+    'dhcp_perfmon',
+    'alarm.cc',
+    'alarm.h',
+    'alarm_store.cc',
+    'alarm_store.h',
+    'monitored_duration.cc',
+    'monitored_duration.h',
+    'monitored_duration_store.cc',
+    'monitored_duration_store.h',
+    'perfmon_callouts.cc',
+    'perfmon_config.cc',
+    'perfmon_config.h',
+    'perfmon_log.cc',
+    'perfmon_log.h',
+    'perfmon_messages.cc',
+    'perfmon_messages.h',
+    'perfmon_mgr.cc',
+    'perfmon_mgr.h',
+    'version.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index 99297a23ebc7d4915d135f305b8e49e9bd52b539..6c5cc25904c6588379c60d70f3d56f5b40274e14 100644 (file)
@@ -1,36 +1,37 @@
-if not postgresql.found()
-  subdir_done()
+if not postgresql.found() or not postgresql_server_header.found()
+    subdir_done()
 endif
 
-dhcp_pgsql_lib = library('dhcp_pgsql',
-  'pgsql_callouts.cc',
-  'pgsql_cb_dhcp4.cc',
-  'pgsql_cb_dhcp4.h',
-  'pgsql_cb_dhcp6.cc',
-  'pgsql_cb_dhcp6.h',
-  'pgsql_cb_impl.cc',
-  'pgsql_cb_impl.h',
-  'pgsql_cb_log.cc',
-  'pgsql_cb_log.h',
-  'pgsql_cb_messages.cc',
-  'pgsql_cb_messages.h',
-  'pgsql_hb_log.cc',
-  'pgsql_hb_log.h',
-  'pgsql_hb_messages.cc',
-  'pgsql_hb_messages.h',
-  'pgsql_host_data_source.cc',
-  'pgsql_host_data_source.h',
-  'pgsql_lb_log.cc',
-  'pgsql_lb_log.h',
-  'pgsql_lb_messages.cc',
-  'pgsql_lb_messages.h',
-  'pgsql_lease_mgr.cc',
-  'pgsql_lease_mgr.h',
-  'pgsql_query_macros_dhcp.h',
-  'version.cc',
-  dependencies: [postgresql],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_pgsql_lib = library(
+    'dhcp_pgsql',
+    'pgsql_callouts.cc',
+    'pgsql_cb_dhcp4.cc',
+    'pgsql_cb_dhcp4.h',
+    'pgsql_cb_dhcp6.cc',
+    'pgsql_cb_dhcp6.h',
+    'pgsql_cb_impl.cc',
+    'pgsql_cb_impl.h',
+    'pgsql_cb_log.cc',
+    'pgsql_cb_log.h',
+    'pgsql_cb_messages.cc',
+    'pgsql_cb_messages.h',
+    'pgsql_hb_log.cc',
+    'pgsql_hb_log.h',
+    'pgsql_hb_messages.cc',
+    'pgsql_hb_messages.h',
+    'pgsql_host_data_source.cc',
+    'pgsql_host_data_source.h',
+    'pgsql_lb_log.cc',
+    'pgsql_lb_log.h',
+    'pgsql_lb_messages.cc',
+    'pgsql_lb_messages.h',
+    'pgsql_lease_mgr.cc',
+    'pgsql_lease_mgr.h',
+    'pgsql_query_macros_dhcp.h',
+    'version.cc',
+    dependencies: [crypto, postgresql],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index e98c01ed07efc8a20dcba7c93fcf5ce37d11bbab..36575ca96c1ed6ac3071c5c72ab1059775e8627f 100644 (file)
@@ -1,14 +1,16 @@
-dhcp_run_script_lib = library('dhcp_run_script',
-  'run_script.cc',
-  'run_script.h',
-  'run_script_callouts.cc',
-  'run_script_log.cc',
-  'run_script_log.h',
-  'run_script_messages.cc',
-  'run_script_messages.h',
-  'version.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_run_script_lib = library(
+    'dhcp_run_script',
+    'run_script.cc',
+    'run_script.h',
+    'run_script_callouts.cc',
+    'run_script_log.cc',
+    'run_script_log.h',
+    'run_script_messages.cc',
+    'run_script_messages.h',
+    'version.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index 68f92b911f5d9cf990d4c662e00644843f3ee682..1b1aa75c4489e513567e872469da3b48c994bcda 100644 (file)
@@ -1,14 +1,16 @@
-dhcp_stat_cmds_lib = library('dhcp_stat_cmds',
-  'stat_cmds.cc',
-  'stat_cmds.h',
-  'stat_cmds_callouts.cc',
-  'stat_cmds_log.cc',
-  'stat_cmds_log.h',
-  'stat_cmds_messages.cc',
-  'stat_cmds_messages.h',
-  'version.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_stat_cmds_lib = library(
+    'dhcp_stat_cmds',
+    'stat_cmds.cc',
+    'stat_cmds.h',
+    'stat_cmds_callouts.cc',
+    'stat_cmds_log.cc',
+    'stat_cmds_log.h',
+    'stat_cmds_messages.cc',
+    'stat_cmds_messages.h',
+    'version.cc',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index c842cbee71d0fdc1ff47ca524ac05673a431ea2c..373d5cf8513b3f05b2518b0aeb1c6fc8a3bf6844 100644 (file)
@@ -1,23 +1,24 @@
-dhcp_user_chk_lib = library('dhcp_user_chk',
-  'load_unload.cc',
-  'pkt_receive_co.cc',
-  'pkt_send_co.cc',
-  'subnet_select_co.cc',
-  'user.cc',
-  'user.h',
-  'user_chk.h',
-  'user_chk_log.cc',
-  'user_chk_log.h',
-  'user_chk_messages.cc',
-  'user_chk_messages.h',
-  'user_data_source.h',
-  'user_file.cc',
-  'user_file.h',
-  'user_registry.cc',
-  'user_registry.h',
-  'version.cc',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib/kea/hooks',
-  link_with: libs_built_so_far,
+dhcp_user_chk_lib = library(
+    'dhcp_user_chk',
+    'load_unload.cc',
+    'pkt_receive_co.cc',
+    'pkt_send_co.cc',
+    'subnet_select_co.cc',
+    'user.cc',
+    'user.h',
+    'user_chk.h',
+    'user_chk_log.cc',
+    'user_chk_log.h',
+    'user_chk_messages.cc',
+    'user_chk_messages.h',
+    'user_data_source.h',
+    'user_file.cc',
+    'user_file.h',
+    'user_registry.cc',
+    'user_registry.h',
+    'version.cc',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib/kea/hooks',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index 7061166fcfb2ed2423e518c1f8558e1a7850899d..fa08da6eed1841c657677f9c7d5d8cf664613bac 100644 (file)
@@ -1,14 +1,15 @@
-kea_asiodns_lib = library('kea-asiodns',
-  'asiodns_messages.cc',
-  'asiodns_messages.h',
-  'io_fetch.cc',
-  'io_fetch.h',
-  'logger.cc',
-  'logger.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_asiodns_lib = library(
+    'kea-asiodns',
+    'asiodns_messages.cc',
+    'asiodns_messages.h',
+    'io_fetch.cc',
+    'io_fetch.h',
+    'logger.cc',
+    'logger.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_asiodns_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_asiodns_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 148e83ae1549511e88a48b24a62d384a533b6669..e628016d9e7c212f1d521ff549eb667cd7fbaa4a 100644 (file)
@@ -1,8 +1,9 @@
-kea_asiodns_tests_exe = executable('kea-asiodns-tests',
-  'io_fetch_unittest.cc',
-  'run_unittests.cc',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
+kea_asiodns_tests = executable(
+    'kea-asiodns-tests',
+    'io_fetch_unittest.cc',
+    'run_unittests.cc',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
 )
-test('kea_asiodns_tests_exe', kea_asiodns_tests_exe)
+test('kea_asiodns_tests', kea_asiodns_tests, protocol: 'gtest')
index 661857d70f1e85b723d70b5e32a3731300789382..72e49c917b42892cfc8bf99f5fcb85af650535a8 100644 (file)
@@ -1,53 +1,54 @@
-kea_asiolink_lib = library('kea-asiolink',
-  'addr_utilities.cc',
-  'addr_utilities.h',
-  'asiolink.h',
-  'asio_wrapper.h',
-  'botan_tls.cc',
-  'botan_tls.h',
-  'botan_wrapper.h',
-  'common_tls.cc',
-  'common_tls.h',
-  'crypto_tls.h',
-  'dummy_io_cb.h',
-  'interval_timer.cc',
-  'interval_timer.h',
-  'io_acceptor.h',
-  'io_address.cc',
-  'io_address.h',
-  'io_asio_socket.h',
-  'io_endpoint.cc',
-  'io_endpoint.h',
-  'io_error.h',
-  'io_service.cc',
-  'io_service.h',
-  'io_service_mgr.cc',
-  'io_service_mgr.h',
-  'io_service_signal.cc',
-  'io_service_signal.h',
-  'io_service_thread_pool.cc',
-  'io_service_thread_pool.h',
-  'io_socket.cc',
-  'io_socket.h',
-  'openssl_tls.cc',
-  'openssl_tls.h',
-  'process_spawn.cc',
-  'process_spawn.h',
-  'tcp_acceptor.h',
-  'tcp_endpoint.h',
-  'tcp_socket.h',
-  'tls_acceptor.h',
-  'tls_socket.h',
-  'udp_endpoint.h',
-  'udp_socket.h',
-  'unix_domain_socket.cc',
-  'unix_domain_socket.h',
-  'unix_domain_socket_acceptor.h',
-  'unix_domain_socket_endpoint.h',
-  dependencies: crypto,
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_asiolink_lib = library(
+    'kea-asiolink',
+    'addr_utilities.cc',
+    'addr_utilities.h',
+    'asiolink.h',
+    'asio_wrapper.h',
+    'botan_tls.cc',
+    'botan_tls.h',
+    'botan_wrapper.h',
+    'common_tls.cc',
+    'common_tls.h',
+    'crypto_tls.h',
+    'dummy_io_cb.h',
+    'interval_timer.cc',
+    'interval_timer.h',
+    'io_acceptor.h',
+    'io_address.cc',
+    'io_address.h',
+    'io_asio_socket.h',
+    'io_endpoint.cc',
+    'io_endpoint.h',
+    'io_error.h',
+    'io_service.cc',
+    'io_service.h',
+    'io_service_mgr.cc',
+    'io_service_mgr.h',
+    'io_service_signal.cc',
+    'io_service_signal.h',
+    'io_service_thread_pool.cc',
+    'io_service_thread_pool.h',
+    'io_socket.cc',
+    'io_socket.h',
+    'openssl_tls.cc',
+    'openssl_tls.h',
+    'process_spawn.cc',
+    'process_spawn.h',
+    'tcp_acceptor.h',
+    'tcp_endpoint.h',
+    'tcp_socket.h',
+    'tls_acceptor.h',
+    'tls_socket.h',
+    'udp_endpoint.h',
+    'udp_socket.h',
+    'unix_domain_socket.cc',
+    'unix_domain_socket.h',
+    'unix_domain_socket_acceptor.h',
+    'unix_domain_socket_endpoint.h',
+    dependencies: crypto,
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_asiolink_lib]
+LIBS_BUILT_SO_FAR = [kea_asiolink_lib] + LIBS_BUILT_SO_FAR
index a1ed1a0450c036202d3aac0e374319f2b04ee223..50d5dd3794bdbf7fdc7ba0de63fc68d66ca1223e 100644 (file)
@@ -1,29 +1,32 @@
-kea_cc_lib = library('kea-cc',
-  'base_stamped_element.cc',
-  'base_stamped_element.h',
-  'cfg_to_element.h',
-  'command_interpreter.cc',
-  'command_interpreter.h',
-  'data.cc',
-  'data.h',
-  'dhcp_config_error.h',
-  'element_value.h',
-  'json_feed.cc',
-  'json_feed.h',
-  'server_tag.cc',
-  'server_tag.h',
-  'simple_parser.cc',
-  'simple_parser.h',
-  'stamped_element.cc',
-  'stamped_element.h',
-  'stamped_value.cc',
-  'stamped_value.h',
-  'user_context.cc',
-  'user_context.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_cc_lib = library(
+    'kea-cc',
+    'base_stamped_element.cc',
+    'base_stamped_element.h',
+    'cfg_to_element.h',
+    'command_interpreter.cc',
+    'command_interpreter.h',
+    'data.cc',
+    'data.h',
+    'default_credentials.cc',
+    'default_credentials.h',
+    'dhcp_config_error.h',
+    'element_value.h',
+    'json_feed.cc',
+    'json_feed.h',
+    'server_tag.cc',
+    'server_tag.h',
+    'simple_parser.cc',
+    'simple_parser.h',
+    'stamped_element.cc',
+    'stamped_element.h',
+    'stamped_value.cc',
+    'stamped_value.h',
+    'user_context.cc',
+    'user_context.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_cc_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_cc_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 188e5ae4066f360fdfb5d8171c5d01730c516be5..de5f171844b150c78037346f9b27ff1d53620d11 100644 (file)
@@ -1,17 +1,18 @@
-kea_cc_tests_exe = executable('kea-cc-tests',
-  'command_interpreter_unittests.cc',
-  'data_file_unittests.cc',
-  'data_unittests.cc',
-  'element_value_unittests.cc',
-  'json_feed_unittests.cc',
-  'run_unittests.cc',
-  'server_tag_unittest.cc',
-  'simple_parser_unittest.cc',
-  'stamped_element_unittest.cc',
-  'stamped_value_unittest.cc',
-  'user_context_unittests.cc',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_util_unittests_lib],
+kea_cc_tests = executable(
+    'kea-cc-tests',
+    'command_interpreter_unittests.cc',
+    'data_file_unittests.cc',
+    'data_unittests.cc',
+    'element_value_unittests.cc',
+    'json_feed_unittests.cc',
+    'run_unittests.cc',
+    'server_tag_unittest.cc',
+    'simple_parser_unittest.cc',
+    'stamped_element_unittest.cc',
+    'stamped_value_unittest.cc',
+    'user_context_unittests.cc',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
 )
-test('kea_cc_tests_exe', kea_cc_tests_exe)
+test('kea_cc_tests', kea_cc_tests, protocol: 'gtest')
index f08f26a2af2d49c2c5edefedaff893f3b2222e40..09683a7f59b7b4d84cc4ed3aa820cc394808f257 100644 (file)
@@ -1,36 +1,39 @@
-kea_config_lib = library('kea-config',
-  'base_command_mgr.cc',
-  'base_command_mgr.h',
-  'client_connection.cc',
-  'client_connection.h',
-  'cmds_impl.h',
-  'cmd_http_listener.cc',
-  'cmd_http_listener.h',
-  'cmd_response_creator.cc',
-  'cmd_response_creator.h',
-  'cmd_response_creator_factory.h',
-  'command_mgr.cc',
-  'command_mgr.h',
-  'config_log.cc',
-  'config_log.h',
-  'config_messages.cc',
-  'config_messages.h',
-  'hooked_command_mgr.cc',
-  'hooked_command_mgr.h',
-  'http_command_config.cc',
-  'http_command_config.h',
-  'http_command_mgr.cc',
-  'http_command_mgr.h',
-  'http_command_response_creator.cc',
-  'http_command_response_creator.h',
-  'http_command_response_creator_factory.h',
-  'timeouts.h',
-  'unix_command_mgr.cc',
-  'unix_command_mgr.h',
-  dependencies: [crypto],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_config_lib = library(
+    'kea-config',
+    'base_command_mgr.cc',
+    'base_command_mgr.h',
+    'client_connection.cc',
+    'client_connection.h',
+    'cmds_impl.h',
+    'cmd_http_listener.cc',
+    'cmd_http_listener.h',
+    'cmd_response_creator.cc',
+    'cmd_response_creator.h',
+    'cmd_response_creator_factory.h',
+    'command_mgr.cc',
+    'command_mgr.h',
+    'config_log.cc',
+    'config_log.h',
+    'config_messages.cc',
+    'config_messages.h',
+    'hooked_command_mgr.cc',
+    'hooked_command_mgr.h',
+    'http_command_config.cc',
+    'http_command_config.h',
+    'http_command_mgr.cc',
+    'http_command_mgr.h',
+    'http_command_response_creator.cc',
+    'http_command_response_creator.h',
+    'http_command_response_creator_factory.h',
+    'timeouts.h',
+    'unix_command_config.cc',
+    'unix_command_config.h',
+    'unix_command_mgr.cc',
+    'unix_command_mgr.h',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_config_lib]
+LIBS_BUILT_SO_FAR = [kea_config_lib] + LIBS_BUILT_SO_FAR
index 271aefc576d0261ede38155f4a5bd7d479f646c3..3a5a3908825bcc734d78e5fc1e742363a1bb8e66 100644 (file)
@@ -1,12 +1,13 @@
-kea_config_backend_lib = library('kea-config_backend',
-  'base_config_backend.h',
-  'base_config_backend_mgr.h',
-  'base_config_backend_pool.h',
-  'constants.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_config_backend_lib = library(
+    'kea-config_backend',
+    'base_config_backend.h',
+    'base_config_backend_mgr.h',
+    'base_config_backend_pool.h',
+    'constants.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_config_backend_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_config_backend_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 4f02fe0b699b5ed4fb82bb1f3eee3fd57428a50b..0c9692843680fb0f0e6161207edb0e5adfa414ad 100644 (file)
@@ -1,8 +1,9 @@
-kea_config_backend_tests_exe = executable('kea-config_backend-tests',
-  'config_backend_mgr_unittest.cc',
-  'run_unittests.cc',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
+kea_config_backend_tests = executable(
+    'kea-config_backend-tests',
+    'config_backend_mgr_unittest.cc',
+    'run_unittests.cc',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
 )
-test('kea_config_backend_tests_exe', kea_config_backend_tests_exe)
+test('kea_config_backend_tests', kea_config_backend_tests, protocol: 'gtest')
index c9cd37ae6c6c7177eb7b260e2f7e9780cb416718..f1e12f5bfb70aa556451c5a137eebd5eb5ce0ad1 100644 (file)
@@ -1,21 +1,36 @@
-kea_cryptolink_lib = library('kea-cryptolink',
-  'cryptolink.cc',
-  'cryptolink.h',
-  'crypto_hash.cc',
-  'crypto_hash.h',
-  'crypto_hmac.cc',
-  'crypto_hmac.h',
-  'crypto_rng.cc',
-  'crypto_rng.h',
-  'openssl_common.h',
-  'openssl_hash.cc',
-  'openssl_hmac.cc',
-  'openssl_link.cc',
-  dependencies: [crypto],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+sources = []
+if crypto == botan
+    sources += [
+        'botan_common.h',
+        'botan_hash.cc',
+        'botan_hmac.cc',
+        'botan_link.cc',
+    ]
+elif crypto == openssl
+    sources += [
+        'openssl_common.h',
+        'openssl_hash.cc',
+        'openssl_hmac.cc',
+        'openssl_link.cc',
+    ]
+endif
+
+kea_cryptolink_lib = library(
+    'kea-cryptolink',
+    'cryptolink.cc',
+    'cryptolink.h',
+    'crypto_hash.cc',
+    'crypto_hash.h',
+    'crypto_hmac.cc',
+    'crypto_hmac.h',
+    'crypto_rng.cc',
+    'crypto_rng.h',
+    sources,
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_cryptolink_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_cryptolink_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 2e648700acd068c588a2c094c48db84832302b6d..c738053e893c7b768cfe48f1a61c73c0795af747 100644 (file)
@@ -1,10 +1,11 @@
-kea_cryptolink_tests_exe = executable('kea-cryptolink-tests',
-  'crypto_unittests.cc',
-  'hash_unittests.cc',
-  'hmac_unittests.cc',
-  'run_unittests.cc',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_util_unittests_lib],
+kea_cryptolink_tests = executable(
+    'kea-cryptolink-tests',
+    'crypto_unittests.cc',
+    'hash_unittests.cc',
+    'hmac_unittests.cc',
+    'run_unittests.cc',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
 )
-test('kea_cryptolink_tests_exe', kea_cryptolink_tests_exe)
+test('kea_cryptolink_tests', kea_cryptolink_tests, protocol: 'gtest')
index a8cb46a6109d307d153ae3a0648292bf13b7665d..6ac4a732f916ea900ff4321683083d8334c72d9b 100644 (file)
@@ -1,29 +1,31 @@
-kea_d2srv_lib = library('kea-d2srv',
-  'd2_cfg_mgr.cc',
-  'd2_cfg_mgr.h',
-  'd2_config.cc',
-  'd2_config.h',
-  'd2_log.cc',
-  'd2_log.h',
-  'd2_messages.cc',
-  'd2_messages.h',
-  'd2_simple_parser.cc',
-  'd2_simple_parser.h',
-  'd2_stats.cc',
-  'd2_stats.h',
-  'd2_tsig_key.cc',
-  'd2_tsig_key.h',
-  'd2_update_message.cc',
-  'd2_update_message.h',
-  'd2_zone.cc',
-  'd2_zone.h',
-  'dns_client.cc',
-  'dns_client.h',
-  'nc_trans.cc',
-  'nc_trans.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_d2srv_lib = library(
+    'kea-d2srv',
+    'd2_cfg_mgr.cc',
+    'd2_cfg_mgr.h',
+    'd2_config.cc',
+    'd2_config.h',
+    'd2_log.cc',
+    'd2_log.h',
+    'd2_messages.cc',
+    'd2_messages.h',
+    'd2_simple_parser.cc',
+    'd2_simple_parser.h',
+    'd2_stats.cc',
+    'd2_stats.h',
+    'd2_tsig_key.cc',
+    'd2_tsig_key.h',
+    'd2_update_message.cc',
+    'd2_update_message.h',
+    'd2_zone.cc',
+    'd2_zone.h',
+    'dns_client.cc',
+    'dns_client.h',
+    'nc_trans.cc',
+    'nc_trans.h',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_d2srv_lib]
+LIBS_BUILT_SO_FAR = [kea_d2srv_lib] + LIBS_BUILT_SO_FAR
index cea31a65367465a2f93fa76c22181ad6d1cde1c1..cd70f1eb77947fc31011af163386a42ce218b696 100644 (file)
@@ -1,27 +1,28 @@
-kea_database_lib = library('kea-database',
-  'audit_entry.cc',
-  'audit_entry.h',
-  'backend_selector.cc',
-  'backend_selector.h',
-  'database_connection.cc',
-  'database_connection.h',
-  'dbaccess_parser.cc',
-  'dbaccess_parser.h',
-  'db_exceptions.h',
-  'db_log.cc',
-  'db_log.h',
-  'db_messages.cc',
-  'db_messages.h',
-  'server.cc',
-  'server.h',
-  'server_collection.cc',
-  'server_collection.h',
-  'server_selector.cc',
-  'server_selector.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_database_lib = library(
+    'kea-database',
+    'audit_entry.cc',
+    'audit_entry.h',
+    'backend_selector.cc',
+    'backend_selector.h',
+    'database_connection.cc',
+    'database_connection.h',
+    'dbaccess_parser.cc',
+    'dbaccess_parser.h',
+    'db_exceptions.h',
+    'db_log.cc',
+    'db_log.h',
+    'db_messages.cc',
+    'db_messages.h',
+    'server.cc',
+    'server.h',
+    'server_collection.cc',
+    'server_collection.h',
+    'server_selector.cc',
+    'server_selector.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_database_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_database_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index f614252bf7d71ceef2162538e97ea7432e4c3466..37b69723e2230f03ffddacb707a00d2bc0d5b791 100644 (file)
@@ -1,14 +1,15 @@
-kea_database_tests_exe = executable('kea-database-tests',
-  'audit_entry_unittest.cc',
-  'backend_selector_unittest.cc',
-  'database_connection_unittest.cc',
-  'database_log_unittest.cc',
-  'dbaccess_parser_unittest.cc',
-  'run_unittests.cc',
-  'server_selector_unittest.cc',
-  'server_unittest.cc',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
+kea_database_tests = executable(
+    'kea-database-tests',
+    'audit_entry_unittest.cc',
+    'backend_selector_unittest.cc',
+    'database_connection_unittest.cc',
+    'database_log_unittest.cc',
+    'dbaccess_parser_unittest.cc',
+    'run_unittests.cc',
+    'server_selector_unittest.cc',
+    'server_unittest.cc',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
 )
-test('kea_database_tests_exe', kea_database_tests_exe)
+test('kea_database_tests', kea_database_tests, protocol: 'gtest')
index 85f9b8bf0ac0a1830ccc518a8af7b9c916eb5f68..7b072a48003104ba0455274215f3bb0fc7bd3e03 100644 (file)
-system = build_machine.system()
 pkt_filter_cc = 'pkt_filter_bpf.cc'
 pkt_filter_h = 'pkt_filter_bpf.h'
-if system == 'linux'
-  iface_mgr = 'iface_mgr_linux.cc'
-  pkt_filter_cc = 'pkt_filter_lpf.cc'
-  pkt_filter_h = 'pkt_filter_lpf.h'
-elif system == 'freebsd' or system == 'netbsd' or system == 'openbsd' or system == 'darwin'
-  iface_mgr = 'iface_mgr_bsd.cc'
-elif system == 'sun'
-  iface_mgr = 'iface_mgr_sun.cc'
-elif system == 'osx'
+if SYSTEM == 'linux'
+    iface_mgr = 'iface_mgr_linux.cc'
+    pkt_filter_cc = 'pkt_filter_lpf.cc'
+    pkt_filter_h = 'pkt_filter_lpf.h'
+elif SYSTEM == 'freebsd' or SYSTEM == 'netbsd' or SYSTEM == 'openbsd' or SYSTEM == 'darwin'
+    iface_mgr = 'iface_mgr_bsd.cc'
+elif SYSTEM == 'sun'
+    iface_mgr = 'iface_mgr_sun.cc'
 else
-  error(f'Build failed: Unsupported system "@system@".')
+    error(f'Build failed: Unsupported system "@SYSTEM@".')
 endif
 
-kea_dhcp_lib = library('kea-dhcp',
-  'classify.cc',
-  'classify.h',
-  'dhcp4.h',
-  'dhcp6.h',
-  'docsis3_option_defs.h',
-  'duid.cc',
-  'duid.h',
-  'duid_factory.cc',
-  'duid_factory.h',
-  'hwaddr.cc',
-  'hwaddr.h',
-  'iface_mgr.cc',
-  'iface_mgr.h',
-  'iface_mgr_error_handler.h',
-  iface_mgr,
-  'libdhcp++.cc',
-  'libdhcp++.h',
-  'opaque_data_tuple.cc',
-  'opaque_data_tuple.h',
-  'option.cc',
-  'option.h',
-  'option4_addrlst.cc',
-  'option4_addrlst.h',
-  'option4_client_fqdn.cc',
-  'option4_client_fqdn.h',
-  'option4_dnr.cc',
-  'option4_dnr.h',
-  'option6_addrlst.cc',
-  'option6_addrlst.h',
-  'option6_auth.cc',
-  'option6_auth.h',
-  'option6_client_fqdn.cc',
-  'option6_client_fqdn.h',
-  'option6_dnr.cc',
-  'option6_dnr.h',
-  'option6_ia.cc',
-  'option6_ia.h',
-  'option6_iaaddr.cc',
-  'option6_iaaddr.h',
-  'option6_iaprefix.cc',
-  'option6_iaprefix.h',
-  'option6_pdexclude.cc',
-  'option6_pdexclude.h',
-  'option6_status_code.cc',
-  'option6_status_code.h',
-  'option_classless_static_route.cc',
-  'option_classless_static_route.h',
-  'option_custom.cc',
-  'option_custom.h',
-  'option_data_types.cc',
-  'option_data_types.h',
-  'option_definition.cc',
-  'option_definition.h',
-  'option_int.h',
-  'option_int_array.h',
-  'option_opaque_data_tuples.cc',
-  'option_opaque_data_tuples.h',
-  'option_space.cc',
-  'option_space.h',
-  'option_space_container.h',
-  'option_string.cc',
-  'option_string.h',
-  'option_vendor.cc',
-  'option_vendor.h',
-  'option_vendor_class.cc',
-  'option_vendor_class.h',
-  'packet_queue.h',
-  'packet_queue_mgr.h',
-  'packet_queue_mgr4.cc',
-  'packet_queue_mgr4.h',
-  'packet_queue_mgr6.cc',
-  'packet_queue_mgr6.h',
-  'packet_queue_ring.h',
-  'pkt.cc',
-  'pkt.h',
-  'pkt4.cc',
-  'pkt4.h',
-  'pkt4o6.cc',
-  'pkt4o6.h',
-  'pkt6.cc',
-  'pkt6.h',
-  'pkt_filter.cc',
-  'pkt_filter.h',
-  'pkt_filter6.cc',
-  'pkt_filter6.h',
-  'pkt_filter_inet.cc',
-  'pkt_filter_inet.h',
-  'pkt_filter_inet6.cc',
-  'pkt_filter_inet6.h',
-  pkt_filter_cc,
-  pkt_filter_h,
-  'pkt_template.h',
-  'protocol_util.cc',
-  'protocol_util.h',
-  'socket_info.h',
-  'std_option_defs.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_dhcp_lib = library(
+    'kea-dhcp',
+    'classify.cc',
+    'classify.h',
+    'dhcp4.h',
+    'dhcp6.h',
+    'docsis3_option_defs.h',
+    'duid.cc',
+    'duid.h',
+    'duid_factory.cc',
+    'duid_factory.h',
+    'hwaddr.cc',
+    'hwaddr.h',
+    'iface_mgr.cc',
+    'iface_mgr.h',
+    'iface_mgr_error_handler.h',
+    iface_mgr,
+    'libdhcp++.cc',
+    'libdhcp++.h',
+    'opaque_data_tuple.cc',
+    'opaque_data_tuple.h',
+    'option.cc',
+    'option.h',
+    'option4_addrlst.cc',
+    'option4_addrlst.h',
+    'option4_client_fqdn.cc',
+    'option4_client_fqdn.h',
+    'option4_dnr.cc',
+    'option4_dnr.h',
+    'option6_addrlst.cc',
+    'option6_addrlst.h',
+    'option6_auth.cc',
+    'option6_auth.h',
+    'option6_client_fqdn.cc',
+    'option6_client_fqdn.h',
+    'option6_dnr.cc',
+    'option6_dnr.h',
+    'option6_ia.cc',
+    'option6_ia.h',
+    'option6_iaaddr.cc',
+    'option6_iaaddr.h',
+    'option6_iaprefix.cc',
+    'option6_iaprefix.h',
+    'option6_pdexclude.cc',
+    'option6_pdexclude.h',
+    'option6_status_code.cc',
+    'option6_status_code.h',
+    'option_classless_static_route.cc',
+    'option_classless_static_route.h',
+    'option_custom.cc',
+    'option_custom.h',
+    'option_data_types.cc',
+    'option_data_types.h',
+    'option_definition.cc',
+    'option_definition.h',
+    'option_int.h',
+    'option_int_array.h',
+    'option_opaque_data_tuples.cc',
+    'option_opaque_data_tuples.h',
+    'option_space.cc',
+    'option_space.h',
+    'option_space_container.h',
+    'option_string.cc',
+    'option_string.h',
+    'option_vendor.cc',
+    'option_vendor.h',
+    'option_vendor_class.cc',
+    'option_vendor_class.h',
+    'packet_queue.h',
+    'packet_queue_mgr.h',
+    'packet_queue_mgr4.cc',
+    'packet_queue_mgr4.h',
+    'packet_queue_mgr6.cc',
+    'packet_queue_mgr6.h',
+    'packet_queue_ring.h',
+    'pkt.cc',
+    'pkt.h',
+    'pkt4.cc',
+    'pkt4.h',
+    'pkt4o6.cc',
+    'pkt4o6.h',
+    'pkt6.cc',
+    'pkt6.h',
+    'pkt_filter.cc',
+    'pkt_filter.h',
+    'pkt_filter6.cc',
+    'pkt_filter6.h',
+    'pkt_filter_inet.cc',
+    'pkt_filter_inet.h',
+    'pkt_filter_inet6.cc',
+    'pkt_filter_inet6.h',
+    pkt_filter_cc,
+    pkt_filter_h,
+    'pkt_template.h',
+    'protocol_util.cc',
+    'protocol_util.h',
+    'socket_info.h',
+    'std_option_defs.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_dhcp_lib]
+LIBS_BUILT_SO_FAR = [kea_dhcp_lib] + LIBS_BUILT_SO_FAR
index b438c9624d2efc59c3bab41759eb473badb65f69..4ffd0240cd25276aea1438eef6e25a72f09c16c7 100644 (file)
@@ -1,18 +1,19 @@
-kea_dhcp_ddns_lib = library('kea-dhcp_ddns',
-  'dhcp_ddns_log.cc',
-  'dhcp_ddns_log.h',
-  'dhcp_ddns_messages.cc',
-  'dhcp_ddns_messages.h',
-  'ncr_io.cc',
-  'ncr_io.h',
-  'ncr_msg.cc',
-  'ncr_msg.h',
-  'ncr_udp.cc',
-  'ncr_udp.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_dhcp_ddns_lib = library(
+    'kea-dhcp_ddns',
+    'dhcp_ddns_log.cc',
+    'dhcp_ddns_log.h',
+    'dhcp_ddns_messages.cc',
+    'dhcp_ddns_messages.h',
+    'ncr_io.cc',
+    'ncr_io.h',
+    'ncr_msg.cc',
+    'ncr_msg.h',
+    'ncr_udp.cc',
+    'ncr_udp.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_dhcp_ddns_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_dhcp_ddns_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 674790c30438ac4c4af5254c5a5168d460817ae3..e513818d926916d0ec14ec5c97a4ef2bf899b571 100644 (file)
@@ -1,11 +1,12 @@
-kea_dhcp_ddns_tests_exe = executable('kea-dhcp_ddns-tests',
-  'ncr_udp_unittests.cc',
-  'ncr_unittests.cc',
-  'run_unittests.cc',
-  'test_utils.cc',
-  'test_utils.h',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
+kea_dhcp_ddns_tests = executable(
+    'kea-dhcp_ddns-tests',
+    'ncr_udp_unittests.cc',
+    'ncr_unittests.cc',
+    'run_unittests.cc',
+    'test_utils.cc',
+    'test_utils.h',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
 )
-test('kea_dhcp_ddns_tests_exe', kea_dhcp_ddns_tests_exe)
+test('kea_dhcp_ddns_tests', kea_dhcp_ddns_tests, protocol: 'gtest')
index 4f83be84cd3640b3fac10f010fe68e6727fadb16..e3b39e85042e96317a999b2a43396d930d36ecbe 100644 (file)
-kea_dhcpsrv_lib = library('kea-dhcpsrv',
-  'allocation_state.cc',
-  'allocation_state.h',
-  'allocator.cc',
-  'allocator.h',
-  'alloc_engine.cc',
-  'alloc_engine.h',
-  'alloc_engine_log.cc',
-  'alloc_engine_log.h',
-  'alloc_engine_messages.cc',
-  'alloc_engine_messages.h',
-  'base_host_data_source.h',
-  'cache_host_data_source.h',
-  'callout_handle_store.h',
-  'cb_ctl_dhcp.h',
-  'cb_ctl_dhcp4.cc',
-  'cb_ctl_dhcp4.h',
-  'cb_ctl_dhcp6.cc',
-  'cb_ctl_dhcp6.h',
-  'cfgmgr.cc',
-  'cfgmgr.h',
-  'cfg_4o6.cc',
-  'cfg_4o6.h',
-  'cfg_consistency.cc',
-  'cfg_consistency.h',
-  'cfg_db_access.cc',
-  'cfg_db_access.h',
-  'cfg_duid.cc',
-  'cfg_duid.h',
-  'cfg_expiration.cc',
-  'cfg_expiration.h',
-  'cfg_globals.cc',
-  'cfg_globals.h',
-  'cfg_hosts.cc',
-  'cfg_hosts.h',
-  'cfg_hosts_util.cc',
-  'cfg_hosts_util.h',
-  'cfg_host_operations.cc',
-  'cfg_host_operations.h',
-  'cfg_iface.cc',
-  'cfg_iface.h',
-  'cfg_mac_source.cc',
-  'cfg_mac_source.h',
-  'cfg_multi_threading.cc',
-  'cfg_multi_threading.h',
-  'cfg_option.cc',
-  'cfg_option.h',
-  'cfg_option_def.cc',
-  'cfg_option_def.h',
-  'cfg_rsoo.cc',
-  'cfg_rsoo.h',
-  'cfg_shared_networks.cc',
-  'cfg_shared_networks.h',
-  'cfg_subnets4.cc',
-  'cfg_subnets4.h',
-  'cfg_subnets6.cc',
-  'cfg_subnets6.h',
-  'client_class_def.cc',
-  'client_class_def.h',
-  'config_backend_dhcp4.h',
-  'config_backend_dhcp4_mgr.cc',
-  'config_backend_dhcp4_mgr.h',
-  'config_backend_dhcp6.h',
-  'config_backend_dhcp6_mgr.cc',
-  'config_backend_dhcp6_mgr.h',
-  'config_backend_pool_dhcp4.cc',
-  'config_backend_pool_dhcp4.h',
-  'config_backend_pool_dhcp6.cc',
-  'config_backend_pool_dhcp6.h',
-  'csv_lease_file4.cc',
-  'csv_lease_file4.h',
-  'csv_lease_file6.cc',
-  'csv_lease_file6.h',
-  'd2_client_cfg.cc',
-  'd2_client_cfg.h',
-  'd2_client_mgr.cc',
-  'd2_client_mgr.h',
-  'db_type.h',
-  'dhcp4o6_ipc.cc',
-  'dhcp4o6_ipc.h',
-  'dhcpsrv_exceptions.h',
-  'dhcpsrv_log.cc',
-  'dhcpsrv_log.h',
-  'dhcpsrv_messages.cc',
-  'dhcpsrv_messages.h',
-  'flq_allocation_state.cc',
-  'flq_allocation_state.h',
-  'flq_allocator.cc',
-  'flq_allocator.h',
-  'fuzz_log.cc',
-  'fuzz_log.h',
-  'fuzz_messages.cc',
-  'fuzz_messages.h',
-  'host.cc',
-  'host.h',
-  'hosts_log.cc',
-  'hosts_log.h',
-  'hosts_messages.cc',
-  'hosts_messages.h',
-  'host_container.h',
-  'host_data_source_factory.cc',
-  'host_data_source_factory.h',
-  'host_mgr.cc',
-  'host_mgr.h',
-  'ip_range.cc',
-  'ip_range.h',
-  'ip_range_permutation.cc',
-  'ip_range_permutation.h',
-  'iterative_allocation_state.cc',
-  'iterative_allocation_state.h',
-  'iterative_allocator.cc',
-  'iterative_allocator.h',
-  'key_from_key.h',
-  'lease.cc',
-  'lease.h',
-  'lease_file_loader.h',
-  'lease_file_stats.h',
-  'lease_mgr.cc',
-  'lease_mgr.h',
-  'lease_mgr_factory.cc',
-  'lease_mgr_factory.h',
-  'memfile_lease_limits.cc',
-  'memfile_lease_limits.h',
-  'memfile_lease_mgr.cc',
-  'memfile_lease_mgr.h',
-  'memfile_lease_storage.h',
-  'ncr_generator.cc',
-  'ncr_generator.h',
-  'network.cc',
-  'network.h',
-  'network_state.cc',
-  'network_state.h',
-  'packet_fuzzer.cc',
-  'packet_fuzzer.h',
-  'parsers/base_network_parser.cc',
-  'parsers/base_network_parser.h',
-  'parsers/client_class_def_parser.cc',
-  'parsers/client_class_def_parser.h',
-  'parsers/dhcp_parsers.cc',
-  'parsers/dhcp_parsers.h',
-  'parsers/dhcp_queue_control_parser.cc',
-  'parsers/dhcp_queue_control_parser.h',
-  'parsers/duid_config_parser.cc',
-  'parsers/duid_config_parser.h',
-  'parsers/expiration_config_parser.cc',
-  'parsers/expiration_config_parser.h',
-  'parsers/host_reservations_list_parser.h',
-  'parsers/host_reservation_parser.cc',
-  'parsers/host_reservation_parser.h',
-  'parsers/ifaces_config_parser.cc',
-  'parsers/ifaces_config_parser.h',
-  'parsers/multi_threading_config_parser.cc',
-  'parsers/multi_threading_config_parser.h',
-  'parsers/option_data_parser.cc',
-  'parsers/option_data_parser.h',
-  'parsers/sanity_checks_parser.cc',
-  'parsers/sanity_checks_parser.h',
-  'parsers/shared_networks_list_parser.h',
-  'parsers/shared_network_parser.cc',
-  'parsers/shared_network_parser.h',
-  'parsers/simple_parser4.cc',
-  'parsers/simple_parser4.h',
-  'parsers/simple_parser6.cc',
-  'parsers/simple_parser6.h',
-  'pool.cc',
-  'pool.h',
-  'random_allocation_state.cc',
-  'random_allocation_state.h',
-  'random_allocator.cc',
-  'random_allocator.h',
-  'resource_handler.cc',
-  'resource_handler.h',
-  'sanity_checker.cc',
-  'sanity_checker.h',
-  'shared_network.cc',
-  'shared_network.h',
-  'srv_config.cc',
-  'srv_config.h',
-  'subnet.cc',
-  'subnet.h',
-  'subnet_id.h',
-  'subnet_selector.h',
-  'timer_mgr.cc',
-  'timer_mgr.h',
-  'tracking_lease_mgr.cc',
-  'tracking_lease_mgr.h',
-  'utils.h',
-  'writable_host_data_source.h',
-  cpp_args: ['-DDHCP_DATA_DIR="@0@"'.format(meson.current_build_dir()), f'-DKEA_LFC_EXECUTABLE="@kea_lfc@"'],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_dhcpsrv_lib = library(
+    'kea-dhcpsrv',
+    'allocation_state.cc',
+    'allocation_state.h',
+    'allocator.cc',
+    'allocator.h',
+    'alloc_engine.cc',
+    'alloc_engine.h',
+    'alloc_engine_log.cc',
+    'alloc_engine_log.h',
+    'alloc_engine_messages.cc',
+    'alloc_engine_messages.h',
+    'base_host_data_source.h',
+    'cache_host_data_source.h',
+    'callout_handle_store.h',
+    'cb_ctl_dhcp.h',
+    'cb_ctl_dhcp4.cc',
+    'cb_ctl_dhcp4.h',
+    'cb_ctl_dhcp6.cc',
+    'cb_ctl_dhcp6.h',
+    'cfgmgr.cc',
+    'cfgmgr.h',
+    'cfg_4o6.cc',
+    'cfg_4o6.h',
+    'cfg_consistency.cc',
+    'cfg_consistency.h',
+    'cfg_db_access.cc',
+    'cfg_db_access.h',
+    'cfg_duid.cc',
+    'cfg_duid.h',
+    'cfg_expiration.cc',
+    'cfg_expiration.h',
+    'cfg_globals.cc',
+    'cfg_globals.h',
+    'cfg_hosts.cc',
+    'cfg_hosts.h',
+    'cfg_hosts_util.cc',
+    'cfg_hosts_util.h',
+    'cfg_host_operations.cc',
+    'cfg_host_operations.h',
+    'cfg_iface.cc',
+    'cfg_iface.h',
+    'cfg_mac_source.cc',
+    'cfg_mac_source.h',
+    'cfg_multi_threading.cc',
+    'cfg_multi_threading.h',
+    'cfg_option.cc',
+    'cfg_option.h',
+    'cfg_option_def.cc',
+    'cfg_option_def.h',
+    'cfg_rsoo.cc',
+    'cfg_rsoo.h',
+    'cfg_shared_networks.cc',
+    'cfg_shared_networks.h',
+    'cfg_subnets4.cc',
+    'cfg_subnets4.h',
+    'cfg_subnets6.cc',
+    'cfg_subnets6.h',
+    'client_class_def.cc',
+    'client_class_def.h',
+    'config_backend_dhcp4.h',
+    'config_backend_dhcp4_mgr.cc',
+    'config_backend_dhcp4_mgr.h',
+    'config_backend_dhcp6.h',
+    'config_backend_dhcp6_mgr.cc',
+    'config_backend_dhcp6_mgr.h',
+    'config_backend_pool_dhcp4.cc',
+    'config_backend_pool_dhcp4.h',
+    'config_backend_pool_dhcp6.cc',
+    'config_backend_pool_dhcp6.h',
+    'csv_lease_file4.cc',
+    'csv_lease_file4.h',
+    'csv_lease_file6.cc',
+    'csv_lease_file6.h',
+    'd2_client_cfg.cc',
+    'd2_client_cfg.h',
+    'd2_client_mgr.cc',
+    'd2_client_mgr.h',
+    'db_type.h',
+    'ddns_params.cc',
+    'ddns_params.h',
+    'dhcp4o6_ipc.cc',
+    'dhcp4o6_ipc.h',
+    'dhcpsrv_exceptions.h',
+    'dhcpsrv_log.cc',
+    'dhcpsrv_log.h',
+    'dhcpsrv_messages.cc',
+    'dhcpsrv_messages.h',
+    'flq_allocation_state.cc',
+    'flq_allocation_state.h',
+    'flq_allocator.cc',
+    'flq_allocator.h',
+    'fuzz_log.cc',
+    'fuzz_log.h',
+    'fuzz_messages.cc',
+    'fuzz_messages.h',
+    'host.cc',
+    'host.h',
+    'hosts_log.cc',
+    'hosts_log.h',
+    'hosts_messages.cc',
+    'hosts_messages.h',
+    'host_container.h',
+    'host_data_source_factory.cc',
+    'host_data_source_factory.h',
+    'host_mgr.cc',
+    'host_mgr.h',
+    'ip_range.cc',
+    'ip_range.h',
+    'ip_range_permutation.cc',
+    'ip_range_permutation.h',
+    'iterative_allocation_state.cc',
+    'iterative_allocation_state.h',
+    'iterative_allocator.cc',
+    'iterative_allocator.h',
+    'key_from_key.h',
+    'lease.cc',
+    'lease.h',
+    'lease_file_loader.h',
+    'lease_file_stats.h',
+    'lease_mgr.cc',
+    'lease_mgr.h',
+    'lease_mgr_factory.cc',
+    'lease_mgr_factory.h',
+    'memfile_lease_limits.cc',
+    'memfile_lease_limits.h',
+    'memfile_lease_mgr.cc',
+    'memfile_lease_mgr.h',
+    'memfile_lease_storage.h',
+    'ncr_generator.cc',
+    'ncr_generator.h',
+    'network.cc',
+    'network.h',
+    'network_state.cc',
+    'network_state.h',
+    'packet_fuzzer.cc',
+    'packet_fuzzer.h',
+    'parsers/base_network_parser.cc',
+    'parsers/base_network_parser.h',
+    'parsers/client_class_def_parser.cc',
+    'parsers/client_class_def_parser.h',
+    'parsers/dhcp_parsers.cc',
+    'parsers/dhcp_parsers.h',
+    'parsers/dhcp_queue_control_parser.cc',
+    'parsers/dhcp_queue_control_parser.h',
+    'parsers/duid_config_parser.cc',
+    'parsers/duid_config_parser.h',
+    'parsers/expiration_config_parser.cc',
+    'parsers/expiration_config_parser.h',
+    'parsers/host_reservations_list_parser.h',
+    'parsers/host_reservation_parser.cc',
+    'parsers/host_reservation_parser.h',
+    'parsers/ifaces_config_parser.cc',
+    'parsers/ifaces_config_parser.h',
+    'parsers/multi_threading_config_parser.cc',
+    'parsers/multi_threading_config_parser.h',
+    'parsers/option_data_parser.cc',
+    'parsers/option_data_parser.h',
+    'parsers/sanity_checks_parser.cc',
+    'parsers/sanity_checks_parser.h',
+    'parsers/shared_networks_list_parser.h',
+    'parsers/shared_network_parser.cc',
+    'parsers/shared_network_parser.h',
+    'parsers/simple_parser4.cc',
+    'parsers/simple_parser4.h',
+    'parsers/simple_parser6.cc',
+    'parsers/simple_parser6.h',
+    'pool.cc',
+    'pool.h',
+    'random_allocation_state.cc',
+    'random_allocation_state.h',
+    'random_allocator.cc',
+    'random_allocator.h',
+    'resource_handler.cc',
+    'resource_handler.h',
+    'sanity_checker.cc',
+    'sanity_checker.h',
+    'shared_network.cc',
+    'shared_network.h',
+    'srv_config.cc',
+    'srv_config.h',
+    'subnet.cc',
+    'subnet.h',
+    'subnet_id.h',
+    'subnet_selector.h',
+    'timer_mgr.cc',
+    'timer_mgr.h',
+    'tracking_lease_mgr.cc',
+    'tracking_lease_mgr.h',
+    'utils.h',
+    'writable_host_data_source.h',
+    cpp_args: [
+        f'-DDHCP_DATA_DIR="@TOP_BUILD_DIR@"',
+        f'-DKEA_LFC_EXECUTABLE="@KEA_LFC@"',
+    ],
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_dhcpsrv_lib]
+LIBS_BUILT_SO_FAR = [kea_dhcpsrv_lib] + LIBS_BUILT_SO_FAR
index 850266101309589a303829e692eda12990d4683f..9eeb42cff4e74d378fe58b5bc36bf13e98113a35 100644 (file)
@@ -1,64 +1,65 @@
-kea_dns_lib = library('kea-dns',
-  'char_string.cc',
-  'char_string.h',
-  'edns.cc',
-  'edns.h',
-  'exceptions.cc',
-  'exceptions.h',
-  'labelsequence.cc',
-  'labelsequence.h',
-  'master_lexer.cc',
-  'master_lexer.h',
-  'master_lexer_inputsource.cc',
-  'master_lexer_inputsource.h',
-  'master_lexer_state.h',
-  'master_loader.cc',
-  'master_loader.h',
-  'master_loader_callbacks.h',
-  'message.cc',
-  'message.h',
-  'messagerenderer.cc',
-  'messagerenderer.h',
-  'name.cc',
-  'name.h',
-  'name_internal.h',
-  'opcode.cc',
-  'opcode.h',
-  'question.cc',
-  'question.h',
-  'rcode.cc',
-  'rcode.h',
-  'rdata.cc',
-  'rdata.h',
-  'rdataclass.cc',
-  'rdataclass.h',
-  'rrclass.cc',
-  'rrclass.h',
-  'rrparamregistry.cc',
-  'rrparamregistry.h',
-  'rrset.cc',
-  'rrset.h',
-  'rrttl.cc',
-  'rrttl.h',
-  'rrtype.cc',
-  'rrtype.h',
-  'serial.cc',
-  'serial.h',
-  'time_utils.cc',
-  'time_utils.h',
-  'tsig.cc',
-  'tsig.h',
-  'tsigerror.cc',
-  'tsigerror.h',
-  'tsigkey.cc',
-  'tsigkey.h',
-  'tsigrecord.cc',
-  'tsigrecord.h',
-  'txt_like.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_dns_lib = library(
+    'kea-dns',
+    'char_string.cc',
+    'char_string.h',
+    'edns.cc',
+    'edns.h',
+    'exceptions.cc',
+    'exceptions.h',
+    'labelsequence.cc',
+    'labelsequence.h',
+    'master_lexer.cc',
+    'master_lexer.h',
+    'master_lexer_inputsource.cc',
+    'master_lexer_inputsource.h',
+    'master_lexer_state.h',
+    'master_loader.cc',
+    'master_loader.h',
+    'master_loader_callbacks.h',
+    'message.cc',
+    'message.h',
+    'messagerenderer.cc',
+    'messagerenderer.h',
+    'name.cc',
+    'name.h',
+    'name_internal.h',
+    'opcode.cc',
+    'opcode.h',
+    'question.cc',
+    'question.h',
+    'rcode.cc',
+    'rcode.h',
+    'rdata.cc',
+    'rdata.h',
+    'rdataclass.cc',
+    'rdataclass.h',
+    'rrclass.cc',
+    'rrclass.h',
+    'rrparamregistry.cc',
+    'rrparamregistry.h',
+    'rrset.cc',
+    'rrset.h',
+    'rrttl.cc',
+    'rrttl.h',
+    'rrtype.cc',
+    'rrtype.h',
+    'serial.cc',
+    'serial.h',
+    'time_utils.cc',
+    'time_utils.h',
+    'tsig.cc',
+    'tsig.h',
+    'tsigerror.cc',
+    'tsigerror.h',
+    'tsigkey.cc',
+    'tsigkey.h',
+    'tsigrecord.cc',
+    'tsigrecord.h',
+    'txt_like.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_dns_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_dns_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 9b4c8e8f369d922bcd56baaa31749585934a19c6..980220911b647a0e64bffdb5d223593a515e81ce 100644 (file)
@@ -1,54 +1,55 @@
-kea_dns_tests_exe = executable('kea-dns-tests',
-  'dns_exceptions_unittest.cc',
-  'edns_unittest.cc',
-  'labelsequence_unittest.cc',
-  'master_lexer_inputsource_unittest.cc',
-  'master_lexer_state_unittest.cc',
-  'master_lexer_token_unittest.cc',
-  'master_lexer_unittest.cc',
-  'master_loader_callbacks_test.cc',
-  'master_loader_unittest.cc',
-  'messagerenderer_unittest.cc',
-  'message_unittest.cc',
-  'name_unittest.cc',
-  'opcode_unittest.cc',
-  'question_unittest.cc',
-  'rcode_unittest.cc',
-  'rdata_char_string_data_unittest.cc',
-  'rdata_char_string_unittest.cc',
-  'rdata_dhcid_unittest.cc',
-  'rdata_in_aaaa_unittest.cc',
-  'rdata_in_a_unittest.cc',
-  'rdata_ns_unittest.cc',
-  'rdata_opt_unittest.cc',
-  'rdata_ptr_unittest.cc',
-  'rdata_rrsig_unittest.cc',
-  'rdata_soa_unittest.cc',
-  'rdata_tkey_unittest.cc',
-  'rdata_tsig_unittest.cc',
-  'rdata_txt_like_unittest.cc',
-  'rdata_unittest.cc',
-  'rdata_unittest.h',
-  'rrclass_unittest.cc',
-  'rrparamregistry_unittest.cc',
-  'rrset_unittest.cc',
-  'rrttl_unittest.cc',
-  'rrtype_unittest.cc',
-  'run_unittests.cc',
-  'serial_unittest.cc',
-  'time_utils_unittest.cc',
-  'tsigerror_unittest.cc',
-  'tsigkey_unittest.cc',
-  'tsigrecord_unittest.cc',
-  'tsig_unittest.cc',
-  'unittest_util.cc',
-  'unittest_util.h',
-  cpp_args: [
-    '-DTEST_DATA_BUILDDIR="@0@/testdata"'.format(meson.current_build_dir()),
-    '-DTEST_DATA_SRCDIR="@0@/testdata"'.format(meson.current_source_dir()),
-  ],
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_util_unittests_lib],
+kea_dns_tests = executable(
+    'kea-dns-tests',
+    'dns_exceptions_unittest.cc',
+    'edns_unittest.cc',
+    'labelsequence_unittest.cc',
+    'master_lexer_inputsource_unittest.cc',
+    'master_lexer_state_unittest.cc',
+    'master_lexer_token_unittest.cc',
+    'master_lexer_unittest.cc',
+    'master_loader_callbacks_test.cc',
+    'master_loader_unittest.cc',
+    'messagerenderer_unittest.cc',
+    'message_unittest.cc',
+    'name_unittest.cc',
+    'opcode_unittest.cc',
+    'question_unittest.cc',
+    'rcode_unittest.cc',
+    'rdata_char_string_data_unittest.cc',
+    'rdata_char_string_unittest.cc',
+    'rdata_dhcid_unittest.cc',
+    'rdata_in_aaaa_unittest.cc',
+    'rdata_in_a_unittest.cc',
+    'rdata_ns_unittest.cc',
+    'rdata_opt_unittest.cc',
+    'rdata_ptr_unittest.cc',
+    'rdata_rrsig_unittest.cc',
+    'rdata_soa_unittest.cc',
+    'rdata_tkey_unittest.cc',
+    'rdata_tsig_unittest.cc',
+    'rdata_txt_like_unittest.cc',
+    'rdata_unittest.cc',
+    'rdata_unittest.h',
+    'rrclass_unittest.cc',
+    'rrparamregistry_unittest.cc',
+    'rrset_unittest.cc',
+    'rrttl_unittest.cc',
+    'rrtype_unittest.cc',
+    'run_unittests.cc',
+    'serial_unittest.cc',
+    'time_utils_unittest.cc',
+    'tsigerror_unittest.cc',
+    'tsigkey_unittest.cc',
+    'tsigrecord_unittest.cc',
+    'tsig_unittest.cc',
+    'unittest_util.cc',
+    'unittest_util.h',
+    cpp_args: [
+        f'-DTEST_DATA_BUILDDIR="@TOP_BUILD_DIR@/src/lib/dns/tests/testdata"',
+        f'-DTEST_DATA_SRCDIR="@TOP_SOURCE_DIR@/src/lib/dns/tests/testdata"',
+    ],
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
 )
-test('kea_dns_tests_exe', kea_dns_tests_exe)
+test('kea_dns_tests', kea_dns_tests, protocol: 'gtest')
index d0b62250aca67ffccc03c91fc4020c51601e3826..d24d5fae19b6bfd929cb5f6cbf9016fd06119c30 100644 (file)
@@ -1,24 +1,25 @@
-kea_eval_lib = library('kea-eval',
-  'dependency.cc',
-  'dependency.h',
-  'evaluate.cc',
-  'evaluate.h',
-  'eval_context.cc',
-  'eval_context.h',
-  'eval_context_decl.h',
-  'eval_log.cc',
-  'eval_log.h',
-  'eval_messages.cc',
-  'eval_messages.h',
-  'lexer.cc',
-  'parser.cc',
-  'parser.h',
-  'token.cc',
-  'token.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_eval_lib = library(
+    'kea-eval',
+    'dependency.cc',
+    'dependency.h',
+    'evaluate.cc',
+    'evaluate.h',
+    'eval_context.cc',
+    'eval_context.h',
+    'eval_context_decl.h',
+    'eval_log.cc',
+    'eval_log.h',
+    'eval_messages.cc',
+    'eval_messages.h',
+    'lexer.cc',
+    'parser.cc',
+    'parser.h',
+    'token.cc',
+    'token.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_eval_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_eval_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 054a2e74296d4d185981d5d1a26618428679194f..42b7d9c3c556607bccefa96aefeeb8b29a9a9f42 100644 (file)
@@ -1,12 +1,13 @@
-kea_eval_tests_exe = executable('kea-eval-tests',
-  'boolean_unittest.cc',
-  'context_unittest.cc',
-  'dependency_unittest.cc',
-  'evaluate_unittest.cc',
-  'run_unittests.cc',
-  'token_unittest.cc',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
+kea_eval_tests = executable(
+    'kea-eval-tests',
+    'boolean_unittest.cc',
+    'context_unittest.cc',
+    'dependency_unittest.cc',
+    'evaluate_unittest.cc',
+    'run_unittests.cc',
+    'token_unittest.cc',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
 )
-test('kea_eval_tests_exe', kea_eval_tests_exe)
+test('kea_eval_tests', kea_eval_tests, protocol: 'gtest')
index 3594c235345cfc6a9124befbbfa96bc85a921656..48545739c019bb68f4d7ae031e7b5edf7a74e180 100644 (file)
@@ -1,11 +1,12 @@
-kea_exceptions_lib = library('kea-exceptions',
-  'exceptions.cc',
-  'exceptions.h',
-  'isc_assert.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_exceptions_lib = library(
+    'kea-exceptions',
+    'exceptions.cc',
+    'exceptions.h',
+    'isc_assert.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_exceptions_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_exceptions_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 2b5f41ea39b1e3ef8ff1857761e956ee889647a4..6bdcceb9070cf98adf06778d79193dfab5da9529 100644 (file)
@@ -1,8 +1,9 @@
-kea_exceptions_tests_exe = executable('kea-exceptions-tests',
-  'exceptions_unittest.cc',
-  'run_unittests.cc',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far,
+kea_exceptions_tests = executable(
+    'kea-exceptions-tests',
+    'exceptions_unittest.cc',
+    'run_unittests.cc',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR,
 )
-test('kea_exceptions_tests_exe', kea_exceptions_tests_exe)
+test('kea_exceptions_tests', kea_exceptions_tests, protocol: 'gtest')
index 436a077e51cef7fb22bf860a769fc37010a5013e..e4cbe77ee18bbfbef2ca88bc923a73c6a1a5c7be 100644 (file)
@@ -1,37 +1,38 @@
-kea_hooks_lib = library('kea-hooks',
-  'callout_handle.cc',
-  'callout_handle.h',
-  'callout_handle_associate.cc',
-  'callout_handle_associate.h',
-  'callout_manager.cc',
-  'callout_manager.h',
-  'hooks.h',
-  'hooks_config.cc',
-  'hooks_config.h',
-  'hooks_log.cc',
-  'hooks_log.h',
-  'hooks_manager.cc',
-  'hooks_manager.h',
-  'hooks_messages.cc',
-  'hooks_messages.h',
-  'hooks_parser.cc',
-  'hooks_parser.h',
-  'libinfo.cc',
-  'libinfo.h',
-  'library_handle.cc',
-  'library_handle.h',
-  'library_manager.cc',
-  'library_manager.h',
-  'library_manager_collection.cc',
-  'library_manager_collection.h',
-  'parking_lots.h',
-  'pointer_converter.h',
-  'server_hooks.cc',
-  'server_hooks.h',
-  cpp_args: ['-DDEFAULT_HOOKS_PATH="@0@"'.format(meson.current_build_dir())],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_hooks_lib = library(
+    'kea-hooks',
+    'callout_handle.cc',
+    'callout_handle.h',
+    'callout_handle_associate.cc',
+    'callout_handle_associate.h',
+    'callout_manager.cc',
+    'callout_manager.h',
+    'hooks.h',
+    'hooks_config.cc',
+    'hooks_config.h',
+    'hooks_log.cc',
+    'hooks_log.h',
+    'hooks_manager.cc',
+    'hooks_manager.h',
+    'hooks_messages.cc',
+    'hooks_messages.h',
+    'hooks_parser.cc',
+    'hooks_parser.h',
+    'libinfo.cc',
+    'libinfo.h',
+    'library_handle.cc',
+    'library_handle.h',
+    'library_manager.cc',
+    'library_manager.h',
+    'library_manager_collection.cc',
+    'library_manager_collection.h',
+    'parking_lots.h',
+    'pointer_converter.h',
+    'server_hooks.cc',
+    'server_hooks.h',
+    cpp_args: [f'-DDEFAULT_HOOKS_PATH="@TOP_BUILD_DIR@"'],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_hooks_lib]
+LIBS_BUILT_SO_FAR = [kea_hooks_lib] + LIBS_BUILT_SO_FAR
index ee94a2fcdacd46f6918a551e30d446e5af686673..24296959da336ba016a66a1438608ca8c49374cb 100644 (file)
@@ -1,65 +1,66 @@
-kea_http_lib = library('kea-http',
-  'auth_config.h',
-  'auth_log.cc',
-  'auth_log.h',
-  'auth_messages.cc',
-  'auth_messages.h',
-  'basic_auth.cc',
-  'basic_auth.h',
-  'basic_auth_config.cc',
-  'basic_auth_config.h',
-  'cfg_http_header.cc',
-  'cfg_http_header.h',
-  'client.cc',
-  'client.h',
-  'connection.cc',
-  'connection.h',
-  'connection_pool.cc',
-  'connection_pool.h',
-  'date_time.cc',
-  'date_time.h',
-  'header_context.h',
-  'http_acceptor.h',
-  'http_header.cc',
-  'http_header.h',
-  'http_log.cc',
-  'http_log.h',
-  'http_message.cc',
-  'http_message.h',
-  'http_messages.cc',
-  'http_messages.h',
-  'http_message_parser_base.cc',
-  'http_message_parser_base.h',
-  'http_types.h',
-  'listener.cc',
-  'listener.h',
-  'listener_impl.cc',
-  'listener_impl.h',
-  'post_request.cc',
-  'post_request.h',
-  'post_request_json.cc',
-  'post_request_json.h',
-  'request.cc',
-  'request.h',
-  'request_context.h',
-  'request_parser.cc',
-  'request_parser.h',
-  'response.cc',
-  'response.h',
-  'response_context.h',
-  'response_creator.cc',
-  'response_creator.h',
-  'response_creator_factory.h',
-  'response_json.cc',
-  'response_json.h',
-  'response_parser.cc',
-  'response_parser.h',
-  'url.cc',
-  'url.h',
-  dependencies: [crypto],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_http_lib = library(
+    'kea-http',
+    'auth_config.h',
+    'auth_log.cc',
+    'auth_log.h',
+    'auth_messages.cc',
+    'auth_messages.h',
+    'basic_auth.cc',
+    'basic_auth.h',
+    'basic_auth_config.cc',
+    'basic_auth_config.h',
+    'cfg_http_header.cc',
+    'cfg_http_header.h',
+    'client.cc',
+    'client.h',
+    'connection.cc',
+    'connection.h',
+    'connection_pool.cc',
+    'connection_pool.h',
+    'date_time.cc',
+    'date_time.h',
+    'header_context.h',
+    'http_acceptor.h',
+    'http_header.cc',
+    'http_header.h',
+    'http_log.cc',
+    'http_log.h',
+    'http_message.cc',
+    'http_message.h',
+    'http_messages.cc',
+    'http_messages.h',
+    'http_message_parser_base.cc',
+    'http_message_parser_base.h',
+    'http_types.h',
+    'listener.cc',
+    'listener.h',
+    'listener_impl.cc',
+    'listener_impl.h',
+    'post_request.cc',
+    'post_request.h',
+    'post_request_json.cc',
+    'post_request_json.h',
+    'request.cc',
+    'request.h',
+    'request_context.h',
+    'request_parser.cc',
+    'request_parser.h',
+    'response.cc',
+    'response.h',
+    'response_context.h',
+    'response_creator.cc',
+    'response_creator.h',
+    'response_creator_factory.h',
+    'response_json.cc',
+    'response_json.h',
+    'response_parser.cc',
+    'response_parser.h',
+    'url.cc',
+    'url.h',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_http_lib]
+LIBS_BUILT_SO_FAR = [kea_http_lib] + LIBS_BUILT_SO_FAR
index 86057d3a39222c2fa734bbb6be12598c73360fcb..948de141902251cab07779e415e03e35b0e3725a 100644 (file)
@@ -1,8 +1,5 @@
-sources = [
-  'message.cc']
-
-kea_msg_compiler = executable('kea-msg-compiler',
-                              sources,
-                              include_directories: [include_directories('.')] + includes,
-                              link_with : [exceptions_lib, log_lib, util_lib],
-                              install : true)
+executable('kea-msg-compiler',
+  'message.cc',
+  include_directories: [include_directories('.')] + INCLUDES,
+  link_with : LIBS_BUILT_SO_FAR,
+  install : true)
index 7af3d6c144563034610bcaef1c421969aa40f8cd..4106038820ff9e6862059e4a8477bc6ff998693f 100644 (file)
@@ -1,13 +1,14 @@
-kea_log_interprocess_lib = library('kea-log-interprocess',
-  'interprocess_sync.h',
-  'interprocess_sync_file.cc',
-  'interprocess_sync_file.h',
-  'interprocess_sync_null.cc',
-  'interprocess_sync_null.h',
-  cpp_args: ['-DLOCKFILE_DIR="@0@"'.format(meson.current_build_dir())],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_log_interprocess_lib = library(
+    'kea-log-interprocess',
+    'interprocess_sync.h',
+    'interprocess_sync_file.cc',
+    'interprocess_sync_file.h',
+    'interprocess_sync_null.cc',
+    'interprocess_sync_null.h',
+    cpp_args: [f'-DLOCKFILE_DIR="@TOP_BUILD_DIR@"'],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_log_interprocess_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_log_interprocess_lib] + LIBS_BUILT_SO_FAR
index 33b835ea302755d99181619088264c3ef0183737..ee38b6ef01045d3ada361858994eec0fa6d9e4be 100644 (file)
@@ -1,51 +1,52 @@
 subdir('interprocess')
-kea_log_lib = library('kea-log',
-  'buffer_appender_impl.cc',
-  'buffer_appender_impl.h',
-  'logger.cc',
-  'logger.h',
-  'logger_impl.cc',
-  'logger_impl.h',
-  'logger_level.cc',
-  'logger_level.h',
-  'logger_level_impl.cc',
-  'logger_level_impl.h',
-  'logger_manager.cc',
-  'logger_manager.h',
-  'logger_manager_impl.cc',
-  'logger_manager_impl.h',
-  'logger_name.cc',
-  'logger_name.h',
-  'logger_specification.h',
-  'logger_support.cc',
-  'logger_support.h',
-  'logger_unittest_support.cc',
-  'logger_unittest_support.h',
-  'logimpl_messages.cc',
-  'logimpl_messages.h',
-  'log_dbglevels.cc',
-  'log_dbglevels.h',
-  'log_formatter.cc',
-  'log_formatter.h',
-  'log_messages.cc',
-  'log_messages.h',
-  'macros.h',
-  'message_dictionary.cc',
-  'message_dictionary.h',
-  'message_exception.h',
-  'message_initializer.cc',
-  'message_initializer.h',
-  'message_reader.cc',
-  'message_reader.h',
-  'message_types.h',
-  'output_option.cc',
-  'output_option.h',
-  cpp_args: ['-DTOP_BUILDDIR="@0@"'.format(meson.project_build_root())],
-  dependencies: [log4cplus],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_log_lib = library(
+    'kea-log',
+    'buffer_appender_impl.cc',
+    'buffer_appender_impl.h',
+    'logger.cc',
+    'logger.h',
+    'logger_impl.cc',
+    'logger_impl.h',
+    'logger_level.cc',
+    'logger_level.h',
+    'logger_level_impl.cc',
+    'logger_level_impl.h',
+    'logger_manager.cc',
+    'logger_manager.h',
+    'logger_manager_impl.cc',
+    'logger_manager_impl.h',
+    'logger_name.cc',
+    'logger_name.h',
+    'logger_specification.h',
+    'logger_support.cc',
+    'logger_support.h',
+    'logger_unittest_support.cc',
+    'logger_unittest_support.h',
+    'logimpl_messages.cc',
+    'logimpl_messages.h',
+    'log_dbglevels.cc',
+    'log_dbglevels.h',
+    'log_formatter.cc',
+    'log_formatter.h',
+    'log_messages.cc',
+    'log_messages.h',
+    'macros.h',
+    'message_dictionary.cc',
+    'message_dictionary.h',
+    'message_exception.h',
+    'message_initializer.cc',
+    'message_initializer.h',
+    'message_reader.cc',
+    'message_reader.h',
+    'message_types.h',
+    'output_option.cc',
+    'output_option.h',
+    cpp_args: [f'-DTOP_BUILDDIR="@TOP_BUILD_DIR@"'],
+    dependencies: [log4cplus],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_log_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_log_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index cfa928043084fae18f227ad28140a9868ceedbc4..3abb45725afe49c153b1f40a25ea6f1034c70dcb 100644 (file)
@@ -2,6 +2,7 @@ SUBDIRS = .
 
 # Define the flags used in each set of tests.
 AM_CPPFLAGS  = -I$(top_builddir)/src/lib -I$(top_srcdir)/src/lib
+AM_CPPFLAGS += -DTEMP_DIR=\"${build_dir}\"
 AM_CPPFLAGS += $(BOOST_INCLUDES) $(GTEST_INCLUDES) $(LOG4CPLUS_INCLUDES)
 
 AM_CXXFLAGS = $(KEA_CXXFLAGS)
index 235dd6af38009bb52448f37372341968d4c11cee..1c79ef6fbc09171cce3eba863b70d40d317c36e9 100644 (file)
@@ -1,22 +1,23 @@
-kea_log_tests_exe = executable('kea-log-tests',
-  'buffer_appender_unittest.cc',
-  'logger_level_impl_unittest.cc',
-  'logger_level_unittest.cc',
-  'logger_manager_unittest.cc',
-  'logger_name_unittest.cc',
-  'logger_specification_unittest.cc',
-  'logger_support_unittest.cc',
-  'logger_unittest.cc',
-  'log_formatter_unittest.cc',
-  'log_test_messages.cc',
-  'log_test_messages.h',
-  'message_dictionary_unittest.cc',
-  'message_reader_unittest.cc',
-  'output_option_unittest.cc',
-  'run_unittests.cc',
-  cpp_args: ['-DTEMP_DIR="@0@"'.format(meson.current_build_dir())],
-  dependencies: [gtest, log4cplus],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_util_unittests_lib],
+kea_log_tests = executable(
+    'kea-log-tests',
+    'buffer_appender_unittest.cc',
+    'logger_level_impl_unittest.cc',
+    'logger_level_unittest.cc',
+    'logger_manager_unittest.cc',
+    'logger_name_unittest.cc',
+    'logger_specification_unittest.cc',
+    'logger_support_unittest.cc',
+    'logger_unittest.cc',
+    'log_formatter_unittest.cc',
+    'log_test_messages.cc',
+    'log_test_messages.h',
+    'message_dictionary_unittest.cc',
+    'message_reader_unittest.cc',
+    'output_option_unittest.cc',
+    'run_unittests.cc',
+    cpp_args: [f'-DTEMP_DIR="@TOP_BUILD_DIR@"'],
+    dependencies: [gtest, log4cplus],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
 )
-test('kea_log_tests_exe', kea_log_tests_exe)
+test('kea_log_tests', kea_log_tests, protocol: 'gtest')
diff --git a/src/lib/log/tests/tempdir.h.in b/src/lib/log/tests/tempdir.h.in
deleted file mode 100644 (file)
index c805844..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
-//
-// This Source Code Form is subject to the terms of the Mozilla Public
-// License, v. 2.0. If a copy of the MPL was not distributed with this
-// file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#ifndef TEMPDIR_H
-#define TEMPDIR_H
-
-/// \brief Define temporary directory
-///
-/// Defines the temporary directory in which temporary files used by the
-/// unit tests are created.
-
-#include <string>
-
-namespace {
-std::string TEMP_DIR("@builddir@");
-}
-
-#endif // TEMPDIR_H
index 52cc8bf172067259eebedcb2a759dfedfd213b14..ae722cf76e0fcd61ebd10839b5fe131ab645a5c1 100644 (file)
@@ -1,18 +1,19 @@
 if not mysql.found()
-  subdir_done()
+    subdir_done()
 endif
 
-kea_mysql_lib = library('kea-mysql',
-  'mysql_binding.cc',
-  'mysql_binding.h',
-  'mysql_connection.cc',
-  'mysql_connection.h',
-  'mysql_constants.h',
-  cpp_args: [f'-DKEA_ADMIN="@kea_admin@"'],
-  dependencies: [mysql],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_mysql_lib = library(
+    'kea-mysql',
+    'mysql_binding.cc',
+    'mysql_binding.h',
+    'mysql_connection.cc',
+    'mysql_connection.h',
+    'mysql_constants.h',
+    cpp_args: [f'-DKEA_ADMIN="@KEA_ADMIN@"'],
+    dependencies: [mysql],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_mysql_lib]
+LIBS_BUILT_SO_FAR = [kea_mysql_lib] + LIBS_BUILT_SO_FAR
index bb5e92c0e5a783e29ecee644b7cda8961403da79..e4575d4ff5b5ddafeb55d424138c2be8bee84530 100644 (file)
@@ -1,17 +1,18 @@
-if not postgresql.found()
-  subdir_done()
+if not postgresql.found() or not postgresql_server_header.found()
+    subdir_done()
 endif
 
-kea_pgsql_lib = library('kea-pgsql',
-  'pgsql_connection.cc',
-  'pgsql_connection.h',
-  'pgsql_exchange.cc',
-  'pgsql_exchange.h',
-  cpp_args: [f'-DKEA_ADMIN="@kea_admin@"'],
-  dependencies: [postgresql],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_pgsql_lib = library(
+    'kea-pgsql',
+    'pgsql_connection.cc',
+    'pgsql_connection.h',
+    'pgsql_exchange.cc',
+    'pgsql_exchange.h',
+    cpp_args: [f'-DKEA_ADMIN="@KEA_ADMIN@"'],
+    dependencies: [postgresql, postgresql_server_header],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_pgsql_lib]
+LIBS_BUILT_SO_FAR = [kea_pgsql_lib] + LIBS_BUILT_SO_FAR
index c2ccf553189947792dd7471a38ff7c59651efd93..5052cf57a188e5f2902996ee6c8f2376dcf1b503 100644 (file)
@@ -1,10 +1,17 @@
-kea_cfgrpt_lib = library('kea-cfgrpt',
-  'cfgrpt.cc',
-  'config_report.cc',
-  'config_report.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+config_report_cc = configure_file(
+    input: 'config_report.cc.in',
+    output: 'config_report.cc',
+    configuration: conf_data,
 )
-libs_built_so_far = [kea_cfgrpt_lib] + libs_built_so_far
+
+kea_cfgrpt_lib = library(
+    'kea-cfgrpt',
+    'cfgrpt.cc',
+    config_report_cc,
+    'config_report.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
+)
+LIBS_BUILT_SO_FAR = [kea_cfgrpt_lib] + LIBS_BUILT_SO_FAR
index 5c4289fe4431baaafad0c0f3d5a2f81a732aa57a..8aa9124c58d252d27815b611fc2adb25b8feae51 100644 (file)
@@ -1,33 +1,34 @@
 subdir('cfgrpt')
-kea_process_lib = library('kea-process',
-  'cb_ctl_base.h',
-  'config_base.cc',
-  'config_base.h',
-  'config_ctl_info.cc',
-  'config_ctl_info.h',
-  'config_ctl_parser.cc',
-  'config_ctl_parser.h',
-  'daemon.cc',
-  'daemon.h',
-  'd_cfg_mgr.cc',
-  'd_cfg_mgr.h',
-  'd_controller.cc',
-  'd_controller.h',
-  'd_log.cc',
-  'd_log.h',
-  'd_process.h',
-  'logging_info.cc',
-  'logging_info.h',
-  'log_parser.cc',
-  'log_parser.h',
-  'process_messages.cc',
-  'process_messages.h',
-  'redact_config.cc',
-  'redact_config.h',
-  cpp_args: ['-DDATA_DIR="@0@"'.format(meson.current_build_dir())],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_process_lib = library(
+    'kea-process',
+    'cb_ctl_base.h',
+    'config_base.cc',
+    'config_base.h',
+    'config_ctl_info.cc',
+    'config_ctl_info.h',
+    'config_ctl_parser.cc',
+    'config_ctl_parser.h',
+    'daemon.cc',
+    'daemon.h',
+    'd_cfg_mgr.cc',
+    'd_cfg_mgr.h',
+    'd_controller.cc',
+    'd_controller.h',
+    'd_log.cc',
+    'd_log.h',
+    'd_process.h',
+    'logging_info.cc',
+    'logging_info.h',
+    'log_parser.cc',
+    'log_parser.h',
+    'process_messages.cc',
+    'process_messages.h',
+    'redact_config.cc',
+    'redact_config.h',
+    cpp_args: [f'-DDATA_DIR="@TOP_BUILD_DIR@"'],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_process_lib]
+LIBS_BUILT_SO_FAR = [kea_process_lib] + LIBS_BUILT_SO_FAR
index 2cca416af289e4c3d5cc1113eab334eff1e08707..51b7f47c38727bfbe627ebd6d6833a9dd4b98545 100644 (file)
@@ -1,14 +1,15 @@
-kea_stats_lib = library('kea-stats',
-  'context.cc',
-  'context.h',
-  'observation.cc',
-  'observation.h',
-  'stats_mgr.cc',
-  'stats_mgr.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_stats_lib = library(
+    'kea-stats',
+    'context.cc',
+    'context.h',
+    'observation.cc',
+    'observation.h',
+    'stats_mgr.cc',
+    'stats_mgr.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_stats_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_stats_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 51367fe1270d6c2ddf5685ccf051cba63ec9026d..6bb1bbcd1681e8aa97acb4afbeaa39b9f75f17e6 100644 (file)
@@ -1,10 +1,11 @@
-kea_stats_tests_exe = executable('kea-stats-tests',
-  'context_unittest.cc',
-  'observation_unittest.cc',
-  'run_unittests.cc',
-  'stats_mgr_unittest.cc',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_testutils_lib, kea_util_unittests_lib],
+kea_stats_tests = executable(
+    'kea-stats-tests',
+    'context_unittest.cc',
+    'observation_unittest.cc',
+    'run_unittests.cc',
+    'stats_mgr_unittest.cc',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_testutils_lib, kea_util_unittests_lib],
 )
-test('kea_stats_tests_exe', kea_stats_tests_exe)
+test('kea_stats_tests', kea_stats_tests, protocol: 'gtest')
index a397bbf9d93587dd84ca352e3959925339da8ff7..38bd10f242032ce8929462b122eef696a1f76ef2 100644 (file)
@@ -1,23 +1,24 @@
-kea_tcp_lib = library('kea-tcp',
-  'mt_tcp_listener_mgr.cc',
-  'mt_tcp_listener_mgr.h',
-  'tcp_connection.cc',
-  'tcp_connection.h',
-  'tcp_connection_acceptor.h',
-  'tcp_connection_pool.cc',
-  'tcp_connection_pool.h',
-  'tcp_listener.cc',
-  'tcp_listener.h',
-  'tcp_log.cc',
-  'tcp_log.h',
-  'tcp_messages.cc',
-  'tcp_messages.h',
-  'tcp_stream_msg.cc',
-  'tcp_stream_msg.h',
-  dependencies: [crypto],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_tcp_lib = library(
+    'kea-tcp',
+    'mt_tcp_listener_mgr.cc',
+    'mt_tcp_listener_mgr.h',
+    'tcp_connection.cc',
+    'tcp_connection.h',
+    'tcp_connection_acceptor.h',
+    'tcp_connection_pool.cc',
+    'tcp_connection_pool.h',
+    'tcp_listener.cc',
+    'tcp_listener.h',
+    'tcp_log.cc',
+    'tcp_log.h',
+    'tcp_messages.cc',
+    'tcp_messages.h',
+    'tcp_stream_msg.cc',
+    'tcp_stream_msg.h',
+    dependencies: [crypto],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far += [kea_tcp_lib]
+LIBS_BUILT_SO_FAR = [kea_tcp_lib] + LIBS_BUILT_SO_FAR
index 78cf154e05f9883c19a45f9a2f5bfd2b88c18120..6d7ba3093998c9099a210b05cbe810b41489f979 100644 (file)
@@ -1,22 +1,23 @@
-kea_testutils_lib = library('kea-testutils',
-  'gtest_utils.h',
-  'io_utils.cc',
-  'io_utils.h',
-  'log_utils.cc',
-  'log_utils.h',
-  'multi_threading_utils.h',
-  'sandbox.h',
-  'test_to_element.cc',
-  'test_to_element.h',
-  'threaded_test.cc',
-  'threaded_test.h',
-  'unix_control_client.cc',
-  'unix_control_client.h',
-  'user_context_utils.cc',
-  'user_context_utils.h',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_testutils_lib = library(
+    'kea-testutils',
+    'gtest_utils.h',
+    'io_utils.cc',
+    'io_utils.h',
+    'log_utils.cc',
+    'log_utils.h',
+    'multi_threading_utils.h',
+    'sandbox.h',
+    'test_to_element.cc',
+    'test_to_element.h',
+    'threaded_test.cc',
+    'threaded_test.h',
+    'unix_control_client.cc',
+    'unix_control_client.h',
+    'user_context_utils.cc',
+    'user_context_utils.h',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
index c02702a3d64e4981c2e3b17305d1c0b99dd1e6e2..7d89dba876af795df44318eba08509e6c638162d 100644 (file)
@@ -1,9 +1,10 @@
-kea_util_io_lib = library('kea-util-io',
-  'fd.cc',
-  'fd.h',
-  'pktinfo_utilities.h',
-  'sockaddr_util.h',
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far,
+kea_util_io_lib = library(
+    'kea-util-io',
+    'fd.cc',
+    'fd.h',
+    'pktinfo_utilities.h',
+    'sockaddr_util.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR,
 )
-libs_built_so_far = [kea_util_io_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_util_io_lib] + LIBS_BUILT_SO_FAR
index b833045c98a68364c640db4f5cd3cefe09876095..1e817895a9068c3be3f2fd156ec46c7ddb5ced03 100644 (file)
@@ -1,62 +1,63 @@
-kea_util_lib = library('kea-util',
-  'bigints.h',
-  'boost_time_utils.cc',
-  'boost_time_utils.h',
-  'buffer.h',
-  'chrono_time_utils.cc',
-  'chrono_time_utils.h',
-  'csv_file.cc',
-  'csv_file.h',
-  'dhcp_space.cc',
-  'dhcp_space.h',
-  'doubles.h',
-  'encode/encode.cc',
-  'encode/encode.h',
-  'encode/utf8.cc',
-  'encode/utf8.h',
-  'filesystem.cc',
-  'filesystem.h',
-  'hash.h',
-  'io.h',
-  'labeled_value.cc',
-  'labeled_value.h',
-  'memory_segment.h',
-  'memory_segment_local.cc',
-  'memory_segment_local.h',
-  'multi_threading_mgr.cc',
-  'multi_threading_mgr.h',
-  'optional.h',
-  'pid_file.cc',
-  'pid_file.h',
-  'pointer_util.h',
-  'range_utilities.h',
-  'readwrite_mutex.h',
-  'reconnect_ctl.cc',
-  'reconnect_ctl.h',
-  'staged_value.h',
-  'state_model.cc',
-  'state_model.h',
-  'stopwatch.cc',
-  'stopwatch.h',
-  'stopwatch_impl.cc',
-  'stopwatch_impl.h',
-  'str.cc',
-  'str.h',
-  'thread_pool.h',
-  'triplet.h',
-  'unlock_guard.h',
-  'versioned_csv_file.cc',
-  'versioned_csv_file.h',
-  'watched_thread.cc',
-  'watched_thread.h',
-  'watch_socket.cc',
-  'watch_socket.h',
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: kea_exceptions_lib,
+kea_util_lib = library(
+    'kea-util',
+    'bigints.h',
+    'boost_time_utils.cc',
+    'boost_time_utils.h',
+    'buffer.h',
+    'chrono_time_utils.cc',
+    'chrono_time_utils.h',
+    'csv_file.cc',
+    'csv_file.h',
+    'dhcp_space.cc',
+    'dhcp_space.h',
+    'doubles.h',
+    'encode/encode.cc',
+    'encode/encode.h',
+    'encode/utf8.cc',
+    'encode/utf8.h',
+    'filesystem.cc',
+    'filesystem.h',
+    'hash.h',
+    'io.h',
+    'labeled_value.cc',
+    'labeled_value.h',
+    'memory_segment.h',
+    'memory_segment_local.cc',
+    'memory_segment_local.h',
+    'multi_threading_mgr.cc',
+    'multi_threading_mgr.h',
+    'optional.h',
+    'pid_file.cc',
+    'pid_file.h',
+    'pointer_util.h',
+    'range_utilities.h',
+    'readwrite_mutex.h',
+    'reconnect_ctl.cc',
+    'reconnect_ctl.h',
+    'staged_value.h',
+    'state_model.cc',
+    'state_model.h',
+    'stopwatch.cc',
+    'stopwatch.h',
+    'stopwatch_impl.cc',
+    'stopwatch_impl.h',
+    'str.cc',
+    'str.h',
+    'thread_pool.h',
+    'triplet.h',
+    'unlock_guard.h',
+    'versioned_csv_file.cc',
+    'versioned_csv_file.h',
+    'watched_thread.cc',
+    'watched_thread.h',
+    'watch_socket.cc',
+    'watch_socket.h',
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
 )
 subdir('io')
 subdir('unittests')
-libs_built_so_far = [kea_util_lib] + libs_built_so_far
+LIBS_BUILT_SO_FAR = [kea_util_lib] + LIBS_BUILT_SO_FAR
 subdir('tests')
index 43e46d06d561c8c6360fd096501689161bfc7794..d099387ab0729e98a37759f0d13d253e325841a6 100755 (executable)
@@ -1,40 +1,44 @@
-kea_util_tests_exe = executable('kea-util-tests',
-  'bigint_unittest.cc',
-  'boost_time_utils_unittest.cc',
-  'buffer_unittest.cc',
-  'chrono_time_utils_unittest.cc',
-  'csv_file_unittest.cc',
-  'dhcp_space_unittest.cc',
-  'doubles_unittest.cc',
-  'encode_unittest.cc',
-  'fd_tests.cc',
-  'filesystem_unittests.cc',
-  'hash_unittest.cc',
-  'io_unittests.cc',
-  'labeled_value_unittest.cc',
-  'memory_segment_common_unittest.cc',
-  'memory_segment_common_unittest.h',
-  'memory_segment_local_unittest.cc',
-  'multi_threading_mgr_unittest.cc',
-  'optional_unittest.cc',
-  'pid_file_unittest.cc',
-  'range_utilities_unittest.cc',
-  'readwrite_mutex_unittest.cc',
-  'run_unittests.cc',
-  'staged_value_unittest.cc',
-  'state_model_unittest.cc',
-  'stopwatch_unittest.cc',
-  'str_unittests.cc',
-  'thread_pool_unittest.cc',
-  'triplet_unittest.cc',
-  'unlock_guard_unittests.cc',
-  'utf8_unittest.cc',
-  'versioned_csv_file_unittest.cc',
-  'watched_thread_unittest.cc',
-  'watch_socket_unittests.cc',
-  cpp_args: ['-DABS_SRCDIR="@0@"'.format(meson.current_source_dir()), '-DTEST_DATA_BUILDDIR="@0@"'.format(meson.current_build_dir())],
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far + [kea_util_unittests_lib],
+kea_util_tests = executable(
+    'kea-util-tests',
+    'bigint_unittest.cc',
+    'boost_time_utils_unittest.cc',
+    'buffer_unittest.cc',
+    'chrono_time_utils_unittest.cc',
+    'csv_file_unittest.cc',
+    'dhcp_space_unittest.cc',
+    'doubles_unittest.cc',
+    'encode_unittest.cc',
+    'fd_tests.cc',
+    'filesystem_unittests.cc',
+    'hash_unittest.cc',
+    'io_unittests.cc',
+    'labeled_value_unittest.cc',
+    'memory_segment_common_unittest.cc',
+    'memory_segment_common_unittest.h',
+    'memory_segment_local_unittest.cc',
+    'multi_threading_mgr_unittest.cc',
+    'optional_unittest.cc',
+    'pid_file_unittest.cc',
+    'range_utilities_unittest.cc',
+    'readwrite_mutex_unittest.cc',
+    'run_unittests.cc',
+    'staged_value_unittest.cc',
+    'state_model_unittest.cc',
+    'stopwatch_unittest.cc',
+    'str_unittests.cc',
+    'thread_pool_unittest.cc',
+    'triplet_unittest.cc',
+    'unlock_guard_unittests.cc',
+    'utf8_unittest.cc',
+    'versioned_csv_file_unittest.cc',
+    'watched_thread_unittest.cc',
+    'watch_socket_unittests.cc',
+    cpp_args: [
+        f'-DABS_SRCDIR="@TOP_SOURCE_DIR@/src/lib/util/tests"',
+        f'-DTEST_DATA_BUILDDIR="@TOP_BUILD_DIR@/src/lib/util/tests"',
+    ],
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR + [kea_util_unittests_lib],
 )
-test('kea_util_tests_exe', kea_util_tests_exe)
+test('kea_util_tests', kea_util_tests, protocol: 'gtest')
index b29c733fc7383218b51d4e5e7560bab27a74c433..58ca2df1b7e306322b2587514a436c2cd78b6ae7 100644 (file)
@@ -1,22 +1,23 @@
-kea_util_unittests_lib = library('kea-util-unittests',
-  'check_valgrind.cc',
-  'check_valgrind.h',
-  'fork.cc',
-  'fork.h',
-  'interprocess_util.cc',
-  'interprocess_util.h',
-  'newhook.cc',
-  'newhook.h',
-  'resource.cc',
-  'resource.h',
-  'run_all.cc',
-  'run_all.h',
-  'testdata.cc',
-  'testdata.h',
-  'textdata.h',
-  'wiredata.cc',
-  'wiredata.h',
-  dependencies: [gtest],
-  include_directories: [include_directories('.')] + includes,
-  link_with: libs_built_so_far,
+kea_util_unittests_lib = library(
+    'kea-util-unittests',
+    'check_valgrind.cc',
+    'check_valgrind.h',
+    'fork.cc',
+    'fork.h',
+    'interprocess_util.cc',
+    'interprocess_util.h',
+    'newhook.cc',
+    'newhook.h',
+    'resource.cc',
+    'resource.h',
+    'run_all.cc',
+    'run_all.h',
+    'testdata.cc',
+    'testdata.h',
+    'textdata.h',
+    'wiredata.cc',
+    'wiredata.h',
+    dependencies: [gtest],
+    include_directories: [include_directories('.')] + INCLUDES,
+    link_with: LIBS_BUILT_SO_FAR,
 )
index de4a32f73d4f85f6c99e381964e1563f489080fb..2948fafadeeab8f4a0fa5038230e10781ce5b93f 100644 (file)
@@ -1,53 +1,55 @@
 if not netconf_deps_found
-  subdir_done()
+    subdir_done()
 endif
 
-kea_yang_lib = library('kea-yang',
-  'adaptor.cc',
-  'adaptor.h',
-  'adaptor_config.cc',
-  'adaptor_config.h',
-  'adaptor_host.cc',
-  'adaptor_host.h',
-  'adaptor_option.cc',
-  'adaptor_option.h',
-  'adaptor_pool.cc',
-  'adaptor_pool.h',
-  'adaptor_subnet.cc',
-  'adaptor_subnet.h',
-  'netconf_error.h',
-  'translator.cc',
-  'translator.h',
-  'translator_class.cc',
-  'translator_class.h',
-  'translator_config.cc',
-  'translator_config.h',
-  'translator_control_socket.cc',
-  'translator_control_socket.h',
-  'translator_database.cc',
-  'translator_database.h',
-  'translator_host.cc',
-  'translator_host.h',
-  'translator_logger.cc',
-  'translator_logger.h',
-  'translator_option_data.cc',
-  'translator_option_data.h',
-  'translator_option_def.cc',
-  'translator_option_def.h',
-  'translator_pd_pool.cc',
-  'translator_pd_pool.h',
-  'translator_pool.cc',
-  'translator_pool.h',
-  'translator_shared_network.cc',
-  'translator_shared_network.h',
-  'translator_subnet.cc',
-  'translator_subnet.h',
-  'yang_models.h',
-  'yang_revisions.h',
-  dependencies: netconf_deps_array,
-  include_directories: [include_directories('.')] + includes,
-  install: true,
-  install_dir: 'lib',
-  link_with: libs_built_so_far,
+kea_yang_lib = library(
+    'kea-yang',
+    'adaptor.cc',
+    'adaptor.h',
+    'adaptor_config.cc',
+    'adaptor_config.h',
+    'adaptor_host.cc',
+    'adaptor_host.h',
+    'adaptor_option.cc',
+    'adaptor_option.h',
+    'adaptor_pool.cc',
+    'adaptor_pool.h',
+    'adaptor_subnet.cc',
+    'adaptor_subnet.h',
+    'netconf_error.h',
+    'translator.cc',
+    'translator.h',
+    'translator_class.cc',
+    'translator_class.h',
+    'translator_config.cc',
+    'translator_config.h',
+    'translator_control_socket.cc',
+    'translator_control_socket.h',
+    'translator_database.cc',
+    'translator_database.h',
+    'translator_host.cc',
+    'translator_host.h',
+    'translator_logger.cc',
+    'translator_logger.h',
+    'translator_option_data.cc',
+    'translator_option_data.h',
+    'translator_option_def.cc',
+    'translator_option_def.h',
+    'translator_pd_pool.cc',
+    'translator_pd_pool.h',
+    'translator_pool.cc',
+    'translator_pool.h',
+    'translator_shared_network.cc',
+    'translator_shared_network.h',
+    'translator_subnet.cc',
+    'translator_subnet.h',
+    'yang_models.h',
+    'yang_revisions.h',
+    dependencies: netconf_deps_array,
+    include_directories: [include_directories('.')] + INCLUDES,
+    install: true,
+    install_dir: 'lib',
+    link_with: LIBS_BUILT_SO_FAR,
+    override_options: ['cpp_std=c++20'],
 )
-libs_built_so_far += [kea_yang_lib]
+LIBS_BUILT_SO_FAR = [kea_yang_lib] + LIBS_BUILT_SO_FAR
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -0,0 +1 @@
+
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -0,0 +1 @@
+
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..8b137891791fe96927ad78e64b0aad7bded08bdc 100644 (file)
@@ -0,0 +1 @@
+