Subversion Repositories Scribus

Rev

Rev 5466 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5142 cbradney 1
#http://websvn.kde.org/trunk/KDE/kdeaddons/ConfigureChecks.cmake?rev=520160&view=log
2
 
3
include(CheckIncludeFile)
4
include(CheckIncludeFiles)
5
#include(CheckSymbolExists)
6
include(CheckFunctionExists)
7
include(CheckLibraryExists)
8
#include(CheckPrototypeExists)
9
include(CheckTypeSize)
10
 
11
#check for libz using the cmake supplied FindZLIB.cmake
12
if(ZLIB_FOUND)
13
   set(HAVE_LIBZ 1)
14
else(ZLIB_FOUND)
15
   set(HAVE_LIBZ 0)
16
endif(ZLIB_FOUND)
17
 
18
if(JPEG_FOUND)
19
   set(HAVE_LIBJPEG 1)
20
else(JPEG_FOUND)
21
   set(HAVE_LIBJPEG 0)
22
endif(JPEG_FOUND)
23
 
24
#check for png
25
if(PNG_FOUND)
26
   set(HAVE_LIBPNG 1)
27
else(PNG_FOUND)
28
   set(HAVE_LIBPNG 0)
29
endif(PNG_FOUND)
30
 
31
if(BZIP2_FOUND)
32
   set(HAVE_BZIP2_SUPPORT 1)
33
   if(BZIP2_NEED_PREFIX)
34
      set(NEED_BZ2_PREFIX 1)
35
   endif(BZIP2_NEED_PREFIX)
36
else(BZIP2_FOUND)
37
   set(HAVE_BZIP2_SUPPORT 0)
38
endif(BZIP2_FOUND)
39
 
40
if(LIBART_FOUND)
41
   set(HAVE_LIBART 1)
42
else(LIBART_FOUND)
43
   set(HAVE_LIBART 0)
44
endif(LIBART_FOUND)
45
 
46
if(CARBON_FOUND)
47
        set(HAVE_CARBON 1)
48
else(CARBON_FOUND)
49
        set(HAVE_CARBON 0)
50
endif(CARBON_FOUND)
51
 
52
if(OPENSSL_FOUND)
53
   set(HAVE_SSL 1)
54
else(OPENSSL_FOUND)
55
   set(HAVE_SSL 0)
56
endif(OPENSSL_FOUND)
57
 
58
 
59
check_include_files(endian.h HAVE_ENDIAN_H)
60
check_include_files(fcntl.h HAVE_FCNTL_H)
61
check_include_files(dlfcn.h HAVE_DLFCN_H)
62
#check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H)
63
#check_include_files(inttypes.h HAVE_INTTYPES_H)
64
#check_include_files(memory.h HAVE_MEMORY_H)
65
#check_include_files(stdint.h HAVE_STDINT_H)
66
#check_include_files(stdlib.h HAVE_STDLIB_H)
67
#check_include_files(strings.h HAVE_STRINGS_H)
68
#check_include_files(string.h HAVE_STRING_H)
69
#check_include_files(sys/bitypes.h HAVE_SYS_BITYPES_H)
70
#check_include_files(sys/stat.h HAVE_SYS_STAT_H)
71
#check_include_files(sys/types.h HAVE_SYS_TYPES_H)
72
check_include_files(unistd.h HAVE_UNISTD_H)
73
 
74
#check_function_exists(_NSGetEnviron   HAVE_NSGETENVIRON)
75
#check_function_exists(initgroups HAVE_INITGROUPS)
76
#check_function_exists(setenv     HAVE_SETENV)
77
#check_function_exists(strlcat    HAVE_STRLCAT)
78
#check_function_exists(strlcpy    HAVE_STRLCPY)
79
 
80
#check_symbol_exists(res_init        "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT)
81
#check_symbol_exists(snprintf        "stdio.h"                  HAVE_SNPRINTF)
82
#check_symbol_exists(vsnprintf       "stdio.h"                  HAVE_VSNPRINTF)
83
 
84
 
85
#check_prototype_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT_PROTO)
86
#check_prototype_exists(initgroups "unistd.h;sys/types.h;unistd.h;grp.h" HAVE_INITGROUPS_PROTO)
87
#check_prototype_exists(setenv stdlib.h HAVE_SETENV_PROTO)
88
#check_prototype_exists(strlcat string.h HAVE_STRLCAT_PROTO)
89
#check_prototype_exists(strlcpy string.h HAVE_STRLCPY_PROTO)
90
 
91
 
92
#check_type_size("int" SIZEOF_INT)
93
#check_type_size("char *"  SIZEOF_CHAR_P)
94
#check_type_size("long" SIZEOF_LONG)
95
#check_type_size("short" SIZEOF_SHORT)
96
#check_type_size("size_t" SIZEOF_SIZE_T)
97
#check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
98