]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Check for lua.hpp when using luajit 3991/head
authorPieter Lexis <pieter.lexis@powerdns.com>
Tue, 14 Jun 2016 11:04:14 +0000 (13:04 +0200)
committerPieter Lexis <pieter.lexis@powerdns.com>
Tue, 14 Jun 2016 16:58:55 +0000 (18:58 +0200)
configure.ac
m4/pdns_check_lua_hpp.m4 [new file with mode: 0644]
m4/pdns_with_lua.m4
pdns/dnsdistdist/configure.ac
pdns/dnsdistdist/m4/pdns_check_lua_hpp.m4 [new symlink]
pdns/recursordist/configure.ac
pdns/recursordist/m4/pdns_check_lua_hpp.m4 [new symlink]

index 903c37df53f189096fdc3d88f732f2566d7038c6..4317fe557a3ca1e1724dab5a9efff1ef47e31d7a 100644 (file)
@@ -45,6 +45,7 @@ PDNS_WITH_LUAJIT
 AS_IF([test "x$with_luajit" = "xno"], [
   PDNS_WITH_LUA
 ])
+PDNS_CHECK_LUA_HPP
 
 AX_CXX_COMPILE_STDCXX_11
 
diff --git a/m4/pdns_check_lua_hpp.m4 b/m4/pdns_check_lua_hpp.m4
new file mode 100644 (file)
index 0000000..7317153
--- /dev/null
@@ -0,0 +1,8 @@
+AC_DEFUN([PDNS_CHECK_LUA_HPP],[
+  AC_REQUIRE([PDNS_WITH_LUA])
+  AC_REQUIRE([PDNS_WITH_LUAJIT])
+  AS_IF([test "x$LUAPC" != "x" -o "x$LUAJITPC" != "x" ], [
+    AC_CHECK_HEADER([lua.hpp], [ have_lua_hpp=y ])
+  ])
+  AM_CONDITIONAL([HAVE_LUA_HPP], [ test x"$have_lua_hpp" = "xy" ])
+])
index 1494e195a09c389e6823e03cb16f1c6d3a59324d..18bb1b9d8bd1a4469f1d24c09435e05836cf3b1a 100644 (file)
@@ -28,10 +28,8 @@ AC_DEFUN([PDNS_WITH_LUA],[
       AS_IF([test "x$with_lua" = "xyes"],
         [AC_MSG_ERROR([cannot find lua])],
         [AC_MSG_RESULT([not found])]
-      )],
-      [AC_MSG_RESULT([$LUAPC])
-       AC_CHECK_HEADER([lua.hpp], [ have_lua_hpp=y ])
-       AM_CONDITIONAL([HAVE_LUA_HPP], [ test x"$have_lua_hpp" = "xy" ])
+      )],[
+        AC_MSG_RESULT([$LUAPC])
       ])
     ])
   AM_CONDITIONAL([LUA], [test "x$with_lua" = "xyes"])
index f8d183b65e7749058d6c764140ff40926c0cc099..cded42e425ae818015b0606eb722d262f2eee043 100644 (file)
@@ -48,6 +48,7 @@ AS_IF([test "x$with_luajit" = "xno"], [
 AS_IF([test "x$LUAPC" = "x" -a "x$LUAJITPC" = "x"], [
   AC_MSG_ERROR([Neither Lua nor LuaJIT found, Lua support is not optional])
 ])
+PDNS_CHECK_LUA_HPP
 
 AX_CXX_COMPILE_STDCXX_11([ext], [mandatory])
 
diff --git a/pdns/dnsdistdist/m4/pdns_check_lua_hpp.m4 b/pdns/dnsdistdist/m4/pdns_check_lua_hpp.m4
new file mode 120000 (symlink)
index 0000000..4ed8acd
--- /dev/null
@@ -0,0 +1 @@
+../../../m4/pdns_check_lua_hpp.m4
\ No newline at end of file
index b376001975e6f1a8ac17300b07eeb5b9c0ba9576..86c0d36e0c7a6d22c9a1b4fee8cd5ea8a4850984 100644 (file)
@@ -89,6 +89,7 @@ PDNS_WITH_LUAJIT
 AS_IF([test "x$with_luajit" = "xno"], [
   PDNS_WITH_LUA
 ])
+PDNS_CHECK_LUA_HPP
 
 PDNS_ENABLE_VERBOSE_LOGGING
 
diff --git a/pdns/recursordist/m4/pdns_check_lua_hpp.m4 b/pdns/recursordist/m4/pdns_check_lua_hpp.m4
new file mode 120000 (symlink)
index 0000000..4ed8acd
--- /dev/null
@@ -0,0 +1 @@
+../../../m4/pdns_check_lua_hpp.m4
\ No newline at end of file