From 6d3c3c665da108c61f84782cf03ace9bdf1153f8 Mon Sep 17 00:00:00 2001 From: Kees Monshouwer Date: Sat, 15 Aug 2015 16:01:50 +0200 Subject: [PATCH] dnsdist: add missing mbed TLS includes --- pdns/dnsdistdist/.gitignore | 2 ++ pdns/dnsdistdist/Makefile.am | 9 +++++++-- pdns/dnsdistdist/configure.ac | 1 + pdns/dnsdistdist/populate | 13 +++++++++++-- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/pdns/dnsdistdist/.gitignore b/pdns/dnsdistdist/.gitignore index 469535229..ad5dc6452 100644 --- a/pdns/dnsdistdist/.gitignore +++ b/pdns/dnsdistdist/.gitignore @@ -21,6 +21,7 @@ /delaypipe.cc /delaypipe.hh /dns.hh +/dnsdist /dnsdist-lua.cc /dnsdist-tcp.cc /dnsdist-web.cc @@ -44,6 +45,7 @@ /iputils.hh /libtool /ltmain.sh +/mbedtlscompat.hh /misc.cc /misc.hh /missing diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index 2b2ac8d33..c34e2c881 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -1,4 +1,4 @@ -AM_CPPFLAGS = -I pdns $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" +AM_CPPFLAGS = -I pdns $(LUA_CFLAGS) $(YAHTTP_CFLAGS) $(BOOST_CPPFLAGS) -I$(CURDIR)/ext/mbedtls/include -O3 -Wall -pthread -DSYSCONFDIR=\"${sysconfdir}\" ACLOCAL_AMFLAGS = -I m4 @@ -51,7 +51,12 @@ dnsdist_SOURCES = \ ext/luawrapper/include/LuaContext.hpp \ ext/json11/json11.cpp \ ext/json11/json11.hpp \ - ext/incbin/incbin.h + ext/incbin/incbin.h \ + ext/mbedtls/include/mbedtls/config.h \ + ext/mbedtls/include/mbedtls/check_config.h \ + ext/mbedtls/include/mbedtls/base64.h \ + ext/mbedtls/include/mbedtls/platform.h \ + ext/mbedtls/library/base64.c dnsdist_LDFLAGS = \ $(AM_LDFLAGS) \ diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index c3a567f97..dd2973804 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -15,6 +15,7 @@ AC_SUBST([YAHTTP_CFLAGS], ['-I$(top_srcdir)/ext/yahttp']) AC_SUBST([YAHTTP_LIBS], ['-L$(top_builddir)/ext/yahttp/yahttp -lyahttp']) DNSDIST_LUA AX_CXX_COMPILE_STDCXX_11(ext,mandatory) +AC_DEFINE([HAVE_MBEDTLS2], [1], [Defined if mbed TLS version 2.x.x is used]) AC_CONFIG_FILES([Makefile ext/yahttp/Makefile diff --git a/pdns/dnsdistdist/populate b/pdns/dnsdistdist/populate index adbf0ad6e..10436731c 100755 --- a/pdns/dnsdistdist/populate +++ b/pdns/dnsdistdist/populate @@ -3,10 +3,10 @@ set -e set -x -ln -fs ../base32.hh ../base64.hh ../dnsdist.cc ../dnsdist.hh ../dnsdist-lua.cc \ +ln -fs ../base64.hh ../dnsdist.cc ../dnsdist.hh ../dnsdist-lua.cc \ ../dns.hh ../dnslabeltext.rl ../dnsname.cc ../dnsname.hh ../dnsparser.hh \ ../dnsrulactions.hh ../dnswriter.cc ../dnswriter.hh ../dolog.hh \ - ../iputils.cc ../iputils.hh ../misc.cc ../misc.hh ../namespaces.hh \ + ../iputils.cc ../iputils.hh ../mbedtlscompat.hh ../misc.cc ../misc.hh ../namespaces.hh \ ../pdnsexception.hh ../qtype.cc ../qtype.hh ../sholder.hh ../sodcrypto.cc \ ../sodcrypto.hh ../dnsdist-web.cc ../sstuff.hh ../dnsdist-tcp.cc \ ../dnsdist-carbon.cc ../delaypipe.cc ../delaypipe.hh . @@ -31,6 +31,15 @@ ln -sf ../../../../ext/json11/json11.{hpp,cpp} ext/json11 mkdir -p ext/incbin ln -sf ../../../../ext/incbin/incbin.h ext/incbin +mkdir -p ext/mbedtls/include/mbedtls +ln -sf ../../../../../../ext/mbedtls/include/mbedtls/config.h \ + ../../../../../../ext/mbedtls/include/mbedtls/check_config.h \ + ../../../../../../ext/mbedtls/include/mbedtls/base64.h \ + ../../../../../../ext/mbedtls/include/mbedtls/platform.h \ + ext/mbedtls/include/mbedtls +mkdir -p ext/mbedtls/library +ln -sf ../../../../../ext/mbedtls/library/base64.c ext/mbedtls/library + pandoc -s -t man ../../docs/manpages/dnsdist.1.md > dnsdist.1 mkdir -p ext/yahttp/yahttp -- 2.40.0