1# Writes the 'config.h' header..
2INCLUDE(CheckFunctionExists)
3INCLUDE(CheckIncludeFiles)
4INCLUDE(CheckSymbolExists)
5
6IF(UNIX)
7    CHECK_FUNCTION_EXISTS(gethrtime HAVE_GETHRTIME)
8    CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
9    CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME)
10    CHECK_FUNCTION_EXISTS(setitimer HAVE_SETITIMER)
11    CHECK_SYMBOL_EXISTS(htonll arpa/inet.h HAVE_HTONLL)
12    CHECK_SYMBOL_EXISTS(res_search "netinet/in.h;resolv.h" HAVE_RES_SEARCH)
13    CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
14    CHECK_INCLUDE_FILES(netdb.h HAVE_NETDB_H)
15    CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
16    CHECK_INCLUDE_FILES(stddef.h HAVE_STDDEF_H)
17    CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
18    CHECK_INCLUDE_FILES(sys/socket.h HAVE_SYS_SOCKET_H)
19    CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
20    CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
21    CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
22    CHECK_INCLUDE_FILES(sys/uio.h HAVE_SYS_UIO_H)
23    CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)
24    CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
25    CHECK_INCLUDE_FILES(arpa/inet.h HAVE_ARPA_INET_H)
26    CHECK_INCLUDE_FILES(inttypes.h HAVE_INTTYPES_H)
27    CHECK_INCLUDE_FILES(arpa/nameser.h HAVE_ARPA_NAMESER_H)
28ENDIF()
29
30CONFIGURE_FILE(
31    ${PROJECT_SOURCE_DIR}/cmake/config-cmake.h.in
32    ${LCB_GENSRCDIR}/config.h)
33