From: Pieter Lexis Date: Tue, 14 Jun 2016 11:04:14 +0000 (+0200) Subject: Check for lua.hpp when using luajit X-Git-Tag: auth-4.0.0-rc1~43^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9a92758660f91cb9b3c72d82ea2be5422edaefb0;p=thirdparty%2Fpdns.git Check for lua.hpp when using luajit --- diff --git a/configure.ac b/configure.ac index 903c37df53..4317fe557a 100644 --- a/configure.ac +++ b/configure.ac @@ -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 index 0000000000..7317153984 --- /dev/null +++ b/m4/pdns_check_lua_hpp.m4 @@ -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" ]) +]) diff --git a/m4/pdns_with_lua.m4 b/m4/pdns_with_lua.m4 index 1494e195a0..18bb1b9d8b 100644 --- a/m4/pdns_with_lua.m4 +++ b/m4/pdns_with_lua.m4 @@ -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"]) diff --git a/pdns/dnsdistdist/configure.ac b/pdns/dnsdistdist/configure.ac index f8d183b65e..cded42e425 100644 --- a/pdns/dnsdistdist/configure.ac +++ b/pdns/dnsdistdist/configure.ac @@ -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 index 0000000000..4ed8acd723 --- /dev/null +++ b/pdns/dnsdistdist/m4/pdns_check_lua_hpp.m4 @@ -0,0 +1 @@ +../../../m4/pdns_check_lua_hpp.m4 \ No newline at end of file diff --git a/pdns/recursordist/configure.ac b/pdns/recursordist/configure.ac index b376001975..86c0d36e0c 100644 --- a/pdns/recursordist/configure.ac +++ b/pdns/recursordist/configure.ac @@ -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 index 0000000000..4ed8acd723 --- /dev/null +++ b/pdns/recursordist/m4/pdns_check_lua_hpp.m4 @@ -0,0 +1 @@ +../../../m4/pdns_check_lua_hpp.m4 \ No newline at end of file