From 6e312f87fe7e6ae9a70fa14b08da6be0571beb6d Mon Sep 17 00:00:00 2001 From: Ruben Kerkhof Date: Thu, 9 Oct 2014 22:04:19 +0200 Subject: [PATCH] Only add LUA_CFLAGS and LUA_LIBS if we have lua --- m4/pdns_with_lua.m4 | 1 + pdns/Makefile.am | 16 +++++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/m4/pdns_with_lua.m4 b/m4/pdns_with_lua.m4 index a08eba966e..00f6320a36 100644 --- a/m4/pdns_with_lua.m4 +++ b/m4/pdns_with_lua.m4 @@ -31,4 +31,5 @@ AC_DEFUN([PDNS_WITH_LUA],[ ), AC_MSG_RESULT([$LUAPC]) ) ]) + AM_CONDITIONAL([LUA], [test "x$with_lua" = "xyes"]) ]) diff --git a/pdns/Makefile.am b/pdns/Makefile.am index d87dd8517f..7dfcfb279d 100644 --- a/pdns/Makefile.am +++ b/pdns/Makefile.am @@ -6,7 +6,6 @@ AM_CXXFLAGS = \ -DSYSCONFDIR=\"$(sysconfdir)\" \ -DPKGLIBDIR=\"$(pkglibdir)\" \ -DLOCALSTATEDIR=\"$(socketdir)\" \ - $(LUA_CFLAGS) \ $(POLARSSL_CFLAGS) YAHTTP_LIBS = -Lext/yahttp/yahttp -lyahttp @@ -30,6 +29,10 @@ if SQLITE3 AM_CPPFLAGS += $(SQLITE3_CFLAGS) endif +if LUA +AM_CPPFLAGS +=$(LUA_CFLAGS) +endif + EXTRA_DIST = \ dnslabeltext.rl \ dnslabeltext.cc \ @@ -191,7 +194,6 @@ pdns_server_LDADD = \ $(LIBDL) \ $(POLARSSL_LIBS) \ $(BOOST_SERIALIZATION_LIBS) \ - $(LUA_LIBS) \ $(YAHTTP_LIBS) if BOTAN110 @@ -223,6 +225,10 @@ pdns_server_SOURCES += pkcs11signers.cc pkcs11signers.hh pdns_server_LDADD += $(P11KIT1_LIBS) endif +if LUA +pdns_server_LDADD += $(LUA_LIBS) +endif + pdnssec_SOURCES = \ arguments.cc \ backends/gsql/gsqlbackend.cc backends/gsql/gsqlbackend.hh \ @@ -914,11 +920,15 @@ pdns_recursor_SOURCES = \ ws-recursor.cc ws-recursor.hh \ zoneparser-tng.cc zoneparser-tng.hh -pdns_recursor_LDFLAGS = $(THREADFLAGS) $(LUA_LIBS) +pdns_recursor_LDFLAGS = $(THREADFLAGS) pdns_recursor_LDADD = \ $(POLARSSL_LIBS) \ $(YAHTTP_LIBS) +if LUA +pdns_recursor_LDADD += $(LUA_LIBS) +endif + pdns_control_SOURCES = \ arguments.cc \ dynloader.cc \ -- 2.47.2