]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
dnsdist: allow building on openindiana
authorPieter Lexis <pieter.lexis@powerdns.com>
Wed, 17 Feb 2016 23:16:03 +0000 (00:16 +0100)
committerPieter Lexis <pieter.lexis@powerdns.com>
Wed, 8 Jun 2016 09:15:15 +0000 (11:15 +0200)
m4/pdns_with_lua.m4
pdns/dnsdist-lua.cc
pdns/dnsdistdist/.gitignore
pdns/dnsdistdist/Makefile.am
pdns/dnsdistdist/configure.ac
pdns/dnsdistdist/lua_hpp.mk [new symlink]
pdns/dnsdistdist/m4/pdns_check_network_libs.m4 [new symlink]

index 1956a1538dac00ca1fb69f29473eb4dcd6441f52..1494e195a09c389e6823e03cb16f1c6d3a59324d 100644 (file)
@@ -29,8 +29,10 @@ AC_DEFUN([PDNS_WITH_LUA],[
         [AC_MSG_ERROR([cannot find lua])],
         [AC_MSG_RESULT([not found])]
       )],
-      [AC_MSG_RESULT([$LUAPC])]
-    )
-  ])
+      [AC_MSG_RESULT([$LUAPC])
+       AC_CHECK_HEADER([lua.hpp], [ have_lua_hpp=y ])
+       AM_CONDITIONAL([HAVE_LUA_HPP], [ test x"$have_lua_hpp" = "xy" ])
+      ])
+    ])
   AM_CONDITIONAL([LUA], [test "x$with_lua" = "xyes"])
 ])
index 45b0ef0714b63247584b28809b9a419fda1d2c78..c2c25d90b423736c649a387b1e8a181f6f4201d6 100644 (file)
@@ -1,3 +1,4 @@
+#include <net/if.h>
 #include "dnsdist.hh"
 #include "dnsrulactions.hh"
 #include <thread>
@@ -7,7 +8,6 @@
 #include <fstream>
 #include "dnswriter.hh"
 #include "lock.hh"
-#include <net/if.h>
 
 #ifdef HAVE_SYSTEMD
 #include <systemd/sd-daemon.h>
index 6a62959c6ee9fdd2b633e9b6e5d618e6aac38cfd..aff08cea58eefef4fe2bdc74479da650e4b205e3 100644 (file)
@@ -32,3 +32,4 @@
 /dnsmessage.pb.cc
 /dnsmessage.pb.h
 /dnsdist.service
+/lua.hpp
index 1b97108fbc373db5118e5f170d11c64ca6acd9d2..0f6943ec6194079d13ea01e95b5f9d24d4a9783a 100644 (file)
@@ -40,7 +40,8 @@ EXTRA_DIST=dnslabeltext.rl \
           ext/incbin/UNLICENSE \
           incfiles \
           src_js \
-          dnsdist.service.in
+          dnsdist.service.in \
+          lua_hpp.mk
 
 bin_PROGRAMS = dnsdist
 
@@ -116,6 +117,11 @@ if HAVE_RE2
 dnsdist_LDADD += $(RE2_LIBS)
 endif
 
+if !HAVE_LUA_HPP
+BUILT_SOURCES += lua.hpp
+nodist_dnsdist_SOURCES = lua.hpp
+CLEANFILES += lua.hpp
+endif
 
 if HAVE_PROTOBUF
 if HAVE_PROTOC
@@ -199,3 +205,7 @@ systemdsystemunitdir = $(SYSTEMD_DIR)
 systemdsystemunit_DATA = \
        dnsdist.service
 endif
+
+if !HAVE_LUA_HPP
+include lua_hpp.mk
+endif
index e98e7c5b5d17e34b381d09dfaa2f55faec4d608d..f8d183b65e7749058d6c764140ff40926c0cc099 100644 (file)
@@ -7,6 +7,7 @@ AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADERS([config.h])
 AC_PROG_CC
 AC_PROG_CXX
+AC_LANG([C++])
 
 LT_PREREQ([2.2.2])
 LT_INIT([disable-static])
@@ -16,6 +17,9 @@ DNSDIST_CHECK_RAGEL
 PDNS_CHECK_LIBEDIT
 PDNS_CHECK_CLOCK_GETTIME
 
+PDNS_CHECK_OS
+PDNS_CHECK_NETWORK_LIBS
+
 boost_required_version=1.35
 
 PDNS_WITH_PROTOBUF
@@ -63,8 +67,6 @@ AS_IF([test "x$enable_hardening" != "xno"], [
   AC_LD_RELRO
 ])
 
-PDNS_CHECK_OS
-
 PDNS_ENABLE_SANITIZERS
 
 PDNS_CHECK_PANDOC
diff --git a/pdns/dnsdistdist/lua_hpp.mk b/pdns/dnsdistdist/lua_hpp.mk
new file mode 120000 (symlink)
index 0000000..52778c2
--- /dev/null
@@ -0,0 +1 @@
+../lua_hpp.mk
\ No newline at end of file
diff --git a/pdns/dnsdistdist/m4/pdns_check_network_libs.m4 b/pdns/dnsdistdist/m4/pdns_check_network_libs.m4
new file mode 120000 (symlink)
index 0000000..ec197ee
--- /dev/null
@@ -0,0 +1 @@
+../../../m4/pdns_check_network_libs.m4
\ No newline at end of file