From: Vsevolod Stakhov Date: Wed, 11 Mar 2015 10:26:58 +0000 (+0000) Subject: Do not check for lua5.2 when luajit is enabled. X-Git-Tag: 0.9.0~527 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=94ea1a337e014e2d6fbd81d5da184278f2ec79a3;p=rspamd.git Do not check for lua5.2 when luajit is enabled. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 42482299e..3754197f6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -397,10 +397,15 @@ ENDIF(CMAKE_SYSTEM_NAME STREQUAL "SunOS") # Now find libraries and headers # Find lua libraries -FindLua(5 2) -IF(NOT LUA_FOUND) +IF(ENABLE_LUAJIT MATCHES "ON") + # For luajit we need to check merely lua 5.1 as lua 5.2 is incompatible FindLua(5 1) -ENDIF(NOT LUA_FOUND) +ELSE(ENABLE_LUAJIT MATCHES "ON") + FindLua(5 2) + IF(NOT LUA_FOUND) + FindLua(5 1) + ENDIF(NOT LUA_FOUND) +ENDIF(ENABLE_LUAJIT MATCHES "ON") IF(NOT LUA_FOUND) MESSAGE(FATAL_ERROR "Lua not found, lua support is required for working") @@ -668,6 +673,7 @@ CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H) CHECK_INCLUDE_FILES(sysexits.h HAVE_SYSEXITS_H) CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H) CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H) +CHECK_INCLUDE_FILES(stdbool.h HAVE_STDBOOL_H) CHECK_INCLUDE_FILES(endian.h HAVE_ENDIAN_H) CHECK_INCLUDE_FILES(sys/endian.h HAVE_SYS_ENDIAN_H) CHECK_INCLUDE_FILES(machine/endian.h HAVE_MACHINE_ENDIAN_H)