diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-08 17:08:38 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-10-08 17:31:43 +0100 |
commit | 10d67f5c800831b0dd152bf8708237b6b69c9e51 (patch) | |
tree | 4d71bb69f8b039df8fa0e4227e45e9cbeba4b00f /CMakeLists.txt | |
parent | 7b1dd5c1a0e3fdcfba31453731fb46361d637bf6 (diff) | |
download | rspamd-10d67f5c800831b0dd152bf8708237b6b69c9e51.tar.gz rspamd-10d67f5c800831b0dd152bf8708237b6b69c9e51.zip |
[Minor] Check for cached libevent time routines
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index dbec0ceff..2d59bd0cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1078,10 +1078,16 @@ ENDIF(HAVE_SIGINFO_H) # Some hack for libevent 2.0 CHECK_C_SOURCE_COMPILES ("#include <event.h> - #if _EVENT_NUMERIC_VERSION < 0x02000000 + #if !defined(LIBEVENT_VERSION_NUMBER) || LIBEVENT_VERSION_NUMBER < 0x02000000 #error Unsupported #endif int main() { return 0;}" HAVE_LIBEVENT2) +CHECK_C_SOURCE_COMPILES ("#include <event2/event.h> + int main() { return EVENT_BASE_FLAG_NO_CACHE_TIME; }" + HAVE_EVENT_NO_CACHE_TIME_FLAG) +LIST(APPEND CMAKE_REQUIRED_LIBRARIES "event") +CHECK_SYMBOL_EXISTS(event_base_update_cache_time "sys/types.h;event.h" + HAVE_EVENT_NO_CACHE_TIME_FUNC) IF(NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS") IF(HAVE_CLOCK_GETTIME) |