1 /* ************************************************************************** */
2 /* *                                                                        * */
3 /* * project   : libmng                                                     * */
4 /* * file      : libmng_conf.h             copyright (c) 2000 G.Juyn        * */
5 /* * version   : 1.0.4                                                      * */
6 /* *                                                                        * */
7 /* * purpose   : main configuration file                                    * */
8 /* *                                                                        * */
9 /* * author    : G.Juyn                                                     * */
10 /* * web       : http://www.3-t.com                                         * */
11 /* * email     : mailto:info@3-t.com                                        * */
12 /* *                                                                        * */
13 /* * comment   : The configuration file. Change this to include/exclude     * */
14 /* *             the options you want or do not want in libmng.             * */
15 /* *                                                                        * */
16 /* * changes   : 0.5.2 - 06/02/2000 - G.Juyn                                * */
17 /* *             - separated configuration-options into this file           * */
18 /* *             - changed to most likely configuration (?)                 * */
19 /* *             0.5.2 - 06/03/2000 - G.Juyn                                * */
20 /* *             - changed options to create a standard so-library          * */
21 /* *               with everything enabled                                  * */
22 /* *             0.5.2 - 06/04/2000 - G.Juyn                                * */
23 /* *             - changed options to create a standard win32-dll           * */
24 /* *               with everything enabled                                  * */
25 /* *                                                                        * */
26 /* *             0.9.2 - 08/05/2000 - G.Juyn                                * */
27 /* *             - changed file-prefixes                                    * */
28 /* *                                                                        * */
29 /* *             0.9.3 - 08/12/2000 - G.Juyn                                * */
30 /* *             - added workaround for faulty PhotoShop iCCP chunk         * */
31 /* *             0.9.3 - 09/16/2000 - G.Juyn                                * */
32 /* *             - removed trace-options from default SO/DLL builds         * */
33 /* *                                                                        * */
34 /* *             1.0.4 - 06/22/2002 - G.Juyn                                * */
35 /* *             - B526138 - returned IJGSRC6B calling convention to        * */
36 /* *               default for MSVC                                         * */
37 /* *                                                                        * */
38 /* ************************************************************************** */
39 
40 
41 #if defined(__BORLANDC__) && defined(MNG_STRICT_ANSI)
42 #pragma option -A                      /* force ANSI-C */
43 #endif
44 
45 #ifndef _libmng_conf_h_
46 #define _libmng_conf_h_
47 
48 /* ************************************************************************** */
49 /* *                                                                        * */
50 /* *  User-selectable compile-time options                                  * */
51 /* *                                                                        * */
52 /* ************************************************************************** */
53 
54 /* enable exactly one(1) of the MNG-(sub)set selectors */
55 /* use this to select which (sub)set of the MNG specification you wish
56    to support */
57 /* generally you'll want full support as the library provides it automatically
58    for you! if you're really strung on memory-requirements you can opt
59    to enable less support (but it's just NOT a good idea!) */
60 /* NOTE that this isn't actually implemented yet */
61 
62 #if !defined(MNG_SUPPORT_FULL) && !defined(MNG_SUPPORT_LC) && !defined(MNG_SUPPORT_VLC)
63 #define MNG_SUPPORT_FULL
64 /* #define MNG_SUPPORT_LC */
65 /* #define MNG_SUPPORT_VLC */
66 #endif
67 
68 /* ************************************************************************** */
69 
70 /* enable JPEG support if required */
71 /* use this to enable the JNG support routines */
72 /* this requires an external jpeg package;
73    currently only IJG's jpgsrc6b is supported! */
74 /* NOTE that the IJG code can be either 8- or 12-bit (eg. not both);
75    so choose the one you've defined in jconfig.h; if you don't know what
76    the heck I'm talking about, just leave it at 8-bit support (thank you!) */
77 
78 #ifdef MNG_SUPPORT_FULL                /* full support includes JNG */
79 #define MNG_SUPPORT_IJG6B
80 #endif
81 
82 #ifndef MNG_SUPPORT_IJG6B
83 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
84 #define MNG_SUPPORT_IJG6B
85 #endif
86 #endif
87 
88 #if defined(MNG_SUPPORT_IJG6B) && !defined(MNG_SUPPORT_JPEG8) && !defined(MNG_SUPPORT_JPEG12)
89 #define MNG_SUPPORT_JPEG8
90 /* #define MNG_SUPPORT_JPEG12 */
91 #endif
92 
93 /* The following is required to export the IJG routines from the DLL in
94    the Windows-standard calling convention;
95    currently this only works for Borland C++ !!! */
96 
97 #if defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
98 #if defined(MNG_SUPPORT_IJG6B) && defined(__BORLANDC__)
99 #define MNG_DEFINE_JPEG_STDCALL
100 #endif
101 #endif
102 
103 /* ************************************************************************** */
104 
105 /* enable required high-level functions */
106 /* use this to select the high-level functions you require */
107 /* if you only need to display a MNG, disable write support! */
108 /* if you only need to examine a MNG, disable write & display support! */
109 /* if you only need to copy a MNG, disable display support! */
110 /* if you only need to create a MNG, disable read & display support! */
111 /* NOTE that turning all options off will be very unuseful! */
112 
113 #if !defined(MNG_SUPPORT_READ) && !defined(MNG_SUPPORT_WRITE) && !defined(MNG_SUPPORT_DISPLAY)
114 #define MNG_SUPPORT_READ
115 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
116 #define MNG_SUPPORT_WRITE
117 #endif
118 #define MNG_SUPPORT_DISPLAY
119 #endif
120 
121 /* ************************************************************************** */
122 
123 /* enable chunk access functions */
124 /* use this to select whether you need access to the individual chunks */
125 /* useful if you want to examine a read MNG (you'll also need MNG_STORE_CHUNKS !)*/
126 /* required if you need to create & write a new MNG! */
127 
128 #ifndef MNG_ACCESS_CHUNKS
129 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
130 #define MNG_ACCESS_CHUNKS
131 #endif
132 #endif
133 
134 /* ************************************************************************** */
135 
136 /* enable exactly one of the color-management-functionality selectors */
137 /* use this to select the level of automatic color support */
138 /* MNG_FULL_CMS requires the lcms (little cms) external package ! */
139 /* if you want your own app (or the OS) to handle color-management
140    select MNG_APP_CMS */
141 
142 #if !defined(MNG_FULL_CMS) && !defined(MNG_GAMMA_ONLY) && !defined(MNG_NO_CMS) && !defined(MNG_APP_CMS)
143 #if defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
144 #define MNG_FULL_CMS
145 #else
146 #define MNG_GAMMA_ONLY
147 #endif
148 /* #define MNG_NO_CMS */
149 /* #define MNG_APP_CMS */
150 #endif
151 
152 /* ************************************************************************** */
153 
154 /* enable automatic dithering */
155 /* use this if you need dithering support to convert high-resolution
156    images to a low-resolution output-device */
157 /* NOTE that this is not supported yet */
158 
159 /* #define MNG_AUTO_DITHER */
160 
161 /* ************************************************************************** */
162 
163 /* enable whether chunks should be stored for reference later */
164 /* use this if you need to examine the chunks of a MNG you have read,
165    or (re-)write a MNG you have read */
166 /* turn this off if you want to reduce memory-consumption */
167 
168 #ifndef MNG_STORE_CHUNKS
169 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
170 #define MNG_STORE_CHUNKS
171 #endif
172 #endif
173 
174 /* ************************************************************************** */
175 
176 /* enable internal memory management (if your compiler supports it) */
177 /* use this if your compiler supports the 'standard' memory functions
178    (calloc & free), and you want the library to use these functions and not
179    bother your app with memory-callbacks */
180 
181 /* #define MNG_INTERNAL_MEMMNGMT */
182 
183 /* ************************************************************************** */
184 
185 /* enable internal tracing-functionality (manual debugging purposes) */
186 /* use this if you have trouble location bugs or problems */
187 /* NOTE that you'll need to specify the trace callback function! */
188 
189 /* #define MNG_SUPPORT_TRACE */
190 
191 /* ************************************************************************** */
192 
193 /* enable extended error- and trace-telltaling */
194 /* use this if you need explanatory messages with errors and/or tracing */
195 
196 #if !defined(MNG_ERROR_TELLTALE) && !defined(MNG_TRACE_TELLTALE)
197 #if defined(MNG_BUILD_SO) || defined(MNG_USE_SO) || defined(MNG_BUILD_DLL) || defined(MNG_USE_DLL)
198 #define MNG_ERROR_TELLTALE
199 #define MNG_TRACE_TELLTALE
200 #endif
201 #endif
202 
203 /* ************************************************************************** */
204 
205 /* enable big-endian support  */
206 /* enable this if you're on an architecture that supports big-endian reads
207    and writes that aren't word-aligned */
208 /* according to reliable sources this only works for PowerPC (bigendian mode)
209    and 680x0 */
210 
211 /* #define MNG_BIGENDIAN_SUPPORTED */
212 
213 /* ************************************************************************** */
214 /* *                                                                        * */
215 /* *  End of user-selectable compile-time options                           * */
216 /* *                                                                        * */
217 /* ************************************************************************** */
218 
219 #endif /* _libmng_conf_h_ */
220 
221 /* ************************************************************************** */
222 /* * end of file                                                            * */
223 /* ************************************************************************** */
224 
225