From: Pieter Lexis Date: Wed, 17 Feb 2016 23:16:03 +0000 (+0100) Subject: dnsdist: allow building on openindiana X-Git-Tag: auth-4.0.0-rc1~50^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=65613131cd97b2fc738229ddad4fe8a3b484c073;p=thirdparty%2Fpdns.git dnsdist: allow building on openindiana --- diff --git a/m4/pdns_with_lua.m4 b/m4/pdns_with_lua.m4 index 1956a1538d..1494e195a0 100644 --- a/m4/pdns_with_lua.m4 +++ b/m4/pdns_with_lua.m4 @@ -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"]) ]) diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 45b0ef0714..c2c25d90b4 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -1,3 +1,4 @@ +#include #include "dnsdist.hh" #include "dnsrulactions.hh" #include @@ -7,7 +8,6 @@ #include #include "dnswriter.hh" #include "lock.hh" -#include #ifdef HAVE_SYSTEMD #include diff --git a/pdns/dnsdistdist/.gitignore b/pdns/dnsdistdist/.gitignore index 6a62959c6e..aff08cea58 100644 --- a/pdns/dnsdistdist/.gitignore +++ b/pdns/dnsdistdist/.gitignore @@ -32,3 +32,4 @@ /dnsmessage.pb.cc /dnsmessage.pb.h /dnsdist.service +/lua.hpp diff --git a/pdns/dnsdistdist/Makefile.am b/pdns/dnsdistdist/Makefile.am index 1b97108fbc..0f6943ec61 100644 --- a/pdns/dnsdistdist/Makefile.am +++ b/pdns/dnsdistdist/Makefile.am @@ -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 diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index e98e7c5b5d..f8d183b65e 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -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 index 0000000000..52778c2266 --- /dev/null +++ b/pdns/dnsdistdist/lua_hpp.mk @@ -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 index 0000000000..ec197ee3b2 --- /dev/null +++ b/pdns/dnsdistdist/m4/pdns_check_network_libs.m4 @@ -0,0 +1 @@ +../../../m4/pdns_check_network_libs.m4 \ No newline at end of file