Subversion Repositories Scribus

Rev

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