Subversion Repositories Scribus

Rev

Rev 9753 | 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
 
13947 cbradney 32
#check for OSG
33
#if(OSG_FOUND)
34
#   set(HAVE_OSG 1)
35
#else(OSG_FOUND)
36
#   set(HAVE_OSG 0)
37
#endif(OSG_FOUND)
38
 
5142 cbradney 39
if(BZIP2_FOUND)
40
   set(HAVE_BZIP2_SUPPORT 1)
41
   if(BZIP2_NEED_PREFIX)
42
      set(NEED_BZ2_PREFIX 1)
43
   endif(BZIP2_NEED_PREFIX)
44
else(BZIP2_FOUND)
45
   set(HAVE_BZIP2_SUPPORT 0)
46
endif(BZIP2_FOUND)
47
 
9753 fschmid 48
if(CAIRO_FOUND)
49
   set(HAVE_LIBART 0)
50
   set(HAVE_CAIRO 1)
51
else(CAIRO_FOUND)
5142 cbradney 52
   set(HAVE_LIBART 1)
6622 cbradney 53
   set(HAVE_CAIRO 0)
9753 fschmid 54
endif(CAIRO_FOUND)
5142 cbradney 55
 
56
if(CARBON_FOUND)
57
        set(HAVE_CARBON 1)
58
else(CARBON_FOUND)
59
        set(HAVE_CARBON 0)
60
endif(CARBON_FOUND)
61
 
62
if(OPENSSL_FOUND)
63
   set(HAVE_SSL 1)
64
else(OPENSSL_FOUND)
65
   set(HAVE_SSL 0)
66
endif(OPENSSL_FOUND)
67
 
68
 
69
check_include_files(endian.h HAVE_ENDIAN_H)
70
check_include_files(fcntl.h HAVE_FCNTL_H)
71
check_include_files(dlfcn.h HAVE_DLFCN_H)
72
#check_include_files(crt_externs.h HAVE_CRT_EXTERNS_H)
73
#check_include_files(inttypes.h HAVE_INTTYPES_H)
74
#check_include_files(memory.h HAVE_MEMORY_H)
75
#check_include_files(stdint.h HAVE_STDINT_H)
76
#check_include_files(stdlib.h HAVE_STDLIB_H)
77
#check_include_files(strings.h HAVE_STRINGS_H)
78
#check_include_files(string.h HAVE_STRING_H)
79
#check_include_files(sys/bitypes.h HAVE_SYS_BITYPES_H)
80
#check_include_files(sys/stat.h HAVE_SYS_STAT_H)
81
#check_include_files(sys/types.h HAVE_SYS_TYPES_H)
82
check_include_files(unistd.h HAVE_UNISTD_H)
83
 
84
#check_function_exists(_NSGetEnviron   HAVE_NSGETENVIRON)
85
#check_function_exists(initgroups HAVE_INITGROUPS)
86
#check_function_exists(setenv     HAVE_SETENV)
87
#check_function_exists(strlcat    HAVE_STRLCAT)
88
#check_function_exists(strlcpy    HAVE_STRLCPY)
89
 
90
#check_symbol_exists(res_init        "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT)
91
#check_symbol_exists(snprintf        "stdio.h"                  HAVE_SNPRINTF)
92
#check_symbol_exists(vsnprintf       "stdio.h"                  HAVE_VSNPRINTF)
93
 
94
 
95
#check_prototype_exists(res_init "sys/types.h;netinet/in.h;arpa/nameser.h;resolv.h" HAVE_RES_INIT_PROTO)
96
#check_prototype_exists(initgroups "unistd.h;sys/types.h;unistd.h;grp.h" HAVE_INITGROUPS_PROTO)
97
#check_prototype_exists(setenv stdlib.h HAVE_SETENV_PROTO)
98
#check_prototype_exists(strlcat string.h HAVE_STRLCAT_PROTO)
99
#check_prototype_exists(strlcpy string.h HAVE_STRLCPY_PROTO)
100
 
101
 
102
#check_type_size("int" SIZEOF_INT)
103
#check_type_size("char *"  SIZEOF_CHAR_P)
104
#check_type_size("long" SIZEOF_LONG)
105
#check_type_size("short" SIZEOF_SHORT)
106
#check_type_size("size_t" SIZEOF_SIZE_T)
107
#check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
108