1e1ad8c50SMark Nunberg# Writes the 'config.h' header..
2e1ad8c50SMark NunbergINCLUDE(CheckFunctionExists)
3e1ad8c50SMark NunbergINCLUDE(CheckIncludeFiles)
4611b3a1eSMark NunbergINCLUDE(CheckSymbolExists)
5e1ad8c50SMark Nunberg
6e1ad8c50SMark NunbergIF(UNIX)
7e1ad8c50SMark Nunberg    CHECK_FUNCTION_EXISTS(gethrtime HAVE_GETHRTIME)
8e1ad8c50SMark Nunberg    CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY)
9e1ad8c50SMark Nunberg    CHECK_FUNCTION_EXISTS(clock_gettime HAVE_CLOCK_GETTIME)
10e1ad8c50SMark Nunberg    CHECK_FUNCTION_EXISTS(setitimer HAVE_SETITIMER)
11611b3a1eSMark Nunberg    CHECK_SYMBOL_EXISTS(htonll arpa/inet.h HAVE_HTONLL)
12e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(dlfcn.h HAVE_DLFCN_H)
13e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(mach/mach_time.h HAVE_MACH_MACH_TIME_H)
14e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(netdb.h HAVE_NETDB_H)
15e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(stdint.h HAVE_STDINT_H)
16e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(strings.h HAVE_STRINGS_H)
17e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(sys/socket.h HAVE_SYS_SOCKET_H)
18e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(sys/stat.h HAVE_SYS_STAT_H)
19e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(sys/types.h HAVE_SYS_TYPES_H)
20e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(unistd.h HAVE_UNISTD_H)
21e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(sys/uio.h HAVE_SYS_UIO_H)
22e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(fcntl.h HAVE_FCNTL_H)
23e1ad8c50SMark Nunberg    CHECK_INCLUDE_FILES(sys/time.h HAVE_SYS_TIME_H)
24611b3a1eSMark Nunberg    CHECK_INCLUDE_FILES(arpa/inet.h HAVE_ARPA_INET_H)
25e1ad8c50SMark NunbergENDIF()
26e1ad8c50SMark Nunberg
27e1ad8c50SMark NunbergCONFIGURE_FILE(
28e1ad8c50SMark Nunberg    ${CMAKE_SOURCE_DIR}/cmake/config-cmake.h.in
29e70ee32fSMark Nunberg    ${LCB_GENSRCDIR}/config.h)
30