fixed manual (thanks to D.Carlisle and R.Kotucha)
[luatex.git] / source / libs / poppler / poppler-0.33.0 / ConfigureChecks.cmake
blobd3f573257202765775f762da2c53d72be290206c
1 # Copyright 2008 Pino Toscano, <pino@kde.org>
3 # Redistribution and use is allowed according to the terms of the BSD license.
4 # For details see the accompanying COPYING-CMAKE-SCRIPTS file.
6 include(CheckIncludeFile)
7 include(CheckIncludeFiles)
8 include(CheckSymbolExists)
9 include(CheckFunctionExists)
10 include(CheckLibraryExists)
11 include(CheckTypeSize)
12 include(CheckCSourceCompiles)
14 check_include_files(dlfcn.h HAVE_DLFCN_H)
15 check_include_files(fcntl.h HAVE_FCNTL_H)
16 check_include_files(inttypes.h HAVE_INTTYPES_H)
17 check_include_files(memory.h HAVE_MEMORY_H)
18 check_include_files(stdint.h HAVE_STDINT_H)
19 check_include_files(stdlib.h HAVE_STDLIB_H)
20 check_include_files(strings.h HAVE_STRINGS_H)
21 check_include_files(string.h HAVE_STRING_H)
22 check_include_files(sys/mman.h HAVE_SYS_MMAN_H)
23 check_include_files(sys/stat.h HAVE_SYS_STAT_H)
24 check_include_files(sys/types.h HAVE_SYS_TYPES_H)
25 check_include_files(unistd.h HAVE_UNISTD_H)
27 check_function_exists(fseek64 HAVE_FSEEK64)
28 check_function_exists(fseeko HAVE_FSEEKO)
29 check_function_exists(ftell64 HAVE_FTELL64)
30 check_function_exists(pread64 HAVE_PREAD64)
31 check_function_exists(lseek64 HAVE_LSEEK64)
32 check_function_exists(gmtime_r HAVE_GMTIME_R)
33 check_function_exists(gettimeofday HAVE_GETTIMEOFDAY)
34 check_function_exists(localtime_r HAVE_LOCALTIME_R)
35 check_function_exists(popen HAVE_POPEN)
36 check_function_exists(mkstemp HAVE_MKSTEMP)
37 check_function_exists(mkstemps HAVE_MKSTEMPS)
38 check_function_exists(rand_r HAVE_RAND_R)
39 check_function_exists(strcpy_s HAVE_STRCPY_S)
40 check_function_exists(strcat_s HAVE_STRCAT_S)
42 macro(CHECK_FOR_DIR include var)
43   check_c_source_compiles(
44     "#include <${include}>
46 int main(int argc, char *argv[])
48   DIR* d = 0;
49   return 0;
51 " ${var})
52 endmacro(CHECK_FOR_DIR)
53 check_for_dir("dirent.h" HAVE_DIRENT_H)
54 check_for_dir("ndir.h" HAVE_NDIR_H)
55 check_for_dir("sys/dir.h" HAVE_SYS_DIR_H)
56 check_for_dir("sys/ndir.h" HAVE_SYS_NDIR_H)
58 check_function_exists("nanosleep" HAVE_NANOSLEEP)
59 if(NOT HAVE_NANOSLEEP)
60   check_library_exists("rt" "nanosleep" "" LIB_RT_HAS_NANOSLEEP)
61 endif(NOT HAVE_NANOSLEEP)