summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-25 13:03:52 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-25 19:29:20 -0200
commit4d21d6c56a697e0cfaa11cee5a6fb3f16739ddac (patch)
tree7e5d6738578a3b30ad1e5229adb42c342e53bdf8
parenta306cba6c3d581e36fddb4858e27643e07fb0754 (diff)
cmake/common: add missing checks for eina, simplify to one file.
Since the macros were moved to EflMacros.cmake, there is no reason to keep CommonHeaderChecks.cmake anymore, put them all in config/common.cmake Keep the checks sorted so they're easy to organize. Add missing check for prctl() and iconv() (which we were checking iconv.h, but the code used '#if HAVE_ICONV').
-rw-r--r--cmake/config/common.cmake44
-rw-r--r--cmake/helpers/CommonHeaderChecks.cmake36
2 files changed, 42 insertions, 38 deletions
diff --git a/cmake/config/common.cmake b/cmake/config/common.cmake
index b544ec5528..25053f5d2c 100644
--- a/cmake/config/common.cmake
+++ b/cmake/config/common.cmake
@@ -15,8 +15,48 @@ if(NOT EFL_EO_API_SUPPORT)
15endif() 15endif()
16 16
17 17
18#define all our header / function checks 18
19include(./CommonHeaderChecks) 19# BEGIN: HEADER, TYPE and FUNCTION CHECKS
20# KEEP EACH BLOCK SORTED
21
22HEADER_CHECK(asm/hwcap.h)
23HEADER_CHECK(dirent.h)
24HEADER_CHECK(execinfo.h)
25HEADER_CHECK(libunwind.h NAME HAVE_UNWIND)
26HEADER_CHECK(mcheck.h)
27HEADER_CHECK(stdlib.h)
28HEADER_CHECK(sys/auxv.h)
29HEADER_CHECK(sys/mman.h)
30HEADER_CHECK(sys/types.h)
31
32FUNC_CHECK(clock_gettime INCLUDE_FILES time.h)
33FUNC_CHECK(dirfd INCLUDE_FILES dirent.h sys/types.h)
34FUNC_CHECK(dladdr INCLUDE_FILES dlfcn.h LIBRARIES dl DEFINITIONS "-D_GNU_SOURCE=1")
35FUNC_CHECK(dlopen INCLUDE_FILES dlfcn.h LIBRARIES dl)
36FUNC_CHECK(fchmod INCLUDE_FILES sys/stat.h)
37FUNC_CHECK(fcntl INCLUDE_FILES fcntl.h)
38FUNC_CHECK(fpathconf INCLUDE_FILES unistd.h)
39FUNC_CHECK(fstatat NAME HAVE_ATFILE_SOURCE INCLUDE_FILES sys/stat.h)
40FUNC_CHECK(geteuid INCLUDE_FILES unistd.h)
41FUNC_CHECK(getpagesize INCLUDE_FILES unistd.h)
42FUNC_CHECK(getuid INCLUDE_FILES unistd.h)
43FUNC_CHECK(getxattr INCLUDE_FILES sys/types.h sys/xattr.h)
44FUNC_CHECK(iconv INCLUDE_FILES iconv.h)
45FUNC_CHECK(listxattr INCLUDE_FILES sys/types.h sys/xattr.h)
46FUNC_CHECK(mmap INCLUDE_FILES sys/mman.h)
47FUNC_CHECK(mtrace INCLUDE_FILES mcheck.h)
48FUNC_CHECK(prctl INCLUDE_FILES sys/prctl.h)
49FUNC_CHECK(sched_getcpu INCLUDE_FILES sched.h DEFINITIONS "-D_GNU_SOURCE=1")
50FUNC_CHECK(setxattr INCLUDE_FILES sys/types.h sys/xattr.h)
51FUNC_CHECK(shm_open INCLUDE_FILES sys/mman.h sys/stat.h fcntl.h LIBRARIES rt)
52FUNC_CHECK(splice INCLUDE_FILES fcntl.h DEFINITIONS "-D_GNU_SOURCE=1")
53FUNC_CHECK(strerror_r INCLUDE_FILES string.h)
54FUNC_CHECK(strlcpy INCLUDE_FILES bsd/string.h)
55
56TYPE_CHECK(siginfo_t INCLUDE_FILES signal.h)
57
58# END: HEADER, TYPE and FUNCTION CHECKS
59
20 60
21CHECK_APPEND_DEFINE(EFL_BETA_API_SUPPORT 1) 61CHECK_APPEND_DEFINE(EFL_BETA_API_SUPPORT 1)
22if(CMAKE_THREAD_LIBS_INIT) 62if(CMAKE_THREAD_LIBS_INIT)
diff --git a/cmake/helpers/CommonHeaderChecks.cmake b/cmake/helpers/CommonHeaderChecks.cmake
deleted file mode 100644
index 593e0f31b8..0000000000
--- a/cmake/helpers/CommonHeaderChecks.cmake
+++ /dev/null
@@ -1,36 +0,0 @@
1
2FUNC_CHECK(geteuid INCLUDE_FILES unistd.h)
3FUNC_CHECK(getuid INCLUDE_FILES unistd.h)
4FUNC_CHECK(getpagesize INCLUDE_FILES unistd.h)
5FUNC_CHECK(strlcpy INCLUDE_FILES bsd/string.h)
6FUNC_CHECK(mmap INCLUDE_FILES sys/mman.h)
7FUNC_CHECK(fchmod INCLUDE_FILES sys/stat.h)
8FUNC_CHECK(clock_gettime INCLUDE_FILES time.h)
9FUNC_CHECK(fstatat NAME HAVE_ATFILE_SOURCE INCLUDE_FILES sys/stat.h)
10FUNC_CHECK(dirfd INCLUDE_FILES dirent.h sys/types.h)
11FUNC_CHECK(fpathconf INCLUDE_FILES unistd.h)
12FUNC_CHECK(listxattr INCLUDE_FILES sys/types.h sys/xattr.h)
13FUNC_CHECK(setxattr INCLUDE_FILES sys/types.h sys/xattr.h)
14FUNC_CHECK(getxattr INCLUDE_FILES sys/types.h sys/xattr.h)
15FUNC_CHECK(dlopen INCLUDE_FILES dlfcn.h LIBRARIES dl)
16FUNC_CHECK(mtrace INCLUDE_FILES mcheck.h)
17FUNC_CHECK(strerror_r INCLUDE_FILES string.h)
18FUNC_CHECK(shm_open INCLUDE_FILES sys/mman.h sys/stat.h fcntl.h LIBRARIES rt)
19FUNC_CHECK(sched_getcpu INCLUDE_FILES sched.h DEFINITIONS "-D_GNU_SOURCE=1")
20FUNC_CHECK(splice INCLUDE_FILES fcntl.h DEFINITIONS "-D_GNU_SOURCE=1")
21FUNC_CHECK(fcntl INCLUDE_FILES fcntl.h)
22FUNC_CHECK(dladdr INCLUDE_FILES dlfcn.h LIBRARIES dl DEFINITIONS "-D_GNU_SOURCE=1")
23
24TYPE_CHECK(siginfo_t INCLUDE_FILES signal.h)
25
26HEADER_CHECK(stdlib.h)
27HEADER_CHECK(sys/mman.h)
28HEADER_CHECK(dirent.h)
29HEADER_CHECK(iconv.h)
30HEADER_CHECK(sys/auxv.h)
31HEADER_CHECK(asm/hwcap.h)
32HEADER_CHECK(mcheck.h)
33HEADER_CHECK(sys/types.h)
34HEADER_CHECK(execinfo.h)
35HEADER_CHECK(libunwind.h NAME HAVE_UNWIND)
36