CMakeLists.txt revision 06b2a236
106b2a236SDmitri Tikhonov# Copyright (c) 2017 - 2021 LiteSpeed Technologies Inc.  See LICENSE.
25392f7a3SLiteSpeed TechINCLUDE(CheckFunctionExists)
35392f7a3SLiteSpeed TechCHECK_FUNCTION_EXISTS(sendmmsg HAVE_SENDMMSG)
45392f7a3SLiteSpeed TechCHECK_FUNCTION_EXISTS(recvmmsg HAVE_RECVMMSG)
55392f7a3SLiteSpeed TechCHECK_FUNCTION_EXISTS(open_memstream HAVE_OPEN_MEMSTREAM)
65392f7a3SLiteSpeed Tech
750aadb33SDmitri Tikhonov
8e0197994SDmitri TikhonovINCLUDE(CheckSymbolExists)
9e0197994SDmitri Tikhonov
10e0197994SDmitri TikhonovCHECK_SYMBOL_EXISTS(
11e0197994SDmitri Tikhonov    IP_MTU_DISCOVER
12e0197994SDmitri Tikhonov    "netinet/in.h"
13e0197994SDmitri Tikhonov    HAVE_IP_MTU_DISCOVER
14e0197994SDmitri Tikhonov)
15e0197994SDmitri Tikhonov
16e0197994SDmitri TikhonovCHECK_SYMBOL_EXISTS(
17e0197994SDmitri Tikhonov    IP_DONTFRAG
18e0197994SDmitri Tikhonov    "netinet/in.h"
19e0197994SDmitri Tikhonov    HAVE_IP_DONTFRAG
20e0197994SDmitri Tikhonov)
21e0197994SDmitri Tikhonov
22c3c69ba3SDmitri TikhonovCHECK_SYMBOL_EXISTS(
23c3c69ba3SDmitri Tikhonov    preadv
24c3c69ba3SDmitri Tikhonov    "sys/uio.h"
25c3c69ba3SDmitri Tikhonov    HAVE_PREADV
26c3c69ba3SDmitri Tikhonov)
27c3c69ba3SDmitri Tikhonov
285dc94445SDmitri TikhonovINCLUDE(CheckIncludeFiles)
295dc94445SDmitri Tikhonov
30fb3e20e0SDmitri TikhonovIF (MSVC AND PCRE_LIB)
31fb3e20e0SDmitri TikhonovFIND_PATH(EVENT_INCLUDE_DIR NAMES pcreposix.h)
32fb3e20e0SDmitri TikhonovIF (EVENT_INCLUDE_DIR)
33fb3e20e0SDmitri Tikhonov    MESSAGE(STATUS "found pcreposix.h")
34fb3e20e0SDmitri Tikhonov    SET(HAVE_REGEX 1)
35fb3e20e0SDmitri TikhonovELSE()
36fb3e20e0SDmitri Tikhonov    MESSAGE(FATAL_ERROR "event2/event.h was not found")
37fb3e20e0SDmitri TikhonovENDIF()
38fb3e20e0SDmitri TikhonovELSE()
395dc94445SDmitri TikhonovCHECK_INCLUDE_FILES(regex.h HAVE_REGEX)
40fb3e20e0SDmitri TikhonovENDIF()
41e0197994SDmitri Tikhonov
42e0197994SDmitri TikhonovCONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/test_config.h.in ${CMAKE_CURRENT_SOURCE_DIR}/test_config.h)
43