|
|
|
@ -146,16 +146,19 @@ ENDIF() |
|
|
|
|
|
|
|
|
|
CARES_FUNCTION_IN_LIBRARY (gethostbyname nsl HAVE_LIBNSL) |
|
|
|
|
CARES_FUNCTION_IN_LIBRARY (gethostbyname socket HAVE_GHBN_LIBSOCKET) |
|
|
|
|
CARES_FUNCTION_IN_LIBRARY (gethostbyname network HAVE_LIBNETWORK) |
|
|
|
|
CARES_FUNCTION_IN_LIBRARY (socket socket HAVE_SOCKET_LIBSOCKET) |
|
|
|
|
IF (HAVE_GHBN_LIBSOCKET OR HAVE_SOCKET_LIBSOCKET) |
|
|
|
|
SET(HAVE_LIBSOCKET TRUE) |
|
|
|
|
ENDIF () |
|
|
|
|
CARES_FUNCTION_IN_LIBRARY (socket network HAVE_LIBNETWORK) |
|
|
|
|
CARES_FUNCTION_IN_LIBRARY (clock_gettime rt HAVE_LIBRT) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Look for necessary includes |
|
|
|
|
CHECK_INCLUDE_FILES (sys/types.h HAVE_SYS_TYPES_H) |
|
|
|
|
CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H) |
|
|
|
|
CHECK_INCLUDE_FILES (sys/sockio.h HAVE_SYS_SOCKIO_H) |
|
|
|
|
CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H) |
|
|
|
|
CHECK_INCLUDE_FILES (arpa/nameser_compat.h HAVE_ARPA_NAMESER_COMPAT_H) |
|
|
|
|
CHECK_INCLUDE_FILES (arpa/nameser.h HAVE_ARPA_NAMESER_H) |
|
|
|
@ -232,6 +235,9 @@ ENDIF () |
|
|
|
|
IF (HAVE_LIBSOCKET) |
|
|
|
|
LIST (APPEND CARES_DEPENDENT_LIBS socket) |
|
|
|
|
ENDIF () |
|
|
|
|
IF (HAVE_LIBNETWORK) |
|
|
|
|
LIST (APPEND CARES_DEPENDENT_LIBS network) |
|
|
|
|
ENDIF () |
|
|
|
|
IF (HAVE_LIBRT) |
|
|
|
|
LIST (APPEND CARES_DEPENDENT_LIBS rt) |
|
|
|
|
ENDIF () |
|
|
|
@ -270,6 +276,7 @@ CARES_EXTRAINCLUDE_IFSET (HAVE_STRINGS_H strings.h) |
|
|
|
|
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_IOCTL_H sys/ioctl.h) |
|
|
|
|
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_SELECT_H sys/select.h) |
|
|
|
|
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_SOCKET_H sys/socket.h) |
|
|
|
|
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_SOCKIO_H sys/sockio.h) |
|
|
|
|
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_TIME_H sys/time.h) |
|
|
|
|
CARES_EXTRAINCLUDE_IFSET (HAVE_SYS_UIO_H sys/uio.h) |
|
|
|
|
CARES_EXTRAINCLUDE_IFSET (HAVE_TIME_H time.h) |
|
|
|
@ -523,7 +530,8 @@ IF (HAVE_GETSERVBYPORT_R) |
|
|
|
|
IF (CMAKE_SYSTEM_NAME STREQUAL "SunOS") |
|
|
|
|
SET (GETSERVBYPORT_R_ARGS 5) |
|
|
|
|
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "AIX" OR |
|
|
|
|
CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") |
|
|
|
|
CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
|
|
|
|
HAIKU) |
|
|
|
|
SET (GETSERVBYPORT_R_ARGS 4) |
|
|
|
|
ELSE () |
|
|
|
|
# Probably linux |
|
|
|
@ -536,7 +544,8 @@ IF (HAVE_GETSERVBYNAME_R) |
|
|
|
|
IF (CMAKE_SYSTEM_NAME STREQUAL "SunOS") |
|
|
|
|
SET (GETSERVBYNAME_R_ARGS 5) |
|
|
|
|
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "AIX" OR |
|
|
|
|
CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") |
|
|
|
|
CMAKE_SYSTEM_NAME STREQUAL "OpenBSD" OR |
|
|
|
|
HAIKU) |
|
|
|
|
SET (GETSERVBYNAME_R_ARGS 4) |
|
|
|
|
ELSE () |
|
|
|
|
# Probably linux |
|
|
|
|