MagickCore
7.1.1
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
magick-config.h
1
/*
2
Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3
dedicated to making software imaging solutions freely available.
4
5
You may not use this file except in compliance with the License. You may
6
obtain a copy of the License at
7
8
https://imagemagick.org/script/license.php
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
16
MagickConfig not autogenerated (fixed stuff)
17
*/
18
#ifndef MAGICKCORE_MAGICK_CONFIG_H
19
#define MAGICKCORE_MAGICK_CONFIG_H
20
21
#if defined(__cplusplus) || defined(c_plusplus)
22
extern
"C"
{
23
#endif
24
25
#include "MagickCore/magick-baseconfig.h"
26
27
#define MAGICKCORE_STRING_QUOTE(str) #str
28
#define MAGICKCORE_STRING_XQUOTE(str) MAGICKCORE_STRING_QUOTE(str)
29
30
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
31
# if defined(__GNUC__) || defined(__clang__)
32
# define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(GCC warning w))
33
# elif defined(_MSC_VER)
34
# define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(message(w)))
35
# endif
36
#endif
37
38
#ifndef MAGICK_COMPILER_WARNING
39
# define MAGICK_COMPILER_WARNING(w)
40
#endif
41
42
#ifdef MAGICKCORE__FILE_OFFSET_BITS
43
# ifdef _FILE_OFFSET_BITS
44
# if _FILE_OFFSET_BITS != MAGICKCORE__FILE_OFFSET_BITS
45
MAGICK_COMPILER_WARNING(
"_FILE_OFFSET_BITS is already defined, but does not match MAGICKCORE__FILE_OFFSET_BITS"
)
46
# else
47
# undef _FILE_OFFSET_BITS
48
# endif
49
# endif
50
# ifndef _FILE_OFFSET_BITS
51
# if MAGICKCORE__FILE_OFFSET_BITS == 64
52
# define _FILE_OFFSET_BITS 64
53
# elif MAGICKCORE__FILE_OFFSET_BITS == 32
54
# define _FILE_OFFSET_BITS 32
55
# else
56
# define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
57
# endif
58
# endif
59
#endif
60
61
/* Compatibility block */
62
#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
63
# warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
64
# warning "this is an obsolete behavior please fix your makefile"
65
# define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
66
#endif
67
68
/* Number of bits in a pixel Quantum (8/16/32/64) */
69
#ifndef MAGICKCORE_QUANTUM_DEPTH
70
# error "you should set MAGICKCORE_QUANTUM_DEPTH"
71
#endif
72
73
/* check values */
74
#if MAGICKCORE_QUANTUM_DEPTH != 8
75
# if MAGICKCORE_QUANTUM_DEPTH != 16
76
# if MAGICKCORE_QUANTUM_DEPTH != 32
77
# if MAGICKCORE_QUANTUM_DEPTH != 64
78
# error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
79
# endif
80
# endif
81
# endif
82
#endif
83
84
/* whether HDRI is enable */
85
#if !defined(MAGICKCORE_HDRI_ENABLE)
86
# error "you should set MAGICKCORE_HDRI_ENABLE"
87
#endif
88
89
#if MAGICKCORE_HDRI_ENABLE
90
# define MAGICKCORE_HDRI_SUPPORT 1
91
#endif
92
#if MAGICKCORE_CHANNEL_MASK_DEPTH == 64
93
# define MAGICKCORE_64BIT_CHANNEL_MASK_SUPPORT 1
94
#endif
95
96
/* Compatibility block */
97
#if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
98
# warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
99
# warning "this is an obsolete behavior please fix yours makefile"
100
# define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
101
#endif
102
103
/* Number of bits in a pixel Quantum (8/16/32/64) */
104
#ifndef MAGICKCORE_QUANTUM_DEPTH
105
# error "you should set MAGICKCORE_QUANTUM_DEPTH"
106
#endif
107
108
/* check values */
109
#if MAGICKCORE_QUANTUM_DEPTH != 8
110
# if MAGICKCORE_QUANTUM_DEPTH != 16
111
# if MAGICKCORE_QUANTUM_DEPTH != 32
112
# if MAGICKCORE_QUANTUM_DEPTH != 64
113
# error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
114
# endif
115
# endif
116
# endif
117
#endif
118
119
/* whether HDRI is enable */
120
#if !defined(MAGICKCORE_HDRI_ENABLE)
121
# error "you should set MAGICKCORE_HDRI_ENABLE"
122
#endif
123
124
#if MAGICKCORE_HDRI_ENABLE
125
# define MAGICKCORE_HDRI_SUPPORT 1
126
#endif
127
128
#if defined __CYGWIN32__ && !defined __CYGWIN__
129
/* For backwards compatibility with Cygwin b19 and
130
earlier, we define __CYGWIN__ here, so that
131
we can rely on checking just for that macro. */
132
# define __CYGWIN__ __CYGWIN32__
133
#endif
134
135
/* ABI SUFFIX */
136
#ifndef MAGICKCORE_HDRI_SUPPORT
137
#define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH)
138
#else
139
#define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) "HDRI"
140
#endif
141
142
/* some path game */
143
#if !defined __CYGWIN__
144
# if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__)
145
/* Use Windows separators on all _WIN32 defining
146
environments, except Cygwin. */
147
# define MAGICKCORE_DIR_SEPARATOR_CHAR '\\'
148
# define MAGICKCORE_DIR_SEPARATOR "\\"
149
# define MAGICKCORE_PATH_SEPARATOR_CHAR ';'
150
# define MAGICKCORE_PATH_SEPARATOR ";"
151
# endif
152
#endif
153
154
/* posix */
155
#ifndef MAGICKCORE_DIR_SEPARATOR_CHAR
156
/* Assume that not having this is an indicator that all
157
are missing. */
158
# define MAGICKCORE_DIR_SEPARATOR_CHAR '/'
159
# define MAGICKCORE_DIR_SEPARATOR "/"
160
# define MAGICKCORE_PATH_SEPARATOR_CHAR ':'
161
# define MAGICKCORE_PATH_SEPARATOR ":"
162
#endif
/* !DIR_SEPARATOR_CHAR */
163
164
# if defined(MAGICKCORE_POSIX_SUPPORT) || defined(__MINGW32__)
165
166
/* module dir */
167
#ifndef MAGICKCORE_MODULES_DIRNAME
168
# define MAGICKCORE_MODULES_DIRNAME MAGICKCORE_MODULES_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
169
#endif
170
171
#ifndef MAGICKCORE_MODULES_PATH
172
# define MAGICKCORE_MODULES_PATH MAGICKCORE_LIBRARY_ABSOLUTE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
173
#endif
174
175
#ifndef MAGICKCORE_MODULES_RELATIVE_PATH
176
#define MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
177
#endif
178
179
/* Subdirectory under lib to place ImageMagick coder module files */
180
#ifndef MAGICKCORE_CODER_PATH
181
# if defined(vms)
182
# define MAGICKCORE_CODER_PATH "sys$login:"
183
# else
184
# define MAGICKCORE_CODER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
185
# endif
186
#endif
187
188
#ifndef MAGICKCORE_CODER_RELATIVE_PATH
189
# define MAGICKCORE_CODER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
190
#endif
191
192
/* subdirectory under lib to place ImageMagick filter module files */
193
#ifndef MAGICKCORE_FILTER_PATH
194
# if defined(vms)
195
# define MAGICKCORE_FILTER_PATH "sys$login:"
196
# else
197
# define MAGICKCORE_FILTER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
198
# endif
199
#endif
200
201
#ifndef MAGICKCORE_FILTER_RELATIVE_PATH
202
# define MAGICKCORE_FILTER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
203
#endif
204
205
/* sharearch dir */
206
#ifndef MAGICKCORE_SHAREARCH_DIRNAME
207
# define MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_SHAREARCH_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
208
#endif
209
210
#ifndef MAGICKCORE_SHAREARCH_PATH
211
# define MAGICKCORE_SHAREARCH_PATH MAGICKCORE_LIBRARY_ABSOLUTE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_DIR_SEPARATOR
212
#endif
213
214
#ifndef MAGICKCORE_SHAREARCH_RELATIVE_PATH
215
#define MAGICKCORE_SHAREARCH_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME
216
#endif
217
218
#endif
219
220
/* for Clang compatibility */
221
#ifndef __has_builtin
222
# define __has_builtin(x) 0
223
#endif
224
225
#if defined(__GNUC__) && !defined(__clang__)
226
# define MAGICKCORE_DIAGNOSTIC_PUSH() \
227
_Pragma("GCC diagnostic push")
228
# define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \
229
_Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
230
# define MAGICKCORE_DIAGNOSTIC_POP() \
231
_Pragma("GCC diagnostic pop")
232
#else
233
# define MAGICKCORE_DIAGNOSTIC_PUSH()
234
# define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED()
235
# define MAGICKCORE_DIAGNOSTIC_POP()
236
#endif
237
238
#define MAGICKCORE_BITS_BELOW(power_of_2) \
239
((power_of_2)-1)
240
241
#define MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2) \
242
MAGICKCORE_BITS_BELOW(power_of_2)
243
244
#define MAGICKCORE_IS_NOT_ALIGNED(n, power_of_2) \
245
((n) & MAGICKCORE_BITS_BELOW(power_of_2))
246
247
#define MAGICKCORE_IS_NOT_POWER_OF_2(n) \
248
MAGICKCORE_IS_NOT_ALIGNED((n), (n))
249
250
#define MAGICKCORE_ALIGN_DOWN(n, power_of_2) \
251
((n) & ~MAGICKCORE_BITS_BELOW(power_of_2))
252
253
#define MAGICKCORE_ALIGN_UP(n, power_of_2) \
254
MAGICKCORE_ALIGN_DOWN((n) + MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2)
255
256
#if defined(__cplusplus) || defined(c_plusplus)
257
}
258
#endif
259
260
#endif
ImageMagick-7
MagickCore
magick-config.h
Generated by
1.12.0