diff options
author | 2020-10-15 04:28:42 +1100 | |
---|---|---|
committer | 2020-10-15 04:28:42 +1100 | |
commit | d256f069a5aa30bf5ffcfc4b73047ce0f372ea10 (patch) | |
tree | 8df1bd2e70d7e15e59928203d0eb687c82307bff /3rdparty/expat/ConfigureChecks.cmake | |
parent | 13850f3011e000307925aefd918efe2f0ce6649d (diff) |
-3rdparty/expat: Update to 2.2.10."
-Fixed tiny build (missing s11c_bg_device) and unused lambda capture in emu/rendlay.cpp.
Diffstat (limited to '3rdparty/expat/ConfigureChecks.cmake')
-rw-r--r-- | 3rdparty/expat/ConfigureChecks.cmake | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/3rdparty/expat/ConfigureChecks.cmake b/3rdparty/expat/ConfigureChecks.cmake index f03faa637d0..d85e48c972d 100644 --- a/3rdparty/expat/ConfigureChecks.cmake +++ b/3rdparty/expat/ConfigureChecks.cmake @@ -1,6 +1,7 @@ +include(CheckCCompilerFlag) +include(CheckCSourceCompiles) include(CheckIncludeFile) include(CheckIncludeFiles) -include(CheckFunctionExists) include(CheckSymbolExists) include(TestBigEndian) @@ -16,10 +17,21 @@ 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) +check_symbol_exists("getpagesize" "unistd.h" HAVE_GETPAGESIZE) +check_symbol_exists("mmap" "sys/mman.h" HAVE_MMAP) +check_symbol_exists("getrandom" "sys/random.h" HAVE_GETRANDOM) + +if(EXPAT_WITH_LIBBSD) + set(CMAKE_REQUIRED_LIBRARIES "${LIB_BSD}") + set(_bsd "bsd/") +else() + set(_bsd "") +endif() +check_symbol_exists("arc4random_buf" "${_bsd}stdlib.h" HAVE_ARC4RANDOM_BUF) +if(NOT HAVE_ARC4RANDOM_BUF) + check_symbol_exists("arc4random" "${_bsd}stdlib.h" HAVE_ARC4RANDOM) +endif() +set(CMAKE_REQUIRED_LIBRARIES) #/* Define to 1 if you have the ANSI C header files. */ check_include_files("stdlib.h;stdarg.h;string.h;float.h" STDC_HEADERS) @@ -40,5 +52,15 @@ else(HAVE_SYS_TYPES_H) set(SIZE_T "unsigned") endif(HAVE_SYS_TYPES_H) -configure_file(expat_config.h.cmake expat_config.h) -add_definitions(-DHAVE_EXPAT_CONFIG_H) +check_c_source_compiles(" + #include <stdlib.h> /* for NULL */ + #include <unistd.h> /* for syscall */ + #include <sys/syscall.h> /* for SYS_getrandom */ + int main() { + syscall(SYS_getrandom, NULL, 0, 0); + return 0; + }" + HAVE_SYSCALL_GETRANDOM) + +check_c_compiler_flag("-fno-strict-aliasing" FLAG_NO_STRICT_ALIASING) +check_c_compiler_flag("-fvisibility=hidden" FLAG_VISIBILITY) |