diff options
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 47 |
1 files changed, 17 insertions, 30 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6f540ed5..466117d0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -94,6 +94,7 @@ set(CMAKE_REQUIRED_FLAGS "-include sys/types.h") check_include_files(sys/event.h HAVE_SYS_EVENT_H) set(CMAKE_REQUIRED_FLAGS) check_include_files(sys/filio.h HAVE_SYS_FILIO_H) +check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H) check_include_files(sys/mman.h HAVE_SYS_MMAN_H) check_include_files(sys/loadavg.h HAVE_SYS_LOADAVG_H) check_include_files(sys/poll.h HAVE_SYS_POLL_H) @@ -115,8 +116,8 @@ check_include_files(malloc.h HAVE_MALLOC_H) check_include_files(poll.h HAVE_POLL_H) check_include_files(port.h HAVE_PORT_H) check_include_files(pwd.h HAVE_PWD_H) -check_include_files(stddef.h HAVE_STDDEF_H) check_include_files(stdint.h HAVE_STDINT_H) +check_include_files(stdlib.h HAVE_STDLIB_H) check_include_files(strings.h HAVE_STRINGS_H) check_include_files(syslog.h HAVE_SYSLOG_H) @@ -128,16 +129,15 @@ if(HAVE_LIBCRYPT_CRYPT_R) set(HAVE_CRYPT_R 1) set(HAVE_LIBCRYPT 1) else() - check_library_exists(crypt crypt "" HAVE_LIBCRYPT) + check_library_exists(crypt crypt "" HAVE_LIBCRYPT_CRYPT) + if(HAVE_LIBCRYPT_CRYPT) + set(HAVE_CRYPT 1) + set(HAVE_LIBCRYPT 1) + endif() endif() check_function_exists(crypt_r HAVE_CRYPT_R) check_function_exists(crypt HAVE_CRYPT) -check_include_files(sys/inotify.h HAVE_SYS_INOTIFY_H) -if(HAVE_SYS_INOTIFY_H) - check_function_exists(inotify_init HAVE_INOTIFY_INIT) -endif() - set(CMAKE_EXTRA_INCLUDE_FILES sys/socket.h) check_type_size(socklen_t HAVE_SOCKLEN_T) set(CMAKE_EXTRA_INCLUDE_FILES) @@ -169,7 +169,7 @@ check_function_exists(getrlimit HAVE_GETRLIMIT) check_function_exists(getuid HAVE_GETUID) check_function_exists(gmtime_r HAVE_GMTIME_R) check_function_exists(inet_aton HAVE_INET_ATON) -check_function_exists(inet_ntop HAVE_INET_NTOP) +check_function_exists(inet_pton HAVE_INET_PTON) check_function_exists(jrand48 HAVE_JRAND48) check_function_exists(kqueue HAVE_KQUEUE) check_function_exists(localtime_r HAVE_LOCALTIME_R) @@ -182,7 +182,6 @@ check_function_exists(mempcpy HAVE_MEMPCPY) check_function_exists(memset HAVE_MEMSET) check_function_exists(mkostemp HAVE_MKOSTEMP) check_function_exists(mmap HAVE_MMAP) -check_function_exists(pathconf HAVE_PATHCONF) check_function_exists(pipe2 HAVE_PIPE2) check_function_exists(poll HAVE_POLL) check_function_exists(port_create HAVE_PORT_CREATE) @@ -190,7 +189,6 @@ check_function_exists(pread HAVE_PREAD) check_function_exists(preadv HAVE_PREADV) check_function_exists(pwrite HAVE_PWRITE) check_function_exists(pwritev HAVE_PWRITEV) -check_function_exists(posix_fadvise HAVE_POSIX_FADVISE) check_function_exists(select HAVE_SELECT) check_function_exists(sendfile HAVE_SENDFILE) check_function_exists(send_file HAVE_SEND_FILE) @@ -198,16 +196,11 @@ check_function_exists(sendfile64 HAVE_SENDFILE64) check_function_exists(sendfilev HAVE_SENDFILEV) check_function_exists(sigaction HAVE_SIGACTION) check_function_exists(signal HAVE_SIGNAL) -check_function_exists(sigtimedwait HAVE_SIGTIMEDWAIT) check_function_exists(splice HAVE_SPLICE) check_function_exists(srandom HAVE_SRANDOM) check_function_exists(strerror_r HAVE_STRERROR_R) -check_function_exists(strptime HAVE_STRPTIME) -check_function_exists(syslog HAVE_SYSLOG) check_function_exists(writev HAVE_WRITEV) -check_function_exists(inet_aton HAVE_INET_ATON) check_function_exists(issetugid HAVE_ISSETUGID) -check_function_exists(inet_pton HAVE_INET_PTON) check_function_exists(memset_s HAVE_MEMSET_S) check_function_exists(explicit_bzero HAVE_EXPLICIT_BZERO) check_function_exists(explicit_memset HAVE_EXPLICIT_MEMSET) @@ -390,7 +383,6 @@ if(WITH_WOLFSSL) check_library_exists(${WOLFSSL_LIBRARY} wolfSSL_Init "" HAVE_LIBWOLFSSL) if(HAVE_LIBWOLFSSL) set(CRYPTO_LIBRARY ${WOLFSSL_LIBRARY}) - add_definitions(-DHAVE_WOLFSSL_SSL_H) set(HAVE_WOLFSSL 1) endif() set(CMAKE_REQUIRED_INCLUDES) @@ -408,7 +400,6 @@ if(WITH_MBEDTLS) if(HAVE_MBEDTLS_SSL_H) check_library_exists(mbedcrypto mbedtls_base64_encode "" HAVE_LIBMBEDCRYPTO) if(HAVE_LIBMBEDCRYPTO) - add_definitions(-DHAVE_LIBMBEDCRYPTO) set(CRYPTO_LIBRARY mbedcrypto) check_library_exists(mbedtls mbedtls_cipher_info_from_type "" HAVE_LIBMBEDTLS) if(HAVE_LIBMBEDTLS) @@ -427,7 +418,6 @@ if(WITH_NSS) check_include_files(nss/nss.h HAVE_NSS_NSS_H) check_include_files(nss3/nss.h HAVE_NSS3_NSS_H) if(HAVE_NSS3_NSS_H OR HAVE_NSS_NSS_H) - add_definitions(-DHAVE_NSS_NSS_H) check_library_exists(ssl3 NSSSSL_GetVersion "" HAVE_LIBSSL3) if(HAVE_LIBSSL3) check_library_exists(smime3 NSSSMIME_GetVersion "" HAVE_LIBSMIME3) @@ -457,7 +447,6 @@ if(WITH_NETTLE) set(CMAKE_REQUIRED_INCLUDES) endif() if(HAVE_NETTLE_NETTLE_TYPES_H) - add_definitions(-DHAVE_NETTLE_NETTLE_TYPES_H) check_library_exists(nettle nettle_md5_init "" HAVE_LIBNETTLE) if(HAVE_LIBNETTLE) set(CRYPTO_LIBRARY nettle) @@ -468,9 +457,9 @@ else() endif() if(WITH_GNUTLS) - pkg_check_modules(LIBGNUTLS REQUIRED gnutls) - set(HAVE_LIBGNUTLS 1) - add_definitions(-DHAVE_GNUTLS_CRYPTO_H) + pkg_check_modules(GNUTLS REQUIRED gnutls) + set(HAVE_GNUTLS_CRYPTO_H 1) + set(HAVE_GNUTLS 1) if(NOT WITH_OPENSSL AND NOT WITH_WOLFSSL AND NOT WITH_MBEDTLS AND NOT WITH_NETTLE) set(CRYPTO_LIBRARY gnutls) endif() @@ -605,22 +594,22 @@ if(WITH_XML) check_include_files(libxml/tree.h HAVE_LIBXML_H) set(CMAKE_REQUIRED_FLAGS ${XML2_LDFLAGS}) - check_library_exists(xml2 xmlParseChunk "" HAVE_LIBXML) + check_library_exists(xml2 xmlParseChunk "" HAVE_LIBXML2) set(CMAKE_REQUIRED_FLAGS) else() check_include_files(libxml.h HAVE_LIBXML_H) - check_library_exists(xml2 xmlParseChunk "" HAVE_LIBXML) + check_library_exists(xml2 xmlParseChunk "" HAVE_LIBXML2) endif() if(NOT HAVE_LIBXML_H) message(FATAL_ERROR "libxml/tree.h couldn't be found") endif() - if(NOT HAVE_LIBXML) + if(NOT HAVE_LIBXML2) message(FATAL_ERROR "libxml2 couldn't be found") endif() else() unset(HAVE_LIBXML_H) - unset(HAVE_LIBXML) + unset(HAVE_LIBXML2) endif() if(WITH_SQLITE3) @@ -706,8 +695,8 @@ endif() if(WITH_BROTLI) pkg_check_modules(LIBBROTLI REQUIRED libbrotlienc) + set(HAVE_BROTLI_ENCODE_H 1) set(HAVE_BROTLI 1) - add_definitions(-DHAVE_BROTLI_ENCODE_H -DHAVE_BROTLI) else() unset(HAVE_BROTLI) endif() @@ -735,10 +724,8 @@ endif() if(WITH_LUA) pkg_search_module(LUA REQUIRED lua5.4 lua-5.4 lua5.3 lua-5.3 lua5.2 lua-5.2 lua5.1 lua-5.1 lua) message(STATUS "found lua at: INCDIR: ${LUA_INCLUDE_DIRS} LIBDIR: ${LUA_LIBRARY_DIRS} LDFLAGS: ${LUA_LDFLAGS} CFLAGS: ${LUA_CFLAGS}") - set(HAVE_LIBLUA 1 "Have liblua") set(HAVE_LUA_H 1 "Have liblua header") else() - unset(HAVE_LIBLUA) unset(HAVE_LUA_H) endif() @@ -1174,7 +1161,7 @@ if(HAVE_WOLFSSL) target_link_libraries(mod_wolfssl wolfssl) endif() -if(HAVE_LIBGNUTLS) +if(HAVE_GNUTLS) add_and_install_library(mod_gnutls "mod_gnutls.c") target_link_libraries(mod_gnutls gnutls) endif() |