/src/FreeImage/Source/LibMNG/libmng_conf.h
C++ Header | 306 lines | 92 code | 56 blank | 158 comment | 33 complexity | 44f8b5310f6c1691b07d2d2f23673076 MD5 | raw file
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/* ************************************************************************** */ 74/* added by FreeImage */ 75/* ************************************************************************** */ 76 77#define MNG_OPTIMIZE_CHUNKINITFREE 78#define MNG_OPTIMIZE_OBJCLEANUP 79#define MNG_OPTIMIZE_CHUNKASSIGN 80#define MNG_OPTIMIZE_CHUNKREADER 81 82/* ************************************************************************** */ 83 84/* enable exactly one(1) of the MNG-(sub)set selectors */ 85/* use this to select which (sub)set of the MNG specification you wish 86 to support */ 87/* generally you'll want full support as the library provides it automatically 88 for you! if you're really strung on memory-requirements you can opt 89 to enable less support (but it's just NOT a good idea!) */ 90/* NOTE that this isn't actually implemented yet */ 91 92#if !defined(MNG_SUPPORT_FULL) && !defined(MNG_SUPPORT_LC) && !defined(MNG_SUPPORT_VLC) 93#define MNG_SUPPORT_FULL 94/* #define MNG_SUPPORT_LC */ 95/* #define MNG_SUPPORT_VLC */ 96#endif 97 98/* ************************************************************************** */ 99 100/* enable JPEG support if required */ 101/* use this to enable the JNG support routines */ 102/* this requires an external jpeg package; 103 currently only IJG's jpgsrc6b is supported! */ 104/* NOTE that the IJG code can be either 8- or 12-bit (eg. not both); 105 so choose the one you've defined in jconfig.h; if you don't know what 106 the heck I'm talking about, just leave it at 8-bit support (thank you!) */ 107 108#ifndef MNG_NO_INCLUDE_JNG 109#ifdef MNG_SUPPORT_FULL /* full support includes JNG */ 110#define MNG_SUPPORT_IJG6B 111#endif 112 113#ifndef MNG_SUPPORT_IJG6B 114#if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 115#define MNG_SUPPORT_IJG6B 116#endif 117#endif 118 119#if defined(MNG_SUPPORT_IJG6B) && !defined(MNG_SUPPORT_JPEG8) && !defined(MNG_SUPPORT_JPEG12) 120#define MNG_SUPPORT_JPEG8 121/* #define MNG_SUPPORT_JPEG12 */ 122#endif 123 124/* The following is required to export the IJG routines from the DLL in 125 the Windows-standard calling convention; 126 currently this only works for Borland C++ !!! */ 127 128#if defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 129#if defined(MNG_SUPPORT_IJG6B) && defined(__BORLANDC__) 130#define MNG_DEFINE_JPEG_STDCALL 131#endif 132#endif 133#endif 134 135/* ************************************************************************** */ 136 137/* enable required high-level functions */ 138/* use this to select the high-level functions you require */ 139/* if you only need to display a MNG, disable write support! */ 140/* if you only need to examine a MNG, disable write & display support! */ 141/* if you only need to copy a MNG, disable display support! */ 142/* if you only need to create a MNG, disable read & display support! */ 143/* NOTE that turning all options off will be very unuseful! */ 144 145#if !defined(MNG_SUPPORT_READ) && !defined(MNG_SUPPORT_WRITE) && !defined(MNG_SUPPORT_DISPLAY) 146#define MNG_SUPPORT_READ 147#if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 148#define MNG_SUPPORT_WRITE 149#endif 150#define MNG_SUPPORT_DISPLAY 151#endif 152 153/* ************************************************************************** */ 154 155/* enable chunk access functions */ 156/* use this to select whether you need access to the individual chunks */ 157/* useful if you want to examine a read MNG (you'll also need MNG_STORE_CHUNKS !)*/ 158/* required if you need to create & write a new MNG! */ 159 160#ifndef MNG_ACCESS_CHUNKS 161#if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 162#define MNG_ACCESS_CHUNKS 163#endif 164#endif 165 166/* ************************************************************************** */ 167 168/* enable exactly one(1) of the color-management functionality selectors */ 169/* use this to select the level of automatic color support */ 170/* MNG_FULL_CMS requires the lcms (little cms) external package ! */ 171/* if you want your own app (or the OS) to handle color-management 172 select MNG_APP_CMS */ 173 174#define MNG_GAMMA_ONLY 175/* #define MNG_FULL_CMS */ 176/* #define MNG_APP_CMS */ 177 178/* ************************************************************************** */ 179 180/* enable automatic dithering */ 181/* use this if you need dithering support to convert high-resolution 182 images to a low-resolution output-device */ 183/* NOTE that this is not supported yet */ 184 185/* #define MNG_AUTO_DITHER */ 186 187/* ************************************************************************** */ 188 189/* enable whether chunks should be stored for reference later */ 190/* use this if you need to examine the chunks of a MNG you have read, 191 or (re-)write a MNG you have read */ 192/* turn this off if you want to reduce memory-consumption */ 193 194#ifndef MNG_STORE_CHUNKS 195#if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 196#define MNG_STORE_CHUNKS 197#endif 198#endif 199 200/* ************************************************************************** */ 201 202/* enable internal memory management (if your compiler supports it) */ 203/* use this if your compiler supports the 'standard' memory functions 204 (calloc & free), and you want the library to use these functions and not 205 bother your app with memory-callbacks */ 206 207/* #define MNG_INTERNAL_MEMMNGMT */ 208 209/* ************************************************************************** */ 210 211/* enable internal tracing-functionality (manual debugging purposes) */ 212/* use this if you have trouble location bugs or problems */ 213/* NOTE that you'll need to specify the trace callback function! */ 214 215/* #define MNG_SUPPORT_TRACE */ 216 217/* ************************************************************************** */ 218 219/* enable extended error- and trace-telltaling */ 220/* use this if you need explanatory messages with errors and/or tracing */ 221 222#if !defined(MNG_ERROR_TELLTALE) && !defined(MNG_TRACE_TELLTALE) 223#if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 224#define MNG_ERROR_TELLTALE 225#define MNG_TRACE_TELLTALE 226#endif 227#endif 228 229/* ************************************************************************** */ 230 231/* enable BIG/LITTLE endian optimizations */ 232/* enable BIG if you're on an architecture that supports big-endian reads 233 and writes that aren't word-aligned */ 234/* according to reliable sources this only works for PowerPC (bigendian mode) 235 and 680x0 */ 236/* enable LITTLE if you're on an architecture that supports little-endian */ 237/* when in doubt leave both off !!! */ 238 239/* #define MNG_BIGENDIAN_SUPPORTED */ 240/* #define MNG_LITTLEENDIAN_SUPPORTED */ 241 242/* ************************************************************************** */ 243/* enable 'version' functions */ 244#if !defined(MNG_VERSION_QUERY_SUPPORT) && \ 245 !defined(MNG_NO_VERSION_QUERY_SUPPORT) 246#define MNG_VERSION_QUERY_SUPPORT 247#endif 248 249/* enable 'supports' function */ 250/* use this if you need to query the availability of functions at runtime; 251 useful for apps that dynamically load the library and that need specific 252 functions */ 253 254#if !defined(MNG_NO_SUPPORT_FUNCQUERY) && !defined(MNG_SUPPORT_FUNCQUERY) 255#if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || \ 256 defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 257#define MNG_SUPPORT_FUNCQUERY 258#endif 259#endif 260 261/* ************************************************************************** */ 262 263/* enable dynamic MNG features */ 264/* use this if you would like to have dynamic support for specifically 265 designed MNGs; eg. this is useful for 'rollover' effects such as common 266 on the world wide web */ 267 268#ifndef MNG_SUPPORT_DYNAMICMNG 269#if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL) 270#define MNG_SUPPORT_DYNAMICMNG 271#endif 272#endif 273#ifndef MNG_SUPPORT_DYNAMICMNG 274#ifndef MNG_SKIPCHUNK_evNT 275#define MNG_SKIPCHUNK_evNT 276#endif 277#endif 278 279#ifdef MNG_INCLUDE_JNG 280#ifndef MNG_NO_ACCESS_JPEG 281#ifndef MNG_ACCESS_JPEG 282#define MNG_ACCESS_JPEG 283#endif 284#endif 285#endif 286 287#ifdef MNG_INCLUDE_ZLIB 288#ifndef MNG_NO_ACCESS_ZLIB 289#ifndef MNG_ACCESS_ZLIB 290#define MNG_ACCESS_ZLIB 291#endif 292#endif 293#endif 294 295/* ************************************************************************** */ 296/* * * */ 297/* * End of user-selectable compile-time options * */ 298/* * * */ 299/* ************************************************************************** */ 300 301#endif /* _libmng_conf_h_ */ 302 303/* ************************************************************************** */ 304/* * end of file * */ 305/* ************************************************************************** */ 306