From 6a99b9a4fe9946c5d707969a81647cbd880569a0 Mon Sep 17 00:00:00 2001 From: bert hubert Date: Sun, 29 Nov 2015 14:06:14 +0100 Subject: [PATCH] this restores being able to build recursor w/o Lua, and also continues Travis testing of recursor w/o Lua --- .travis.yml | 4 ++-- build-scripts/dist-recursor | 2 +- pdns/rec-lua-conf.cc | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 93e5cce6f..a6ede2248 100644 --- a/.travis.yml +++ b/.travis.yml @@ -119,8 +119,8 @@ script: - cd .. - ./build-scripts/dist-recursor - cd pdns/pdns-recursor-*/ - - LUA=1 ./configure - - LUA=1 make -k -j 4 + - ./configure + - make -k -j 4 - cd .. - ln -s pdns-recursor*/pdns_recursor . - cd .. diff --git a/build-scripts/dist-recursor b/build-scripts/dist-recursor index 42e398c1b..ae6450129 100755 --- a/build-scripts/dist-recursor +++ b/build-scripts/dist-recursor @@ -38,7 +38,7 @@ ws-recursor.hh ws-api.hh secpoll-recursor.hh \ responsestats.hh webserver.hh dnsname.hh dnspacket.hh ednssubnet.hh \ filterpo.hh rpzloader.hh ixfr.hh gss_context.hh resolver.hh dnssecinfra.hh \ dnsseckeeper.hh statbag.hh ueberbackend.hh sha.hh dnsbackend.hh comment.hh \ -validate.hh validate-recursor.hh sortlist.hh" +validate.hh validate-recursor.hh sortlist.hh rec-lua-conf.hh sholder.hh" CFILES="syncres.cc iputils.cc misc.cc unix_utility.cc qtype.cc \ logger.cc arguments.cc lwres.cc pdns_recursor.cc lua-iputils.cc \ diff --git a/pdns/rec-lua-conf.cc b/pdns/rec-lua-conf.cc index 7471413c6..9c4c8c67c 100644 --- a/pdns/rec-lua-conf.cc +++ b/pdns/rec-lua-conf.cc @@ -1,4 +1,8 @@ +#include "config.h" +#ifdef HAVE_LUA #include "ext/luawrapper/include/LuaContext.hpp" +#endif + #include #include "namespaces.hh" #include "logger.hh" @@ -24,6 +28,14 @@ LuaConfigItems::LuaConfigItems() { } +#ifndef HAVE_LUA +void loadRecursorLuaConfig(const std::string& fname) +{ + throw PDNSException("Asked to load a Lua configuration file '"+fname+"' in binary without Lua support"); +} +#else + + void loadRecursorLuaConfig(const std::string& fname) { LuaConfigItems lci; @@ -77,3 +89,5 @@ void loadRecursorLuaConfig(const std::string& fname) Lua.executeCode(ifs); g_luaconfs.setState(lci); } + +#endif -- 2.40.0