]> gerrit.simantics Code Review - simantics/fmil.git/blobdiff - org.simantics.fmil.core/native/FMILibrary/ThirdParty/Expat/expat-2.1.0/ConfigureChecks.cmake
Add FMILibrary-2.0.3 to org.simantics.fmil.core\native.
[simantics/fmil.git] / org.simantics.fmil.core / native / FMILibrary / ThirdParty / Expat / expat-2.1.0 / ConfigureChecks.cmake
diff --git a/org.simantics.fmil.core/native/FMILibrary/ThirdParty/Expat/expat-2.1.0/ConfigureChecks.cmake b/org.simantics.fmil.core/native/FMILibrary/ThirdParty/Expat/expat-2.1.0/ConfigureChecks.cmake
new file mode 100644 (file)
index 0000000..5cdf01e
--- /dev/null
@@ -0,0 +1,44 @@
+include(CheckIncludeFile)\r
+include(CheckIncludeFiles)\r
+include(CheckFunctionExists)\r
+include(CheckSymbolExists)\r
+include(TestBigEndian)\r
+\r
+check_include_file("dlfcn.h" HAVE_DLFCN_H)\r
+check_include_file("fcntl.h" HAVE_FCNTL_H)\r
+check_include_file("inttypes.h" HAVE_INTTYPES_H)\r
+check_include_file("memory.h" HAVE_MEMORY_H)\r
+check_include_file("stdint.h" HAVE_STDINT_H)\r
+check_include_file("stdlib.h" HAVE_STDLIB_H)\r
+check_include_file("strings.h" HAVE_STRINGS_H)\r
+check_include_file("string.h" HAVE_STRING_H)\r
+check_include_file("sys/stat.h" HAVE_SYS_STAT_H)\r
+check_include_file("sys/types.h" HAVE_SYS_TYPES_H)\r
+check_include_file("unistd.h" HAVE_UNISTD_H)\r
+\r
+check_function_exists("getpagesize" HAVE_GETPAGESIZE)\r
+check_function_exists("bcopy" HAVE_BCOPY)\r
+check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE)\r
+check_function_exists("mmap" HAVE_MMAP)\r
+\r
+#/* Define to 1 if you have the ANSI C header files. */\r
+check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS)\r
+\r
+test_big_endian(WORDS_BIGENDIAN)\r
+#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */\r
+if(WORDS_BIGENDIAN)\r
+    set(BYTEORDER 4321)\r
+else(WORDS_BIGENDIAN)\r
+    set(BYTEORDER 1234)\r
+endif(WORDS_BIGENDIAN)\r
+\r
+if(HAVE_SYS_TYPES_H)\r
+    check_symbol_exists("off_t" "sys/types.h" OFF_T)\r
+    check_symbol_exists("size_t" "sys/types.h" SIZE_T)\r
+else(HAVE_SYS_TYPES_H)\r
+    set(OFF_T "long")\r
+    set(SIZE_T "unsigned")\r
+endif(HAVE_SYS_TYPES_H)\r
+\r
+configure_file(expat_config.h.cmake expat_config.h)\r
+add_definitions(-DHAVE_EXPAT_CONFIG_H)\r