/src/FreeImage/Source/LibMNG/libmng_conf.h

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