1 /* 2 Copyright 1999-2021 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_QUANTUM_DEPTH 16 28 #define MAGICKCORE_HDRI_ENABLE 1 29 #define MAGICKCORE_JPEG_DELEGATE 30 #undef MAGICKCORE_HAVE__NSGETEXECUTABLEPATH 31 #undef MAGICKCORE_HAVE_VSNPRINTF_L 32 #undef MAGICKCORE_HAVE_VSNPRINTF 33 #undef MAGICKCORE_HAVE_VFPRINTF_L 34 #undef MAGICKCORE_HAVE_STRTOD_L 35 #undef MAGICKCORE_HAVE_SYS_TIMEB_H 36 #undef MAGICKCORE_HAVE_GETDTABLESIZE 37 #undef MAGICKCORE_HAVE_MACH_O_DYLD_H 38 #undef MAGICKCORE_X11_DELEGATE 39 #undef MAGICKCORE_BUILD_MODULES 40 41 #define MAGICKCORE_STRING_QUOTE(str) #str 42 #define MAGICKCORE_STRING_XQUOTE(str) MAGICKCORE_STRING_QUOTE(str) 43 44 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 45 # if defined(__GNUC__) || defined(__clang__) 46 # define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(GCC warning w)) 47 # elif defined(_MSC_VER) 48 # define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(message(w))) 49 # endif 50 #endif 51 52 #ifndef MAGICK_COMPILER_WARNING 53 # define MAGICK_COMPILER_WARNING(w) 54 #endif 55 56 #ifdef MAGICKCORE__FILE_OFFSET_BITS 57 # ifdef _FILE_OFFSET_BITS 58 # if _FILE_OFFSET_BITS != MAGICKCORE__FILE_OFFSET_BITS 59 MAGICK_COMPILER_WARNING("_FILE_OFFSET_BITS is already defined, but does not match MAGICKCORE__FILE_OFFSET_BITS") 60 # else 61 # undef _FILE_OFFSET_BITS 62 # endif 63 # endif 64 # ifndef _FILE_OFFSET_BITS 65 # if MAGICKCORE__FILE_OFFSET_BITS == 64 66 # define _FILE_OFFSET_BITS 64 67 # elif MAGICKCORE__FILE_OFFSET_BITS == 32 68 # define _FILE_OFFSET_BITS 32 69 # else 70 # define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS 71 # endif 72 # endif 73 #endif 74 75 /* Compatibility block */ 76 #if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H) 77 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" 78 # warning "this is an obsolete behavior please fix your makefile" 79 # define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H 80 #endif 81 82 /* Number of bits in a pixel Quantum (8/16/32/64) */ 83 #ifndef MAGICKCORE_QUANTUM_DEPTH 84 # error "you should set MAGICKCORE_QUANTUM_DEPTH" 85 #endif 86 87 /* check values */ 88 #if MAGICKCORE_QUANTUM_DEPTH != 8 89 # if MAGICKCORE_QUANTUM_DEPTH != 16 90 # if MAGICKCORE_QUANTUM_DEPTH != 32 91 # if MAGICKCORE_QUANTUM_DEPTH != 64 92 # error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits" 93 # endif 94 # endif 95 # endif 96 #endif 97 98 99 #if !defined(MAGICKCORE_HDRI_ENABLE) && defined(MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H) 100 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default" 101 # warning "this is an obsolete behavior please fix yours makefile" 102 # define MAGICKCORE_HDRI_ENABLE MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H 103 #endif 104 105 /* whether HDRI is enable */ 106 #if !defined(MAGICKCORE_HDRI_ENABLE) 107 # error "you should set MAGICKCORE_HDRI_ENABLE" 108 #endif 109 110 #if MAGICKCORE_HDRI_ENABLE 111 # define MAGICKCORE_HDRI_SUPPORT 1 112 #endif 113 114 /* Compatibility block */ 115 #if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H) 116 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default" 117 # warning "this is an obsolete behavior please fix yours makefile" 118 # define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H 119 #endif 120 121 /* Number of bits in a pixel Quantum (8/16/32/64) */ 122 #ifndef MAGICKCORE_QUANTUM_DEPTH 123 # error "you should set MAGICKCORE_QUANTUM_DEPTH" 124 #endif 125 126 /* check values */ 127 #if MAGICKCORE_QUANTUM_DEPTH != 8 128 # if MAGICKCORE_QUANTUM_DEPTH != 16 129 # if MAGICKCORE_QUANTUM_DEPTH != 32 130 # if MAGICKCORE_QUANTUM_DEPTH != 64 131 # error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits" 132 # endif 133 # endif 134 # endif 135 #endif 136 137 138 #if !defined(MAGICKCORE_HDRI_ENABLE) && defined(MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H) 139 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default" 140 # warning "this is an obsolete behavior please fix yours makefile" 141 # define MAGICKCORE_HDRI_ENABLE MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H 142 #endif 143 144 /* whether HDRI is enable */ 145 #if !defined(MAGICKCORE_HDRI_ENABLE) 146 # error "you should set MAGICKCORE_HDRI_ENABLE" 147 #endif 148 149 #if MAGICKCORE_HDRI_ENABLE 150 # define MAGICKCORE_HDRI_SUPPORT 1 151 #endif 152 153 #if defined __CYGWIN32__ && !defined __CYGWIN__ 154 /* For backwards compatibility with Cygwin b19 and 155 earlier, we define __CYGWIN__ here, so that 156 we can rely on checking just for that macro. */ 157 # define __CYGWIN__ __CYGWIN32__ 158 #endif 159 160 /* ABI SUFFIX */ 161 #ifndef MAGICKCORE_HDRI_SUPPORT 162 #define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) 163 #else 164 #define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) "HDRI" 165 #endif 166 167 /* some path game */ 168 #if !defined __CYGWIN__ 169 # if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__) 170 /* Use Windows separators on all _WIN32 defining 171 environments, except Cygwin. */ 172 # define MAGICKCORE_DIR_SEPARATOR_CHAR '\\' 173 # define MAGICKCORE_DIR_SEPARATOR "\\" 174 # define MAGICKCORE_PATH_SEPARATOR_CHAR ';' 175 # define MAGICKCORE_PATH_SEPARATOR ";" 176 # endif 177 #endif 178 179 /* posix */ 180 #ifndef MAGICKCORE_DIR_SEPARATOR_CHAR 181 /* Assume that not having this is an indicator that all 182 are missing. */ 183 # define MAGICKCORE_DIR_SEPARATOR_CHAR '/' 184 # define MAGICKCORE_DIR_SEPARATOR "/" 185 # define MAGICKCORE_PATH_SEPARATOR_CHAR ':' 186 # define MAGICKCORE_PATH_SEPARATOR ":" 187 #endif /* !DIR_SEPARATOR_CHAR */ 188 189 # if defined(MAGICKCORE_POSIX_SUPPORT) || defined(__MINGW32__) 190 191 /* module dir */ 192 #ifndef MAGICKCORE_MODULES_DIRNAME 193 # define MAGICKCORE_MODULES_DIRNAME MAGICKCORE_MODULES_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX 194 #endif 195 196 #ifndef MAGICKCORE_MODULES_PATH 197 # define MAGICKCORE_MODULES_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME 198 #endif 199 200 #ifndef MAGICKCORE_MODULES_RELATIVE_PATH 201 #define MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME 202 #endif 203 204 /* Subdirectory under lib to place ImageMagick coder module files */ 205 #ifndef MAGICKCORE_CODER_PATH 206 # if defined(vms) 207 # define MAGICKCORE_CODER_PATH "sys$login:" 208 # else 209 # define MAGICKCORE_CODER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME 210 # endif 211 #endif 212 213 #ifndef MAGICKCORE_CODER_RELATIVE_PATH 214 # define MAGICKCORE_CODER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME 215 #endif 216 217 /* subdirectory under lib to place ImageMagick filter module files */ 218 #ifndef MAGICKCORE_FILTER_PATH 219 # if defined(vms) 220 # define MAGICKCORE_FILTER_PATH "sys$login:" 221 # else 222 # define MAGICKCORE_FILTER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME 223 # endif 224 #endif 225 226 #ifndef MAGICKCORE_FILTER_RELATIVE_PATH 227 # define MAGICKCORE_FILTER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME 228 #endif 229 230 /* sharearch dir */ 231 #ifndef MAGICKCORE_SHAREARCH_DIRNAME 232 # define MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_SHAREARCH_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX 233 #endif 234 235 #ifndef MAGICKCORE_SHAREARCH_PATH 236 # define MAGICKCORE_SHAREARCH_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_DIR_SEPARATOR 237 #endif 238 239 #ifndef MAGICKCORE_SHAREARCH_RELATIVE_PATH 240 #define MAGICKCORE_SHAREARCH_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME 241 #endif 242 243 #endif 244 245 /* for Clang compatibility */ 246 #ifndef __has_builtin 247 # define __has_builtin(x) 0 248 #endif 249 250 #if defined(__GNUC__) && !defined(__clang__) 251 # define MAGICKCORE_DIAGNOSTIC_PUSH() \ 252 _Pragma("GCC diagnostic push") 253 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \ 254 _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") 255 # define MAGICKCORE_DIAGNOSTIC_POP() \ 256 _Pragma("GCC diagnostic pop") 257 #else 258 # define MAGICKCORE_DIAGNOSTIC_PUSH() 259 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() 260 # define MAGICKCORE_DIAGNOSTIC_POP() 261 #endif 262 263 #define MAGICKCORE_BITS_BELOW(power_of_2) \ 264 ((power_of_2)-1) 265 266 #define MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2) \ 267 MAGICKCORE_BITS_BELOW(power_of_2) 268 269 #define MAGICKCORE_IS_NOT_ALIGNED(n, power_of_2) \ 270 ((n) & MAGICKCORE_BITS_BELOW(power_of_2)) 271 272 #define MAGICKCORE_IS_NOT_POWER_OF_2(n) \ 273 MAGICKCORE_IS_NOT_ALIGNED((n), (n)) 274 275 #define MAGICKCORE_ALIGN_DOWN(n, power_of_2) \ 276 ((n) & ~MAGICKCORE_BITS_BELOW(power_of_2)) 277 278 #define MAGICKCORE_ALIGN_UP(n, power_of_2) \ 279 MAGICKCORE_ALIGN_DOWN((n) + MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2) 280 281 #if defined(__cplusplus) || defined(c_plusplus) 282 } 283 #endif 284 285 #endif 286