diff --git a/pdns/lua_hpp.mk b/pdns/lua_hpp.mk new file mode 100644 index 000000000000..70502f49a8ba --- /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 9d26984e896f..35bf6defd588 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 3d3dd22a43ac..0a42a72147de 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 448ec662ea6d..b376001975e6 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 000000000000..52778c2266b4 --- /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 000000000000..ec197ee3b209 --- /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