magick-config.h

Go to the documentation of this file.
00001 /*
00002   Copyright 2012 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004 
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007 
00008     https://imagemagick.org/script/license.php
00009 
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickConfig not autogenerated (fixed stuff)
00017 */
00018 #ifndef MAGICKCORE_MAGICK_CONFIG_H
00019 #define MAGICKCORE_MAGICK_CONFIG_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #include "MagickCore/magick-baseconfig.h"
00026 
00027 #define MAGICKCORE_STRING_QUOTE(str) #str
00028 #define MAGICKCORE_STRING_XQUOTE(str) MAGICKCORE_STRING_QUOTE(str)
00029 
00030 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
00031 # if defined(__GNUC__) || defined(__clang__)
00032 #  define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(GCC warning w))
00033 # elif defined(_MSC_VER)
00034 #  define MAGICK_COMPILER_WARNING(w) _Pragma(MAGICKCORE_STRING_QUOTE(message(w)))
00035 # endif
00036 #endif
00037 
00038 #ifndef MAGICK_COMPILER_WARNING
00039 # define MAGICK_COMPILER_WARNING(w)
00040 #endif
00041 
00042 #ifdef MAGICKCORE__FILE_OFFSET_BITS
00043 # ifdef _FILE_OFFSET_BITS
00044 #  if _FILE_OFFSET_BITS != MAGICKCORE__FILE_OFFSET_BITS
00045     MAGICK_COMPILER_WARNING("_FILE_OFFSET_BITS is already defined, but does not match MAGICKCORE__FILE_OFFSET_BITS")
00046 #  else
00047 #   undef _FILE_OFFSET_BITS
00048 #  endif
00049 # endif
00050 # ifndef _FILE_OFFSET_BITS
00051 #  if MAGICKCORE__FILE_OFFSET_BITS == 64
00052 #   define _FILE_OFFSET_BITS 64
00053 #  elif MAGICKCORE__FILE_OFFSET_BITS == 32
00054 #   define _FILE_OFFSET_BITS 32
00055 #  else
00056 #   define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
00057 #  endif
00058 # endif
00059 #endif
00060 
00061 /* Compatibility block */
00062 #if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
00063 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
00064 # warning "this is an obsolete behavior please fix your makefile"
00065 # define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
00066 #endif
00067 
00068 /* Number of bits in a pixel Quantum (8/16/32/64) */
00069 #ifndef MAGICKCORE_QUANTUM_DEPTH
00070 # error "you should set MAGICKCORE_QUANTUM_DEPTH"
00071 #endif
00072 
00073 /* check values */
00074 #if MAGICKCORE_QUANTUM_DEPTH != 8
00075 # if MAGICKCORE_QUANTUM_DEPTH != 16
00076 #  if MAGICKCORE_QUANTUM_DEPTH != 32
00077 #   if MAGICKCORE_QUANTUM_DEPTH != 64
00078 #    error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
00079 #   endif
00080 #  endif
00081 # endif
00082 #endif
00083 
00084 
00085 #if !defined(MAGICKCORE_HDRI_ENABLE) && defined(MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H)
00086 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default"
00087 # warning "this is an obsolete behavior please fix yours makefile"
00088 # define MAGICKCORE_HDRI_ENABLE MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H
00089 #endif
00090 
00091 /* whether HDRI is enable */
00092 #if !defined(MAGICKCORE_HDRI_ENABLE)
00093 # error "you should set MAGICKCORE_HDRI_ENABLE"
00094 #endif
00095 
00096 #if MAGICKCORE_HDRI_ENABLE
00097 # define MAGICKCORE_HDRI_SUPPORT 1
00098 #endif
00099 
00100 /* Compatibility block */
00101 #if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
00102 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
00103 # warning "this is an obsolete behavior please fix yours makefile"
00104 # define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
00105 #endif
00106 
00107 /* Number of bits in a pixel Quantum (8/16/32/64) */
00108 #ifndef MAGICKCORE_QUANTUM_DEPTH
00109 # error "you should set MAGICKCORE_QUANTUM_DEPTH"
00110 #endif
00111 
00112 /* check values */
00113 #if MAGICKCORE_QUANTUM_DEPTH != 8
00114 # if MAGICKCORE_QUANTUM_DEPTH != 16
00115 #  if MAGICKCORE_QUANTUM_DEPTH != 32
00116 #   if MAGICKCORE_QUANTUM_DEPTH != 64
00117 #    error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
00118 #   endif
00119 #  endif
00120 # endif
00121 #endif
00122 
00123 
00124 #if !defined(MAGICKCORE_HDRI_ENABLE) && defined(MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H)
00125 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default"
00126 # warning "this is an obsolete behavior please fix yours makefile"
00127 # define MAGICKCORE_HDRI_ENABLE MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H
00128 #endif
00129 
00130 /* whether HDRI is enable */
00131 #if !defined(MAGICKCORE_HDRI_ENABLE)
00132 # error "you should set MAGICKCORE_HDRI_ENABLE"
00133 #endif
00134 
00135 #if MAGICKCORE_HDRI_ENABLE
00136 # define MAGICKCORE_HDRI_SUPPORT 1
00137 #endif
00138 
00139 #if defined __CYGWIN32__ && !defined __CYGWIN__
00140    /* For backwards compatibility with Cygwin b19 and
00141       earlier, we define __CYGWIN__ here, so that
00142       we can rely on checking just for that macro. */
00143 #  define __CYGWIN__  __CYGWIN32__
00144 #endif
00145 
00146 /*  ABI SUFFIX */
00147 #ifndef MAGICKCORE_HDRI_SUPPORT
00148 #define MAGICKCORE_ABI_SUFFIX  "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH)
00149 #else 
00150 #define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) "HDRI"
00151 #endif 
00152 
00153 /* some path game */
00154 #if !defined __CYGWIN__
00155 # if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__)
00156    /* Use Windows separators on all _WIN32 defining
00157       environments, except Cygwin. */
00158 #  define MAGICKCORE_DIR_SEPARATOR_CHAR         '\\'
00159 #  define MAGICKCORE_DIR_SEPARATOR              "\\"
00160 #  define MAGICKCORE_PATH_SEPARATOR_CHAR        ';'
00161 #  define MAGICKCORE_PATH_SEPARATOR             ";"
00162 # endif
00163 #endif
00164  
00165 /* posix */
00166 #ifndef MAGICKCORE_DIR_SEPARATOR_CHAR
00167    /* Assume that not having this is an indicator that all
00168       are missing. */
00169 #  define MAGICKCORE_DIR_SEPARATOR_CHAR         '/'
00170 #  define MAGICKCORE_DIR_SEPARATOR              "/"
00171 #  define MAGICKCORE_PATH_SEPARATOR_CHAR        ':'
00172 #  define MAGICKCORE_PATH_SEPARATOR             ":"
00173 #endif /* !DIR_SEPARATOR_CHAR */
00174 
00175 # if defined(MAGICKCORE_POSIX_SUPPORT) || defined(__MINGW32__)
00176  
00177 /* module dir */
00178 #ifndef MAGICKCORE_MODULES_DIRNAME
00179 # define MAGICKCORE_MODULES_DIRNAME MAGICKCORE_MODULES_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
00180 #endif
00181  
00182 #ifndef MAGICKCORE_MODULES_PATH
00183 #  define MAGICKCORE_MODULES_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
00184 #endif
00185  
00186 #ifndef MAGICKCORE_MODULES_RELATIVE_PATH
00187 #define MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
00188 #endif
00189  
00190 /* Subdirectory under lib to place ImageMagick coder module files */
00191 #ifndef MAGICKCORE_CODER_PATH
00192 # if defined(vms)
00193 #  define MAGICKCORE_CODER_PATH "sys$login:"
00194 # else
00195 #  define MAGICKCORE_CODER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
00196 # endif
00197 #endif
00198  
00199 #ifndef MAGICKCORE_CODER_RELATIVE_PATH
00200 # define MAGICKCORE_CODER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
00201 #endif
00202  
00203 /* subdirectory under lib to place ImageMagick filter module files */
00204 #ifndef MAGICKCORE_FILTER_PATH
00205 # if defined(vms)
00206 #  define MAGICKCORE_FILTER_PATH  "sys$login:"
00207 # else
00208 #  define MAGICKCORE_FILTER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
00209 # endif
00210 #endif
00211  
00212 #ifndef MAGICKCORE_FILTER_RELATIVE_PATH
00213 # define MAGICKCORE_FILTER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
00214 #endif
00215 
00216 /* sharearch dir */
00217 #ifndef MAGICKCORE_SHAREARCH_DIRNAME
00218 # define MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_SHAREARCH_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
00219 #endif
00220  
00221 #ifndef MAGICKCORE_SHAREARCH_PATH
00222 #  define MAGICKCORE_SHAREARCH_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_DIR_SEPARATOR
00223 #endif
00224  
00225 #ifndef MAGICKCORE_SHAREARCH_RELATIVE_PATH
00226 #define MAGICKCORE_SHAREARCH_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME
00227 #endif
00228 
00229 #endif
00230 
00231 /* for Clang compatibility */
00232 #ifndef __has_builtin
00233 #  define __has_builtin(x) 0
00234 #endif
00235 
00236 #if defined(__GNUC__) && !defined(__clang__)
00237 # define MAGICKCORE_DIAGNOSTIC_PUSH() \
00238    _Pragma("GCC diagnostic push")
00239 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \
00240    _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
00241 # define MAGICKCORE_DIAGNOSTIC_POP() \
00242    _Pragma("GCC diagnostic pop")
00243 #else
00244 # define MAGICKCORE_DIAGNOSTIC_PUSH()
00245 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED()
00246 # define MAGICKCORE_DIAGNOSTIC_POP()
00247 #endif
00248 
00249 #define MAGICKCORE_BITS_BELOW(power_of_2) \
00250   ((power_of_2)-1)
00251 
00252 #define MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2) \
00253   MAGICKCORE_BITS_BELOW(power_of_2)
00254 
00255 #define MAGICKCORE_IS_NOT_ALIGNED(n, power_of_2) \
00256   ((n) & MAGICKCORE_BITS_BELOW(power_of_2))
00257 
00258 #define MAGICKCORE_IS_NOT_POWER_OF_2(n) \
00259   MAGICKCORE_IS_NOT_ALIGNED((n), (n))
00260 
00261 #define MAGICKCORE_ALIGN_DOWN(n, power_of_2) \
00262   ((n) & ~MAGICKCORE_BITS_BELOW(power_of_2))
00263 
00264 #define MAGICKCORE_ALIGN_UP(n, power_of_2) \
00265   MAGICKCORE_ALIGN_DOWN((n) + MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2)
00266  
00267 #if defined(__cplusplus) || defined(c_plusplus)
00268 }
00269 #endif
00270  
00271 #endif

Generated on 7 Sep 2020 for MagickCore by  doxygen 1.6.1