X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=CMake%2F_Include.cmake;h=579d85324ee464d255474ebb4be00032f02ddda0;hb=30c51379a982cb3e7682a90cdb2469c5e72a6045;hp=7067ef46fc4cea2ab5a5b6ed57c0316aba713fd3;hpb=14b09f54a63ae08dda87f469d10539885d566f15;p=awesomized%2Flibmemcached diff --git a/CMake/_Include.cmake b/CMake/_Include.cmake index 7067ef46..579d8532 100644 --- a/CMake/_Include.cmake +++ b/CMake/_Include.cmake @@ -26,6 +26,8 @@ include(CheckHeader) include(CheckCompiles) include(CheckType) include(CheckStdatomic) +include(TestBigEndian) +include(CheckByteswap) # configuration @@ -37,6 +39,9 @@ if(ENABLE_MEMASLAP) check_stdatomic() check_dependency(LIBEVENT event event.h) check_decl(getline stdio.h) + if(HAVE_LIBEVENT AND HAVE_C_STDATOMIC) + set(HAVE_MEMASLAP 1) + endif() endif() ## dtrace @@ -52,13 +57,16 @@ endif() ## uuid if(BUILD_TESTING) - check_dependency(LIBUUID uuid uuid/uuid.h) + if(NOT MEMCACHED_BINARY) + find_package(Memcached) + set(MEMCACHED_BINARY ${MEMCACHED_EXECUTABLE}) + endif() endif() ## sasl if(ENABLE_SASL) check_dependency(LIBSASL sasl2 sasl/sasl.h) - if(LIBSASL) + if(HAVE_LIBSASL) set(LIBMEMCACHED_WITH_SASL_SUPPORT 1) endif() endif() @@ -76,8 +84,8 @@ endif() # system checks -include(TestBigEndian) test_big_endian(WORDS_BIGENDIAN) +check_byteswap() check_header(alloca.h) check_header(arpa/inet.h) @@ -107,11 +115,12 @@ check_decl(htonll arpa/inet.h) check_decl(MSG_DONTWAIT sys/socket.h) check_decl(MSG_MORE sys/socket.h) check_decl(MSG_NOSIGNAL sys/socket.h) -check_decl(rcvtimeo sys/socket.h) -check_decl(sndtimeo sys/socket.h) +check_decl(SO_RCVTIMEO sys/socket.h) +check_decl(SO_SNDTIMEO sys/socket.h) check_decl(setenv stdlib.h) check_decl(strerror string.h) check_decl(strerror_r string.h) + check_compiles(HAVE_STRERROR_R_CHAR_P "char x, y = *strerror_r(0,&x,1);" string.h) check_decl(abi::__cxa_demangle cxxabi.h) @@ -119,6 +128,11 @@ check_decl(abi::__cxa_demangle cxxabi.h) find_package(Backtrace) if(Backtrace_FOUND) set(HAVE_BACKTRACE 1) + set(BACKTRACE BACKTRACE) + add_library(BACKTRACE INTERFACE IMPORTED) + set_target_properties(BACKTRACE PROPERTIES + INTERFACE_LINK_LIBRARIES "${Backtrace_LIBRARIES}" + INTERFACE_INCLUDE_DIRECTORIES "${Backtrace_INCLUDE_DIR}") endif() check_type(in_port_t netinet/in.h)