From e10b65281b4f35d3ef3481c5d46ad5490263ffbd Mon Sep 17 00:00:00 2001 From: Pieter Lexis Date: Thu, 18 Feb 2016 00:16:19 +0100 Subject: [PATCH] recursor: allow building on openindiana --- pdns/lua_hpp.mk | 6 ++++++ pdns/recursordist/.gitignore | 1 + pdns/recursordist/Makefile.am | 11 +++++++++++ pdns/recursordist/configure.ac | 1 + pdns/recursordist/lua_hpp.mk | 1 + pdns/recursordist/m4/pdns_check_network_libs.m4 | 1 + 6 files changed, 21 insertions(+) create mode 100644 pdns/lua_hpp.mk create mode 120000 pdns/recursordist/lua_hpp.mk create mode 120000 pdns/recursordist/m4/pdns_check_network_libs.m4 diff --git a/pdns/lua_hpp.mk b/pdns/lua_hpp.mk new file mode 100644 index 000000000..70502f49a --- /dev/null +++ b/pdns/lua_hpp.mk @@ -0,0 +1,6 @@ +lua.hpp: + $(AM_V_GEN)echo 'extern "C" {' > $@ + @echo '#include "lua.h"' >> $@ + @echo '#include "lualib.h"' >> $@ + @echo '#include "lauxlib.h"' >> $@ + @echo '}' >> $@ diff --git a/pdns/recursordist/.gitignore b/pdns/recursordist/.gitignore index 9d26984e8..35bf6defd 100644 --- a/pdns/recursordist/.gitignore +++ b/pdns/recursordist/.gitignore @@ -40,3 +40,4 @@ /dnsmessage.pb.h /pdns-recursor.service /pdns-recursor@.service +/lua.hpp diff --git a/pdns/recursordist/Makefile.am b/pdns/recursordist/Makefile.am index 3d3dd22a4..0a42a7214 100644 --- a/pdns/recursordist/Makefile.am +++ b/pdns/recursordist/Makefile.am @@ -46,6 +46,7 @@ EXTRA_DIST = \ effective_tld_names.dat \ epollmplexer.cc \ kqueuemplexer.cc \ + lua_hpp.mk \ malloctrace.cc malloctrace.hh \ mtasker.cc \ mtasker_fcontext.cc mtasker_ucontext.cc \ @@ -133,6 +134,12 @@ pdns_recursor_SOURCES = \ ws-recursor.cc ws-recursor.hh \ zoneparser-tng.cc zoneparser-tng.hh +if !HAVE_LUA_HPP +BUILT_SOURCES += lua.hpp +nodist_pdns_recursor_SOURCES = lua.hpp +CLEANFILES += lua.hpp +endif + pdns_recursor_LDADD = \ $(YAHTTP_LIBS) \ $(JSON11_LIBS) \ @@ -250,3 +257,7 @@ systemdsystemunit_DATA = \ pdns-recursor.service \ pdns-recursor@.service endif + +if !HAVE_LUA_HPP +include lua_hpp.mk +endif diff --git a/pdns/recursordist/configure.ac b/pdns/recursordist/configure.ac index 448ec662e..b37600197 100644 --- a/pdns/recursordist/configure.ac +++ b/pdns/recursordist/configure.ac @@ -38,6 +38,7 @@ AX_CXX_COMPILE_STDCXX_11([ext], [mandatory]) AC_PROG_LIBTOOL PDNS_CHECK_OS +PDNS_CHECK_NETWORK_LIBS # 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. diff --git a/pdns/recursordist/lua_hpp.mk b/pdns/recursordist/lua_hpp.mk new file mode 120000 index 000000000..52778c226 --- /dev/null +++ b/pdns/recursordist/lua_hpp.mk @@ -0,0 +1 @@ +../lua_hpp.mk \ No newline at end of file diff --git a/pdns/recursordist/m4/pdns_check_network_libs.m4 b/pdns/recursordist/m4/pdns_check_network_libs.m4 new file mode 120000 index 000000000..ec197ee3b --- /dev/null +++ b/pdns/recursordist/m4/pdns_check_network_libs.m4 @@ -0,0 +1 @@ +../../../m4/pdns_check_network_libs.m4 \ No newline at end of file -- 2.40.0