]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
lua: fix lua int size detection 4273/head
authorVictor Julien <victor@inliniac.net>
Fri, 4 Oct 2019 05:36:56 +0000 (07:36 +0200)
committerVictor Julien <victor@inliniac.net>
Fri, 4 Oct 2019 10:26:51 +0000 (12:26 +0200)
Failed to work with non-bundled htp and with some stricter
compile flags.

configure.ac

index 14a87563ddc322e4f8fdb19903ca52d7b361b2bd..3df576d5479c3022ea8e833a5e5265caa60076ab 100644 (file)
 
     # 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 <lua.h> ]],
+        AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <lua.h>]],
             [[
             if (sizeof(lua_Integer) == 8) {
-                exit(1);
+                return 1;
             }
-            exit(0);
+            return 0;
             ]])],
             [
                 AC_MSG_RESULT([4])
                 AC_MSG_RESULT([8])
                 AC_SUBST([LUA_INT8], ["lua_int8"])
             ])
+        LIBS="$TMPLIBS"
     fi
 
   # libmaxminddb