zeromq/libzmq
CMakeLists.txt
:443
check_cxx_symbol_exists(select sys/select.h HAVE_SELECT)
check_cxx_symbol_exists(select sys/select.h HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists(select "winsock2.h;ws2tcpip.h" HAVE_SELECT)
check_symbol_exists(poll "winsock2.h;ws2tcpip.h" HAVE_SELECT)
check_function_exists(select HAVE_SELECT)
check_c_source_compiles("
#include <stdio.h>
#include <sys/select.h>
int main() {
fd_set rfds;
struct timeval tv;
return select(1, &rfds, NULL, NULL, &tv);
}" HAVE_SELECT)
CHECK_C_SOURCE_COMPILES("
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#endif
int main()
{
select(0,0,0,0,0);
return 0;
}"
HAVE_SELECT)
list(APPEND RE_DEFINITIONS
HAVE_ATOMIC
HAVE_SELECT
)
check_c_source_compiles("
#include <stdio.h>
#include <sys/select.h>
int main() {
fd_set rfds;
struct timeval tv;
return select(1, &rfds, NULL, NULL, &tv);
}" HAVE_SELECT)
CHECK_C_SOURCE_COMPILES("
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#endif
int main()
{
select(0,0,0,0,0);
return 0;
}"
HAVE_SELECT)
check_function_exists(select HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
check_symbol_exists(select "sys/select.h" HAVE_SELECT)
check_function_exists(select HAVE_SELECT)
check_function_exists(select HAVE_SELECT)
check_function_exists(select HAVE_SELECT)
check_symbol_exists("select" "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists("select" "${CURL_INCLUDES}" HAVE_SELECT)
CHECK_C_SOURCE_COMPILES("
#ifdef _WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#endif
int main()
{
select(0,0,0,0,0);
return 0;
}"
HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
CHECK_FUNCTION_EXISTS(select HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_function_exists(select HAVE_SELECT)
add_definitions(-DHAVE_SELECT)
add_definitions(-DHAVE_SELECT)
check_cxx_symbol_exists(select sys/select.h HAVE_SELECT)
check_symbol_exists(select sys/select.h HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_c_source_compiles("
#include <sys/types.h>
#include <sys/time.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
int
main(int argc, char *argv[])
{
struct timeval tv;
int rv;
tv.tv_sec = 1;
tv.tv_usec = 1;
rv = select(0, NULL, NULL, NULL, &tv);
return (rv == -1 && errno != EINTR);
}
" HAVE_SELECT)
check_function_exists ( select HAVE_SELECT )
check_function_exists(select HAVE_SELECT)
check_function_exists(select HAVE_SELECT)
CHECK_CXX_SOURCE_COMPILES("#include <sys/select.h>
int main() {select(0,0,0,0,0); return 1;}" HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
target_compile_definitions(
tinydtls
PRIVATE HAVE_ARPA_INET_H
HAVE_ASSERT_H
HAVE_FCNTL_H
HAVE_GETRANDOM
HAVE_INTTYPES_H
HAVE_MEMSET
HAVE_NETDB_H
HAVE_NETINET_IN_H
HAVE_RANDOM
HAVE_SELECT
HAVE_SOCKET
HAVE_STDDEF_H
HAVE_STDINT_H
HAVE_STDLIB_H
HAVE_STRDUP
HAVE_STRERROR
HAVE_STRINGS_H
HAVE_STRING_H
HAVE_STRNLEN
HAVE_SYS_SOCKET_H
HAVE_SYS_STAT_H
HAVE_SYS_TIME_H
HAVE_SYS_TYPES_H
HAVE_TIME_H
HAVE_UNISTD_H
HAVE_VPRINTF
HAVE_SNPRINTF)
check_symbol_exists("select" "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists("select" "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists(select "${CURL_INCLUDES}" HAVE_SELECT)
check_symbol_exists("select" "${CURL_INCLUDES}" HAVE_SELECT)