1 /* ************************************************************************** */ 2 /* * * */ 3 /* * project : libmng * */ 4 /* * file : libmng_conf.h copyright (c) G.Juyn 2000-2004 * */ 5 /* * version : 1.0.9 * */ 6 /* * * */ 7 /* * purpose : main configuration file * */ 8 /* * * */ 9 /* * author : G.Juyn * */ 10 /* * * */ 11 /* * comment : The configuration file. Change this to include/exclude * */ 12 /* * the options you want or do not want in libmng. * */ 13 /* * * */ 14 /* * changes : 0.5.2 - 06/02/2000 - G.Juyn * */ 15 /* * - separated configuration-options into this file * */ 16 /* * - changed to most likely configuration (?) * */ 17 /* * 0.5.2 - 06/03/2000 - G.Juyn * */ 18 /* * - changed options to create a standard so-library * */ 19 /* * with everything enabled * */ 20 /* * 0.5.2 - 06/04/2000 - G.Juyn * */ 21 /* * - changed options to create a standard win32-dll * */ 22 /* * with everything enabled * */ 23 /* * * */ 24 /* * 0.9.2 - 08/05/2000 - G.Juyn * */ 25 /* * - changed file-prefixes * */ 26 /* * * */ 27 /* * 0.9.3 - 08/12/2000 - G.Juyn * */ 28 /* * - added workaround for faulty PhotoShop iCCP chunk * */ 29 /* * 0.9.3 - 09/16/2000 - G.Juyn * */ 30 /* * - removed trace-options from default SO/DLL builds * */ 31 /* * * */ 32 /* * 1.0.4 - 06/22/2002 - G.Juyn * */ 33 /* * - B526138 - returned IJGSRC6B calling convention to * */ 34 /* * default for MSVC * */ 35 /* * * */ 36 /* * 1.0.5 - 09/14/2002 - G.Juyn * */ 37 /* * - added event handling for dynamic MNG * */ 38 /* * - added 'supports' call to check function availability * */ 39 /* * * */ 40 /* * 1.0.6 - 06/22/2002 - G.R-P * */ 41 /* * - added MNG_NO_INCLUDE_JNG conditional * */ 42 /* * - added MNG_SKIPCHUNK_evNT conditional * */ 43 /* * 1.0.6 - 07/14/2002 - G.R-P * */ 44 /* * - added MNG_NO_SUPPORT_FUNCQUERY conditional * */ 45 /* * * */ 46 /* * 1.0.7 - 03/07/2004 - G.R-P * */ 47 /* * - added MNG_VERSION_QUERY_SUPPORT_ conditional * */ 48 /* * * */ 49 /* * 1.0.9 - 05/12/2004 - G.Juyn * */ 50 /* * - clearified MNG_BIGENDIAN_SUPPORTED conditional * */ 51 /* * - added MNG_LITTLEENDIAN_SUPPORTED conditional * */ 52 /* * * */ 53 /* ************************************************************************** */ 54 55 56 #if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI) 57 #pragma option -A /* force ANSI-C */ 58 #endif 59 60 #ifndef _libmng_conf_h_ 61 #define _libmng_conf_h_ 62 63 #ifdef MNG_MOZILLA_CFG 64 #include "special\mozcfg\mozlibmngconf.h" 65 #endif 66 67 /* ************************************************************************** */ 68 /* * * */ 69 /* * User-selectable compile-time options * */ 70 /* * * */ 71 /* ************************************************************************** */ 72 73 /* enable exactly one(1) of the MNG-(sub)set selectors */ 74 /* use this to select which (sub)set of the MNG specification you wish 75 to support */ 76 /* generally you'll want full support as the library provides it automatically 77 for you! if you're really strung on memory-requirements you can opt 78 to enable less support (but it's just NOT a good idea!) */ 79 /* NOTE that this isn't actually implemented yet */ 80 81 #if !defined(MNG_SUPPORT_FULL) && !defined(MNG_SUPPORT_LC) && !defined(MNG_SUPPORT_VLC) 82 #define MNG_SUPPORT_FULL 83 /* #define MNG_SUPPORT_LC */ 84 /* #define MNG_SUPPORT_VLC */ 85 #endif 86 87 /* ************************************************************************** */ 88 89 /* enable JPEG support if required */ 90 /* use this to enable the JNG support routines */ 91 /* this requires an external jpeg package; 92 currently only IJG's jpgsrc6b is supported! */ 93 /* NOTE that the IJG code can be either 8- or 12-bit (eg. not both); 94 so choose the one you've defined in jconfig.h; if you don't know what 95 the heck I'm talking about, just leave it at 8-bit support (thank you!) */ 96 97 #ifndef MNG_NO_INCLUDE_JNG 98 #ifdef MNG_SUPPORT_FULL /* full support includes JNG */ 99 #define MNG_SUPPORT_IJG6B 100 #endif 101 102 #ifdef PIC 103 # define MNG_BUILD_SO 104 #endif 105 106 #ifndef MNG_SUPPORT_IJG6B 107 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 108 #define MNG_SUPPORT_IJG6B 109 #endif 110 #endif 111 112 #if defined(MNG_SUPPORT_IJG6B) && !defined(MNG_SUPPORT_JPEG8) && !defined(MNG_SUPPORT_JPEG12) 113 #define MNG_SUPPORT_JPEG8 114 /* #define MNG_SUPPORT_JPEG12 */ 115 #endif 116 117 /* The following is required to export the IJG routines from the DLL in 118 the Windows-standard calling convention; 119 currently this only works for Borland C++ !!! */ 120 121 #if defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 122 #if defined(MNG_SUPPORT_IJG6B) && defined(__BORLANDC__) 123 #define MNG_DEFINE_JPEG_STDCALL 124 #endif 125 #endif 126 #endif 127 128 /* ************************************************************************** */ 129 130 /* enable required high-level functions */ 131 /* use this to select the high-level functions you require */ 132 /* if you only need to display a MNG, disable write support! */ 133 /* if you only need to examine a MNG, disable write & display support! */ 134 /* if you only need to copy a MNG, disable display support! */ 135 /* if you only need to create a MNG, disable read & display support! */ 136 /* NOTE that turning all options off will be very unuseful! */ 137 138 #if !defined(MNG_SUPPORT_READ) && !defined(MNG_SUPPORT_WRITE) && !defined(MNG_SUPPORT_DISPLAY) 139 #define MNG_SUPPORT_READ 140 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 141 #define MNG_SUPPORT_WRITE 142 #endif 143 #define MNG_SUPPORT_DISPLAY 144 #endif 145 146 /* ************************************************************************** */ 147 148 /* enable chunk access functions */ 149 /* use this to select whether you need access to the individual chunks */ 150 /* useful if you want to examine a read MNG (you'll also need MNG_STORE_CHUNKS !)*/ 151 /* required if you need to create & write a new MNG! */ 152 153 #ifndef MNG_ACCESS_CHUNKS 154 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 155 #define MNG_ACCESS_CHUNKS 156 #endif 157 #endif 158 159 /* ************************************************************************** */ 160 161 /* enable exactly one(1) of the color-management functionality selectors */ 162 /* use this to select the level of automatic color support */ 163 /* MNG_FULL_CMS requires the lcms (little cms) external package ! */ 164 /* if you want your own app (or the OS) to handle color-management 165 select MNG_APP_CMS */ 166 167 /* #define MNG_GAMMA_ONLY */ 168 #define MNG_FULL_CMS 169 /* #define MNG_APP_CMS */ 170 171 /* ************************************************************************** */ 172 173 /* enable automatic dithering */ 174 /* use this if you need dithering support to convert high-resolution 175 images to a low-resolution output-device */ 176 /* NOTE that this is not supported yet */ 177 178 /* #define MNG_AUTO_DITHER */ 179 180 /* ************************************************************************** */ 181 182 /* enable whether chunks should be stored for reference later */ 183 /* use this if you need to examine the chunks of a MNG you have read, 184 or (re-)write a MNG you have read */ 185 /* turn this off if you want to reduce memory-consumption */ 186 187 #ifndef MNG_STORE_CHUNKS 188 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 189 #define MNG_STORE_CHUNKS 190 #endif 191 #endif 192 193 /* ************************************************************************** */ 194 195 /* enable internal memory management (if your compiler supports it) */ 196 /* use this if your compiler supports the 'standard' memory functions 197 (calloc & free), and you want the library to use these functions and not 198 bother your app with memory-callbacks */ 199 200 /* #define MNG_INTERNAL_MEMMNGMT */ 201 202 /* ************************************************************************** */ 203 204 /* enable internal tracing-functionality (manual debugging purposes) */ 205 /* use this if you have trouble location bugs or problems */ 206 /* NOTE that you'll need to specify the trace callback function! */ 207 208 /* #define MNG_SUPPORT_TRACE */ 209 210 /* ************************************************************************** */ 211 212 /* enable extended error- and trace-telltaling */ 213 /* use this if you need explanatory messages with errors and/or tracing */ 214 215 #if !defined(MNG_ERROR_TELLTALE) && !defined(MNG_TRACE_TELLTALE) 216 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 217 #define MNG_ERROR_TELLTALE 218 #define MNG_TRACE_TELLTALE 219 #endif 220 #endif 221 222 /* ************************************************************************** */ 223 224 /* enable BIG/LITTLE endian optimizations */ 225 /* enable BIG if you're on an architecture that supports big-endian reads 226 and writes that aren't word-aligned */ 227 /* according to reliable sources this only works for PowerPC (bigendian mode) 228 and 680x0 */ 229 /* enable LITTLE if you're on an architecture that supports little-endian */ 230 /* when in doubt leave both off !!! */ 231 232 /* #define MNG_BIGENDIAN_SUPPORTED */ 233 /* #define MNG_LITTLEENDIAN_SUPPORTED */ 234 235 /* ************************************************************************** */ 236 /* enable 'version' functions */ 237 #if !defined(MNG_VERSION_QUERY_SUPPORT) && \ 238 !defined(MNG_NO_VERSION_QUERY_SUPPORT) 239 #define MNG_VERSION_QUERY_SUPPORT 240 #endif 241 242 /* enable 'supports' function */ 243 /* use this if you need to query the availability of functions at runtime; 244 useful for apps that dynamically load the library and that need specific 245 functions */ 246 247 #if !defined(MNG_NO_SUPPORT_FUNCQUERY) && !defined(MNG_SUPPORT_FUNCQUERY) 248 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || \ 249 defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 250 #define MNG_SUPPORT_FUNCQUERY 251 #endif 252 #endif 253 254 /* ************************************************************************** */ 255 256 /* enable dynamic MNG features */ 257 /* use this if you would like to have dynamic support for specifically 258 designed MNGs; eg. this is useful for 'rollover' effects such as common 259 on the world wide web */ 260 261 #ifndef MNG_SUPPORT_DYNAMICMNG 262 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 263 #define MNG_SUPPORT_DYNAMICMNG 264 #endif 265 #endif 266 #ifndef MNG_SUPPORT_DYNAMICMNG 267 #ifndef MNG_SKIPCHUNK_evNT 268 #define MNG_SKIPCHUNK_evNT 269 #endif 270 #endif 271 272 #ifdef MNG_INCLUDE_JNG 273 #ifndef MNG_NO_ACCESS_JPEG 274 #ifndef MNG_ACCESS_JPEG 275 #define MNG_ACCESS_JPEG 276 #endif 277 #endif 278 #endif 279 280 #ifdef MNG_INCLUDE_ZLIB 281 #ifndef MNG_NO_ACCESS_ZLIB 282 #ifndef MNG_ACCESS_ZLIB 283 #define MNG_ACCESS_ZLIB 284 #endif 285 #endif 286 #endif 287 288 /* ************************************************************************** */ 289 /* * * */ 290 /* * End of user-selectable compile-time options * */ 291 /* * * */ 292 /* ************************************************************************** */ 293 294 #endif /* _libmng_conf_h_ */ 295 296 /* ************************************************************************** */ 297 /* * end of file * */ 298 /* ************************************************************************** */ 299 300