From 1e50b2e404d9467740963a8f2c169c0cfc817206 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 4 Oct 2019 07:36:56 +0200 Subject: [PATCH] lua: fix lua int size detection Failed to work with non-bundled htp and with some stricter compile flags. --- configure.ac | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 14a87563dd..3df576d547 100644 --- a/configure.ac +++ b/configure.ac @@ -2119,13 +2119,16 @@ # If Lua is enabled, test the integer size. if test "x$enable_lua" = "xyes"; then + TMPLIBS="$LIBS" + LIBS="" + AC_MSG_CHECKING([size of lua integer]) - AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include ]], + AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include ]], [[ if (sizeof(lua_Integer) == 8) { - exit(1); + return 1; } - exit(0); + return 0; ]])], [ AC_MSG_RESULT([4]) @@ -2134,6 +2137,7 @@ AC_MSG_RESULT([8]) AC_SUBST([LUA_INT8], ["lua_int8"]) ]) + LIBS="$TMPLIBS" fi # libmaxminddb -- 2.47.2