summaryrefslogtreecommitdiff
path: root/cmake/helpers/CommonHeaderChecks.cmake
blob: a106c9db4e9d7e5d7f4185d5b6009f177b1c8a1c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36

FUNC_CHECK(geteuid INCLUDE_FILES unistd.h)
FUNC_CHECK(getuid INCLUDE_FILES unistd.h)
FUNC_CHECK(getpagesize INCLUDE_FILES unistd.h)
FUNC_CHECK(strlcpy INCLUDE_FILES bsd/string.h)
FUNC_CHECK(mmap INCLUDE_FILES sys/mman.h)
FUNC_CHECK(fchmod INCLUDE_FILES sys/stat.h)
FUNC_CHECK(clock_gettime INCLUDE_FILES time.h)
FUNC_CHECK(fstatat NAME HAVE_ATFILE_SOURCE INCLUDE_FILES sys/stat.h)
FUNC_CHECK(dirfd INCLUDE_FILES dirent.h sys/types.h)
FUNC_CHECK(fpathconf INCLUDE_FILES unistd.h)
FUNC_CHECK(listxattr INCLUDE_FILES sys/types.h sys/xattr.h)
FUNC_CHECK(setxattr INCLUDE_FILES sys/types.h sys/xattr.h)
FUNC_CHECK(getxattr INCLUDE_FILES sys/types.h;sys/xattr.h)
FUNC_CHECK(dlopen INCLUDE_FILES dlfcn.h LIBRARIES dl)
FUNC_CHECK(mtrace INCLUDE_FILES mcheck.h)
FUNC_CHECK(strerror_r INCLUDE_FILES string.h)
FUNC_CHECK(shm_open INCLUDE_FILES sys/mman.h sys/stat.h fcntl.h LIBRARIES rt)
FUNC_CHECK(sched_getcpu INCLUDE_FILES sched.h DEFINITIONS "-D_GNU_SOURCE=1")
FUNC_CHECK(splice INCLUDE_FILES fcntl.h DEFINITIONS "-D_GNU_SOURCE=1")
FUNC_CHECK(fcntl INCLUDE_FILES fcntl.h)
FUNC_CHECK(dladdr INCLUDE_FILES dlfcn.h LIBRARIES dl DEFINITIONS "-D_GNU_SOURCE=1")

TYPE_CHECK(siginfo_t INCLUDE_FILES signal.h)

HEADER_CHECK(stdlib.h)
HEADER_CHECK(sys/mman.h)
HEADER_CHECK(dirent.h)
HEADER_CHECK(iconv.h)
HEADER_CHECK(sys/auxv.h)
HEADER_CHECK(asm/hwcap.h)
HEADER_CHECK(mcheck.h)
HEADER_CHECK(sys/types.h)
HEADER_CHECK(execinfo.h)
HEADER_CHECK(libunwind.h NAME HAVE_UNWIND)