1include(CheckIncludeFile) 2include(CheckIncludeFiles) 3include(CheckFunctionExists) 4include(CheckSymbolExists) 5include(TestBigEndian) 6 7check_include_file("dlfcn.h" HAVE_DLFCN_H) 8check_include_file("fcntl.h" HAVE_FCNTL_H) 9check_include_file("inttypes.h" HAVE_INTTYPES_H) 10check_include_file("memory.h" HAVE_MEMORY_H) 11check_include_file("stdint.h" HAVE_STDINT_H) 12check_include_file("stdlib.h" HAVE_STDLIB_H) 13check_include_file("strings.h" HAVE_STRINGS_H) 14check_include_file("string.h" HAVE_STRING_H) 15check_include_file("sys/stat.h" HAVE_SYS_STAT_H) 16check_include_file("sys/types.h" HAVE_SYS_TYPES_H) 17check_include_file("unistd.h" HAVE_UNISTD_H) 18 19check_function_exists("getpagesize" HAVE_GETPAGESIZE) 20check_function_exists("bcopy" HAVE_BCOPY) 21check_symbol_exists("memmove" "string.h" HAVE_MEMMOVE) 22check_function_exists("mmap" HAVE_MMAP) 23 24#/* Define to 1 if you have the ANSI C header files. */ 25check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) 26 27test_big_endian(WORDS_BIGENDIAN) 28#/* 1234 = LIL_ENDIAN, 4321 = BIGENDIAN */ 29if(WORDS_BIGENDIAN) 30 set(BYTEORDER 4321) 31else(WORDS_BIGENDIAN) 32 set(BYTEORDER 1234) 33endif(WORDS_BIGENDIAN) 34 35if(HAVE_SYS_TYPES_H) 36 check_symbol_exists("off_t" "sys/types.h" OFF_T) 37 check_symbol_exists("size_t" "sys/types.h" SIZE_T) 38else(HAVE_SYS_TYPES_H) 39 set(OFF_T "long") 40 set(SIZE_T "unsigned") 41endif(HAVE_SYS_TYPES_H) 42 43configure_file(expat_config.h.cmake expat_config.h) 44add_definitions(-DHAVE_EXPAT_CONFIG_H) 45