libmng_conf.h 13 KB

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