]> granicus.if.org Git - pdns/commitdiff
Only add LUA_CFLAGS and LUA_LIBS if we have lua
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 9 Oct 2014 20:04:19 +0000 (22:04 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Thu, 9 Oct 2014 20:04:19 +0000 (22:04 +0200)
m4/pdns_with_lua.m4
pdns/Makefile.am

index a08eba966edbf89453f9fdf6e254edd449a82be6..00f6320a3646e6ba8613ed770513aa983b43ec33 100644 (file)
@@ -31,4 +31,5 @@ AC_DEFUN([PDNS_WITH_LUA],[
       ), AC_MSG_RESULT([$LUAPC])
     )
   ])
+  AM_CONDITIONAL([LUA], [test "x$with_lua" = "xyes"])
 ])
index d87dd8517ffd0db5a8ef59990c825910a450a80b..7dfcfb279dc421eceab4a891f1e00882584e01b7 100644 (file)
@@ -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 \