PDNS_CHECK_RAGEL([pdns/dnslabeltext.cc], [www.powerdns.com])
PDNS_CHECK_CLOCK_GETTIME
-BOOST_REQUIRE([1.42])
-# Boost accumulators, as used by dnsbulktest and dnstcpbench, need 1.48+
-# to be compatible with C++11
-AM_CONDITIONAL([HAVE_BOOST_GE_148], [test "$boost_major_version" -ge 148])
-AS_IF([test "$boost_major_version" -ge 148], [
- AC_DEFINE(HAVE_BOOST_GE_148, [1], [Define to 1 if you have boost >= 1.48])
-])
+BOOST_REQUIRE([1.54])
BOOST_PROGRAM_OPTIONS([mt])
AS_IF([test "$boost_cv_lib_program_options" = "no"], [
dnsbulktest.1 \
dnstcpbench.1
-if HAVE_BOOST_GE_148
MANPAGES_INSTALL += dnsbulktest.1 \
dnstcpbench.1
-endif
if TOOLS
MANPAGES_INSTALL += $(MANPAGES_TARGET_TOOLS)
By default, the PowerDNS Authoritative Server requires the following libraries and headers:
-* `Boost <http://boost.org/>`_ 1.35 or newer
+* `Boost <http://boost.org/>`_ 1.54 or newer
* `OpenSSL <https://openssl.org>`_
To build from a Git repository clone, the following dependencies are also required:
'main': src_dir / 'ixplore.cc',
'manpages': ['ixplore.1'],
},
+ 'dnstcpbench': {
+ 'main': src_dir / 'dnstcpbench.cc',
+ 'manpages': ['dnstcpbench.1'],
+ },
+ 'dnsbulktest': {
+ 'main': src_dir / 'dnsbulktest.cc',
+ 'manpages': ['dnsbulktest.1'],
+ },
# Broken
# 'comfun' : {
# 'main': src_dir / 'comfun.cc',
src_dir / 'tcpiohandler.hh',
)
- if have_boost_1_48_0
- tools += {
- 'dnstcpbench': {
- 'main': src_dir / 'dnstcpbench.cc',
- 'manpages': ['dnstcpbench.1'],
- },
- 'dnsbulktest': {
- 'main': src_dir / 'dnsbulktest.cc',
- 'manpages': ['dnsbulktest.1'],
- },
- }
- endif
endif
if get_option('tools-ixfrdist')
-dep_boost = dependency('boost', version: '>= 1.42', required: true)
-# Boost accumulators, as used by dnsbulktest and dnstcpbench, need 1.48+ to be compatible
-# with C++11.
-have_boost_1_48_0 = dep_boost.version().version_compare('>= 1.48.0')
-conf.set('HAVE_BOOST_GE_148', have_boost_1_48_0, description: 'Boost version >= 1.48.0')
+dep_boost = dependency('boost', version: '>= 1.54', required: true)
# conf.set('BOOST_CONTAINER_USE_STD_EXCEPTIONS', true, description: 'Boost use std exceptions')
add_project_arguments('-DBOOST_CONTAINER_USE_STD_EXCEPTIONS', language: ['c', 'cpp'])
summary('Boost', dep_boost.found(), bool_yn: true, section: 'Boost')
bin_PROGRAMS += calidns
-if HAVE_BOOST_GE_148
bin_PROGRAMS += \
dnsbulktest \
dnstcpbench
-endif
endif # TOOLS
if UNIT_TESTS
noinst_PROGRAMS += testrunner
-if HAVE_BOOST_GE_148
TESTS_ENVIRONMENT = env BOOST_TEST_LOG_LEVEL=message BOOST_TEST_RANDOM=1 SRCDIR='$(srcdir)'
TESTS=testrunner
-else
-check-local:
- @echo "Unit tests disabled, boost is too old"
-endif
else
check-local:
PDNS_CHECK_SECURE_MEMSET
AC_FUNC_STRERROR_R
-BOOST_REQUIRE([1.42])
+BOOST_REQUIRE([1.54])
PDNS_ENABLE_UNIT_TESTS
PDNS_ENABLE_FUZZ_TARGETS
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
-#ifdef HAVE_BOOST_GE_148
-#include "histog.hh"
-#endif
+#include "histog.hh"
#include "statbag.hh"
#include "dnspcap.hh"
#include "dnsparser.hh"
("rd", po::value<bool>(), "If set to true, only process RD packets, to false only non-RD, unset: both")
("ipv4", po::value<bool>()->default_value(true), "Process IPv4 packets")
("ipv6", po::value<bool>()->default_value(true), "Process IPv6 packets")
-#ifdef HAVE_BOOST_GE_148
("log-histogram", "Write a log-histogram to file 'log-histogram'")
("full-histogram", po::value<double>(), "Write a log-histogram to file 'full-histogram' with this millisecond bin size")
-#endif
("filter-name,f", po::value<string>(), "Do statistics only for queries within this domain")
("load-stats,l", po::value<string>()->default_value(""), "if set, emit per-second load statistics (questions, answers, outstanding)")
("no-servfail-stats", "Don't include servfails in response time stats")
cout.precision(4);
sum=0;
-#ifdef HAVE_BOOST_GE_148
if(g_vm.count("log-histogram")) {
string fname = g_vm["stats-dir"].as<string>()+"/log-histogram";
ofstream loglog(fname);
throw runtime_error("Unable to write statistics to "+fname);
writeFullHistogramFile(cumul, g_vm["full-histogram"].as<double>(), loglog);
}
-#endif
-
sum=0;
double lastperc=0, perc=0;
*/
unsigned int bestpos=0;
*matchLen=0;
-#if BOOST_VERSION >= 105400
- boost::container::static_vector<uint16_t, 34> nvect, pvect;
-#else
- vector<uint16_t> nvect, pvect;
-#endif
+ boost::container::static_vector<uint16_t, 34> nvect;
+ boost::container::static_vector<uint16_t, 34> pvect;
try {
for(auto riter= raw.cbegin(); riter < raw.cend(); ) {
PDNS_CHECK_CLOCK_GETTIME
-BOOST_REQUIRE([1.42])
-
-# Check against flat_set header that requires boost >= 1.48
-BOOST_FIND_HEADER([boost/container/flat_set.hpp], [AC_MSG_NOTICE([boost::container::flat_set not available, will fallback to std::set])])
+BOOST_REQUIRE([1.54])
# Boost Context was introduced in 1.51 (Aug 2012), but there was an immediate
# API break in 1.52 (Nov 2012), so we only support that, and later.
By default, the :program:`Recursor` requires the following libraries and headers:
-* `Boost <http://boost.org/>`_ 1.35 or newer
+* `Boost <http://boost.org/>`_ 1.54 or newer
* `Lua <http://www.lua.org/>`_ 5.1+ or `LuaJit <http://luajit.org/>`_
* `OpenSSL <https://openssl.org>`_
* For :program:`Recursor` version 5 and higher, `cargo <https://www.rust-lang.org/tools/install>`_ version 1.64 or newer.
endif
endforeach
-conf.set('HAVE_BOOST_CONTAINER_FLAT_SET_HPP', have_boost_1_48_0, description: 'Boost version >= 1.48.0 has boost::container::flat_set')
+conf.set('HAVE_BOOST_CONTAINER_FLAT_SET_HPP', true)
# Generate config.h
config_h = configure_file(configuration: conf, output: 'config.h')
bool g_gettagNeedsEDNSOptions{false};
bool g_useKernelTimestamp;
std::atomic<uint32_t> g_maxCacheEntries, g_maxPacketCacheEntries;
-#ifdef HAVE_BOOST_CONTAINER_FLAT_SET_HPP
boost::container::flat_set<uint16_t> g_avoidUdpSourcePorts;
-#else
-std::set<uint16_t> g_avoidUdpSourcePorts;
-#endif
uint16_t g_minUdpSourcePort;
uint16_t g_maxUdpSourcePort;
double g_balancingFactor;
#include "nod.hh"
#endif /* NOD_ENABLED */
-#ifdef HAVE_BOOST_CONTAINER_FLAT_SET_HPP
#include <boost/container/flat_set.hpp>
-#endif
extern std::shared_ptr<Logr::Logger> g_slogtcpin;
extern std::shared_ptr<Logr::Logger> g_slogudpin;
extern thread_local FrameStreamServersInfo t_nodFrameStreamServersInfo;
#endif /* HAVE_FSTRM */
-#ifdef HAVE_BOOST_CONTAINER_FLAT_SET_HPP
extern boost::container::flat_set<uint16_t> g_avoidUdpSourcePorts;
-#else
-extern std::set<uint16_t> g_avoidUdpSourcePorts;
-#endif
/* without reuseport, all listeners share the same sockets */
typedef vector<pair<int, std::function<void(int, boost::any&)>>> deferredAdd_t;