From: Victor Julien Date: Fri, 4 Oct 2019 05:36:56 +0000 (+0200) Subject: lua: fix lua int size detection X-Git-Tag: suricata-5.0.0~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F4273%2Fhead;p=thirdparty%2Fsuricata.git lua: fix lua int size detection Failed to work with non-bundled htp and with some stricter compile flags. --- 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