]> granicus.if.org Git - pdns/commitdiff
Handle missing Lua when lua backend is enabled
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 7 Oct 2014 10:04:32 +0000 (12:04 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Tue, 7 Oct 2014 10:11:24 +0000 (12:11 +0200)
The first case handles ./configure --with-modules='lua' --with-lua=no.
I don't know who would do such a thing, but better handle it in
./configure than bailing out later with a compiler error.

The second case handles ./configure --with-modules=lua when you don't have
Lua installed, which I actually observed since I assumed enabling the
lua backend would be enough, and I did't have the lua headers on my
system.

Fixes #1618

configure.ac

index 9028cfe7b73b790abb337c375db31cd4854f8428..c8d2a0015b0b44254eaf5d7638e335764be560af 100644 (file)
@@ -291,6 +291,14 @@ for a in $modules $dynmodules; do
     geoip)
       PDNS_CHECK_GEOIP
       ;;
+    lua)
+      AS_IF([test "x$with_lua" = "xno"],
+        AC_MSG_ERROR([Lua backend needs lua, run ./configure --with-lua])
+      )
+      AS_IF([test "x$LUAPC" = "x"],
+        AC_MSG_ERROR([Lua backend needs lua but we cannot find it])
+      )
+      ;;
   esac
 done