include(CheckCompiles)
include(CheckType)
include(CheckStdatomic)
+include(TestBigEndian)
+include(CheckByteswap)
# configuration
check_stdatomic()
check_dependency(LIBEVENT event event.h)
check_decl(getline stdio.h)
+ if(LIBEVENT AND HAVE_C_STDATOMIC)
+ set(HAVE_MEMASLAP 1)
+ endif()
endif()
## dtrace
## uuid
if(BUILD_TESTING)
+ if(NOT MEMCACHED_BINARY)
+ find_package(Memcached)
+ set(MEMCACHED_BINARY ${MEMCACHED_EXECUTABLE})
+ endif()
check_dependency(LIBUUID uuid uuid/uuid.h)
endif()
# system checks
-include(TestBigEndian)
test_big_endian(WORDS_BIGENDIAN)
+check_byteswap()
check_header(alloca.h)
check_header(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)