summaryrefslogtreecommitdiffstats
path: root/Utilities/cmexpat/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-05 18:42:30 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-05 18:42:30 (GMT)
commit94c626808b1a873e83ea3136dda9c62ef855d77b (patch)
treec39307546f7e6b7108f4947046444151ac6d07ac /Utilities/cmexpat/ConfigureChecks.cmake
parent4876463049593de6d1189fae29726b75d7a134ac (diff)
parent318b1c17a96a2e1e93bc8a457e98770e829ea02c (diff)
downloadCMake-94c626808b1a873e83ea3136dda9c62ef855d77b.zip
CMake-94c626808b1a873e83ea3136dda9c62ef855d77b.tar.gz
CMake-94c626808b1a873e83ea3136dda9c62ef855d77b.tar.bz2
Merge branch 'upstream-expat' into update-expat
* upstream-expat: expat 2016-05-01 (379213ca)
Diffstat (limited to 'Utilities/cmexpat/ConfigureChecks.cmake')
-rw-r--r--Utilities/cmexpat/ConfigureChecks.cmake44
1 files changed, 44 insertions, 0 deletions
diff --git a/Utilities/cmexpat/ConfigureChecks.cmake b/Utilities/cmexpat/ConfigureChecks.cmake
new file mode 100644
index 0000000..f03faa6
--- /dev/null
+++ b/Utilities/cmexpat/ConfigureChecks.cmake
@@ -0,0 +1,44 @@
+include(CheckIncludeFile)
+include(CheckIncludeFiles)
+include(CheckFunctionExists)
+include(CheckSymbolExists)
+include(TestBigEndian)
+
+check_include_file("dlfcn.h" HAVE_DLFCN_H)
+check_include_file("fcntl.h" HAVE_FCNTL_H)
+check_include_file("inttypes.h" HAVE_INTTYPES_H)
+check_include_file("memory.h" HAVE_MEMORY_H)
+check_include_file("stdint.h" HAVE_STDINT_H)
+check_include_file("stdlib.h" HAVE_STDLIB_H)
+check_include_file("strings.h" HAVE_STRINGS_H)
+check_include_file("string.h" HAVE_STRING_H)
+check_include_file("sys/stat.h" HAVE_SYS_STAT_H)
+check_include_file("sys/types.h" HAVE_SYS_TYPES_H)
+check_include_file("unistd.h" HAVE_UNISTD_H)
+
+check_function_exists("getpagesize" HAVE_GETPAGESIZE)
+check_function_exists("bcopy" HAVE_BCOPY)
+check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE)
+check_function_exists("mmap" HAVE_MMAP)
+
+#/* Define to 1 if you have the ANSI C header files. */
+check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)
+
+test_big_endian(WORDS_BIGENDIAN)
+#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */
+if(WORDS_BIGENDIAN)
+ set(BYTEORDER 4321)
+else(WORDS_BIGENDIAN)
+ set(BYTEORDER 1234)
+endif(WORDS_BIGENDIAN)
+
+if(HAVE_SYS_TYPES_H)
+ check_symbol_exists("off_t" "sys/types.h" OFF_T)
+ check_symbol_exists("size_t" "sys/types.h" SIZE_T)
+else(HAVE_SYS_TYPES_H)
+ set(OFF_T "long")
+ set(SIZE_T "unsigned")
+endif(HAVE_SYS_TYPES_H)
+
+configure_file(expat_config.h.cmake expat_config.h)
+add_definitions(-DHAVE_EXPAT_CONFIG_H)