aboutsummaryrefslogtreecommitdiff
path: root/net/pdns/patches/100-lua-hpp.patch
blob: fa8ac1dad2005d7705fe0367fcdd7f4a1042d39c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
--- a/pdns/Makefile.am
+++ b/pdns/Makefile.am
@@ -54,7 +54,8 @@
 	bindparser.h \
 	named.conf.parsertest \
 	delaypipe.hh delaypipe.cc \
-	pdns.service.in
+	pdns.service.in \
+	lua_hpp.mk
 
 BUILT_SOURCES = \
 	bind-dnssec.schema.sqlite3.sql.h \
@@ -109,6 +108,12 @@
 
 endif
 
+if !HAVE_LUA_HPP
+BUILT_SOURCES += lua.hpp
+nodist_pdns_server_SOURCES = lua.hpp
+CLEANFILES += lua.hpp
+endif
+
 EXTRA_PROGRAMS = \
 	calidns \
 	comfun \
@@ -1303,3 +1305,7 @@
 	pdns.service \
 	pdns@.service
 endif
+
+if !HAVE_LUA_HPP
+include lua_hpp.mk
+endif
--- /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 '}' >> $@
--- a/modules/luabackend/Makefile.am
+++ b/modules/luabackend/Makefile.am
@@ -15,5 +15,15 @@
 	slave.cc \
 	supermaster.cc
 
+if !HAVE_LUA_HPP
+BUILT_SOURCES = lua.hpp
+nodist_libluabackend_la_SOURCES = lua.hpp
+CLEANFILES = lua.hpp
+endif
+
 libluabackend_la_LDFLAGS = -module -avoid-version
 libluabackend_la_LIBADD = $(LUA_LIBS)
+
+if !HAVE_LUA_HPP
+include ../../pdns/lua_hpp.mk
+endif