summaryrefslogtreecommitdiff
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorLorry <lorry@roadtrain.codethink.co.uk>2012-07-18 20:41:42 +0100
committerLorry <lorry@roadtrain.codethink.co.uk>2012-07-18 20:41:42 +0100
commit5bb10cf303762530d847b2d9879e6b0fdf32603f (patch)
tree028b559e572d030bf98c541306819c4248985576 /ConfigureChecks.cmake
downloadlibical-5bb10cf303762530d847b2d9879e6b0fdf32603f.tar.gz
Tarball conversion
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake39
1 files changed, 39 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
new file mode 100644
index 0000000..1333f6c
--- /dev/null
+++ b/ConfigureChecks.cmake
@@ -0,0 +1,39 @@
+include(CheckIncludeFiles)
+check_include_files(assert.h HAVE_ASSERT_H)
+check_include_files(byteswap.h HAVE_BYTESWAP_H)
+check_include_files(ctype.h HAVE_CTYPE_H)
+check_include_files(dlfcn.h HAVE_DLFCN_H)
+check_include_files(endian.h HAVE_ENDIAN_H)
+check_include_files(inttypes.h HAVE_INTTYPES_H)
+check_include_files(memory.h HAVE_MEMORY_H)
+check_include_files(pthread.h HAVE_PTHREAD_H)
+check_include_files(stdint.h HAVE_STDINT_H)
+check_include_files(stdlib.h HAVE_STDLIB_H)
+check_include_files(strings.h HAVE_STRINGS_H)
+check_include_files(string.h HAVE_STRING_H)
+check_include_files(sys/endian.h HAVE_SYS_ENDIAN_H)
+check_include_files(sys/stat.h HAVE_SYS_STAT_H)
+check_include_files(sys/types.h HAVE_SYS_TYPES_H)
+check_include_files(time.h HAVE_TIME_H)
+check_include_files(unistd.h HAVE_UNISTD_H)
+check_include_files(wctype.h HAVE_WCTYPE_H)
+
+
+include(CheckFunctionExists)
+check_function_exists(backtrace HAVE_BACKTRACE)
+check_function_exists(gmtime_r HAVE_GMTIME_R)
+check_function_exists(isspace HAVE_ISSPACE)
+check_function_exists(iswspace HAVE_ISWSPACE)
+check_function_exists(snprintf HAVE_SNPRINTF)
+check_function_exists(strdup HAVE_STRDUP)
+check_function_exists(unsetenv HAVE_UNSETENV)
+
+include(CheckTypeSize)
+check_type_size(mode_t SIZEOF_MODE_T)
+check_type_size(size_t SIZEOF_SIZE_T)
+check_type_size(intptr_t INTPTR_T) # please do not rename HAVE_INTPTR_T will automatically be defined
+
+include(FindThreads)
+check_library_exists(pthread pthread_attr_get_np "" HAVE_PTHREAD_ATTR_GET_NP)
+check_library_exists(pthread pthread_getattr_np "" HAVE_PTHREAD_GETATTR_NP)
+check_include_files("pthread.h;pthread_np.h" HAVE_PTHREAD_NP_H)