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 #include "magick/magick-baseconfig.h"
00022 
00023 #if defined(__cplusplus) || defined(c_plusplus)
00024 extern "C" {
00025 #endif
00026 
00027 /* Compatibility block */
00028 #if !defined(MAGICKCORE_QUANTUM_DEPTH) && defined(MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H)
00029 # warning "you should set MAGICKCORE_QUANTUM_DEPTH to sensible default set it to configure time default"
00030 # warning "this is an obsolete behavior please fix your makefile"
00031 # define MAGICKCORE_QUANTUM_DEPTH MAGICKCORE_QUANTUM_DEPTH_OBSOLETE_IN_H
00032 #endif
00033 
00034 /* Number of bits in a pixel Quantum (8/16/32/64) */
00035 #ifndef MAGICKCORE_QUANTUM_DEPTH
00036 # error "you should set MAGICKCORE_QUANTUM_DEPTH"
00037 #endif
00038 
00039 /* check values */
00040 #if MAGICKCORE_QUANTUM_DEPTH != 8
00041 # if MAGICKCORE_QUANTUM_DEPTH != 16
00042 #  if MAGICKCORE_QUANTUM_DEPTH != 32
00043 #   if MAGICKCORE_QUANTUM_DEPTH != 64
00044 #    error "MAGICKCORE_QUANTUM_DEPTH is not 8/16/32/64 bits"
00045 #   endif
00046 #  endif
00047 # endif
00048 #endif
00049 
00050 
00051 #if !defined(MAGICKCORE_HDRI_ENABLE) && defined(MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H)
00052 # warning "you should set MAGICKCORE_HDRI_ENABLE to sensible default set it to configure time default"
00053 # warning "this is an obsolete behavior please fix yours makefile"
00054 # define MAGICKCORE_HDRI_ENABLE MAGICKCORE_HDRI_ENABLE_OBSOLETE_IN_H
00055 #endif
00056 
00057 /* whether HDRI is enable */
00058 #if !defined(MAGICKCORE_HDRI_ENABLE)
00059 # error "you should set MAGICKCORE_HDRI_ENABLE"
00060 #endif
00061 
00062 #if MAGICKCORE_HDRI_ENABLE
00063 # define MAGICKCORE_HDRI_SUPPORT 1
00064 #endif
00065 
00066 #if defined __CYGWIN32__ && !defined __CYGWIN__
00067    /* For backwards compatibility with Cygwin b19 and
00068       earlier, we define __CYGWIN__ here, so that
00069       we can rely on checking just for that macro. */
00070 #  define __CYGWIN__  __CYGWIN32__
00071 #endif
00072 
00074 #define MAGICKCORE_STRING_QUOTE(str) #str
00075 #define MAGICKCORE_STRING_XQUOTE(str) MAGICKCORE_STRING_QUOTE(str)
00076 
00077 /*  ABI SUFFIX */
00078 #ifndef MAGICKCORE_HDRI_SUPPORT
00079 #define MAGICKCORE_ABI_SUFFIX  "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH)
00080 #else 
00081 #define MAGICKCORE_ABI_SUFFIX "Q" MAGICKCORE_STRING_XQUOTE(MAGICKCORE_QUANTUM_DEPTH) "HDRI"
00082 #endif 
00083 
00084 /* some path game */
00085 #if !defined __CYGWIN__
00086 # if defined (_WIN32) || defined (_WIN64) || defined (__MSDOS__) || defined (__DJGPP__) || defined (__OS2__)
00087    /* Use Windows separators on all _WIN32 defining
00088       environments, except Cygwin. */
00089 #  define MAGICKCORE_DIR_SEPARATOR_CHAR         '\\'
00090 #  define MAGICKCORE_DIR_SEPARATOR              "\\"
00091 #  define MAGICKCORE_PATH_SEPARATOR_CHAR        ';'
00092 #  define MAGICKCORE_PATH_SEPARATOR             ";"
00093 # endif
00094 #endif
00095  
00096 /* posix */
00097 #ifndef MAGICKCORE_DIR_SEPARATOR_CHAR
00098    /* Assume that not having this is an indicator that all
00099       are missing. */
00100 #  define MAGICKCORE_DIR_SEPARATOR_CHAR         '/'
00101 #  define MAGICKCORE_DIR_SEPARATOR              "/"
00102 #  define MAGICKCORE_PATH_SEPARATOR_CHAR        ':'
00103 #  define MAGICKCORE_PATH_SEPARATOR             ":"
00104 #endif /* !DIR_SEPARATOR_CHAR */
00105 
00106 # if defined(MAGICKCORE_POSIX_SUPPORT) || defined(__MINGW32__)
00107  
00108 /* module dir */
00109 #ifndef MAGICKCORE_MODULES_DIRNAME
00110 # define MAGICKCORE_MODULES_DIRNAME MAGICKCORE_MODULES_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
00111 #endif
00112  
00113 #ifndef MAGICKCORE_MODULES_PATH
00114 #  define MAGICKCORE_MODULES_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
00115 #endif
00116  
00117 #ifndef MAGICKCORE_MODULES_RELATIVE_PATH
00118 #define MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_MODULES_DIRNAME
00119 #endif
00120  
00121 /* Subdirectory under lib to place ImageMagick coder module files */
00122 #ifndef MAGICKCORE_CODER_PATH
00123 # if defined(vms)
00124 #  define MAGICKCORE_CODER_PATH "sys$login:"
00125 # else
00126 #  define MAGICKCORE_CODER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
00127 # endif
00128 #endif
00129  
00130 #ifndef MAGICKCORE_CODER_RELATIVE_PATH
00131 # define MAGICKCORE_CODER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_CODER_DIRNAME
00132 #endif
00133  
00134 /* subdirectory under lib to place ImageMagick filter module files */
00135 #ifndef MAGICKCORE_FILTER_PATH
00136 # if defined(vms)
00137 #  define MAGICKCORE_FILTER_PATH  "sys$login:"
00138 # else
00139 #  define MAGICKCORE_FILTER_PATH MAGICKCORE_MODULES_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
00140 # endif
00141 #endif
00142  
00143 #ifndef MAGICKCORE_FILTER_RELATIVE_PATH
00144 # define MAGICKCORE_FILTER_RELATIVE_PATH MAGICKCORE_MODULES_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_FILTER_DIRNAME
00145 #endif
00146 
00147 /* sharearch dir */
00148 #ifndef MAGICKCORE_SHAREARCH_DIRNAME
00149 # define MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_SHAREARCH_BASEDIRNAME "-" MAGICKCORE_ABI_SUFFIX
00150 #endif
00151  
00152 #ifndef MAGICKCORE_SHAREARCH_PATH
00153 #  define MAGICKCORE_SHAREARCH_PATH MAGICKCORE_LIBRARY_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME MAGICKCORE_DIR_SEPARATOR
00154 #endif
00155  
00156 #ifndef MAGICKCORE_SHAREARCH_RELATIVE_PATH
00157 #define MAGICKCORE_SHAREARCH_RELATIVE_PATH MAGICKCORE_LIBRARY_RELATIVE_PATH MAGICKCORE_DIR_SEPARATOR MAGICKCORE_SHAREARCH_DIRNAME
00158 #endif
00159 
00160 /* for Clang compatibility */
00161 #ifndef __has_builtin
00162 #  define __has_builtin(x) 0
00163 #endif
00164 
00165 #if defined(__GNUC__) && !defined(__clang__)
00166 # define MAGICKCORE_DIAGNOSTIC_PUSH() \
00167    _Pragma("GCC diagnostic push")
00168 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED() \
00169    _Pragma("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
00170 # define MAGICKCORE_DIAGNOSTIC_POP() \
00171    _Pragma("GCC diagnostic pop")
00172 #else
00173 # define MAGICKCORE_DIAGNOSTIC_PUSH()
00174 # define MAGICKCORE_DIAGNOSTIC_IGNORE_MAYBE_UNINITIALIZED()
00175 # define MAGICKCORE_DIAGNOSTIC_POP()
00176 #endif
00177 
00178 #define MAGICKCORE_BITS_BELOW(power_of_2) \
00179   ((power_of_2)-1)
00180 
00181 #define MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2) \
00182   MAGICKCORE_BITS_BELOW(power_of_2)
00183 
00184 #define MAGICKCORE_IS_NOT_ALIGNED(n, power_of_2) \
00185   ((n) & MAGICKCORE_BITS_BELOW(power_of_2))
00186 
00187 #define MAGICKCORE_IS_NOT_POWER_OF_2(n) \
00188   MAGICKCORE_IS_NOT_ALIGNED((n), (n))
00189 
00190 #define MAGICKCORE_ALIGN_DOWN(n, power_of_2) \
00191   ((n) & ~MAGICKCORE_BITS_BELOW(power_of_2))
00192 
00193 #define MAGICKCORE_ALIGN_UP(n, power_of_2) \
00194   MAGICKCORE_ALIGN_DOWN((n) + MAGICKCORE_MAX_ALIGNMENT_PADDING(power_of_2),power_of_2)
00195 
00196 #endif
00197  
00198 #if defined(__cplusplus) || defined(c_plusplus)
00199 }
00200 #endif
00201  
00202 #endif

Generated on 2 Mar 2020 for MagickCore by  doxygen 1.6.1