Subversion Repositories Scribus

Rev

Rev 5466 | Rev 6622 | Go to most recent revision | Details | Compare with Previous | 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
 
5466 cbradney 11
 
5142 cbradney 12
#check for libz using the cmake supplied FindZLIB.cmake
13
if(ZLIB_FOUND)
14
   set(HAVE_LIBZ 1)
15
else(ZLIB_FOUND)
16
   set(HAVE_LIBZ 0)
17
endif(ZLIB_FOUND)
18
 
19
if(JPEG_FOUND)
20
   set(HAVE_LIBJPEG 1)
21
else(JPEG_FOUND)
22
   set(HAVE_LIBJPEG 0)
23
endif(JPEG_FOUND)
24
 
25
#check for png
26
if(PNG_FOUND)
27
   set(HAVE_LIBPNG 1)
28
else(PNG_FOUND)
29
   set(HAVE_LIBPNG 0)
30
endif(PNG_FOUND)
31
 
32
if(BZIP2_FOUND)
33
   set(HAVE_BZIP2_SUPPORT 1)
34
   if(BZIP2_NEED_PREFIX)
35
      set(NEED_BZ2_PREFIX 1)
36
   endif(BZIP2_NEED_PREFIX)
37
else(BZIP2_FOUND)
38
   set(HAVE_BZIP2_SUPPORT 0)
39
endif(BZIP2_FOUND)
40
 
41
if(LIBART_FOUND)
42
   set(HAVE_LIBART 1)
43
else(LIBART_FOUND)
44
   set(HAVE_LIBART 0)
45
endif(LIBART_FOUND)
46
 
47
if(CARBON_FOUND)
48
        set(HAVE_CARBON 1)
49
else(CARBON_FOUND)
50
        set(HAVE_CARBON 0)
51
endif(CARBON_FOUND)
52
 
53
if(OPENSSL_FOUND)
54
   set(HAVE_SSL 1)
55
else(OPENSSL_FOUND)
56
   set(HAVE_SSL 0)
57
endif(OPENSSL_FOUND)
58
 
59
 
60
check_include_files(endian.h HAVE_ENDIAN_H)
61
check_include_files(fcntl.h HAVE_FCNTL_H)
62
check_include_files(dlfcn.h HAVE_DLFCN_H)
63
#check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H)
64
#check_include_files(inttypes.h HAVE_INTTYPES_H)
65
#check_include_files(memory.h HAVE_MEMORY_H)
66
#check_include_files(stdint.h HAVE_STDINT_H)
67
#check_include_files(stdlib.h HAVE_STDLIB_H)
68
#check_include_files(strings.h HAVE_STRINGS_H)
69
#check_include_files(string.h HAVE_STRING_H)
70
#check_include_files(sys/bitypes.h HAVE_SYS_BITYPES_H)
71
#check_include_files(sys/stat.h HAVE_SYS_STAT_H)
72
#check_include_files(sys/types.h HAVE_SYS_TYPES_H)
73
check_include_files(unistd.h HAVE_UNISTD_H)
74
 
75
#check_function_exists(_NSGetEnviron   HAVE_NSGETENVIRON)
76
#check_function_exists(initgroups HAVE_INITGROUPS)
77
#check_function_exists(setenv     HAVE_SETENV)
78
#check_function_exists(strlcat    HAVE_STRLCAT)
79
#check_function_exists(strlcpy    HAVE_STRLCPY)
80
 
81
#check_symbol_exists(res_init        "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT)
82
#check_symbol_exists(snprintf        "stdio.h"                  HAVE_SNPRINTF)
83
#check_symbol_exists(vsnprintf       "stdio.h"                  HAVE_VSNPRINTF)
84
 
85
 
86
#check_prototype_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT_PROTO)
87
#check_prototype_exists(initgroups "unistd.h;sys/types.h;unistd.h;grp.h" HAVE_INITGROUPS_PROTO)
88
#check_prototype_exists(setenv stdlib.h HAVE_SETENV_PROTO)
89
#check_prototype_exists(strlcat string.h HAVE_STRLCAT_PROTO)
90
#check_prototype_exists(strlcpy string.h HAVE_STRLCPY_PROTO)
91
 
92
 
93
#check_type_size("int" SIZEOF_INT)
94
#check_type_size("char *"  SIZEOF_CHAR_P)
95
#check_type_size("long" SIZEOF_LONG)
96
#check_type_size("short" SIZEOF_SHORT)
97
#check_type_size("size_t" SIZEOF_SIZE_T)
98
#check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
99