DEADSOFTWARE

added Vampyre Imaging Library; now textures can be in various formats, including...
[d2df-sdl.git] / src / lib / vampimg / ImagingOptions.inc
1 { $Id: ImagingOptions.inc 174 2009-09-08 09:37:59Z galfar $ }
3 {
4 User Options
5 Following defines and options can be changed by user.
6 }
8 { Source options }
10 {$DEFINE USE_INLINE} // Use function inlining for some functions
11 // works in Free Pascal and Delphi 9+.
12 {$DEFINE USE_ASM} // Ff defined, assembler versions of some
13 // functions will be used (only for x86).
15 // Debug options: If none of these two are defined
16 // your project settings are used.
17 { $DEFINE IMAGING_DEBUG} // If defined, debug info, range/IO/overflow
18 // checking, stack frames, assertions, and
19 // other debugging options will be turned on.
20 {$DEFINE IMAGING_RELEASE} // If defined, all debug info is off.
24 (* File format support linking options.
25 Define formats which you don't want to be registred automatically.
26 Default: all formats are registered = no symbols defined.
27 Example: If you want to disable JPEG support just uncomment //{$DEFINE DONT_LINK_JPEG} line
28 *)
30 {$DEFINE DONT_LINK_JPEG} // link support for Jpeg images
31 //{$DEFINE DONT_LINK_PNG} // link support for PNG images
32 //{$DEFINE DONT_LINK_TARGA} // link support for Targa images
33 //{$DEFINE DONT_LINK_BITMAP} // link support for Windows Bitmap images
34 //{$DEFINE DONT_LINK_DDS} // link support for DDS images
35 //{$DEFINE DONT_LINK_GIF} // link support for GIF images
36 {$DEFINE DONT_LINK_MNG} // link support for MNG images
37 {$DEFINE DONT_LINK_JNG} // link support for JNG images
38 //{$DEFINE DONT_LINK_PNM} // link support for PortableMap images (PBM, PGM, PPM, PAM, PFM)
40 //{$DEFINE DONT_LINK_EXTRAS} // link support for file formats defined in
41 // Extras package. Exactly which formats will be
42 // registered depends on settings in
43 // ImagingExtras.pas unit.
45 { Component set used in ImagignComponents.pas unit. You usually don't need
46 to be concerned with this - proper component library is selected automatically
47 according to your compiler. }
49 { $DEFINE COMPONENT_SET_VCL} // use Delphi VCL
50 { $DEFINE COMPONENT_SET_LCL} // use Lazarus LCL (set automatically when compiling with FPC)
52 {
53 Auto Options
54 Following options and defines are set automatically and some
55 are required for Imaging to compile successfully. Do not change
56 anything here if you don't know what you are doing.
57 }
59 { Compiler options }
61 {$ALIGN ON} // Field alignment: 8 Bytes (in D6+)
62 {$BOOLEVAL OFF} // Boolean eval: off
63 {$EXTENDEDSYNTAX ON} // Extended syntax: on
64 {$LONGSTRINGS ON} // string = AnsiString: on
65 {$MINENUMSIZE 4} // Min enum size: 4 B
66 {$TYPEDADDRESS OFF} // Typed pointers: off
67 {$WRITEABLECONST OFF} // Writeable constants: off
69 {$IFNDEF FPC}
70 {$DEFINE DCC} // if not using FPC then DCC compiler is used (Delphi/Kylix)
71 // others are not supported
72 {$ENDIF}
74 {$IFDEF DCC}
75 {$IFDEF LINUX}
76 {$DEFINE KYLIX} // using Kylix
77 {$ENDIF}
78 {$ENDIF}
80 {$IFDEF DCC}
81 {$IFNDEF KYLIX}
82 {$DEFINE DELPHI} // using Delphi
83 {$ENDIF}
84 {$ENDIF}
86 {$IF (Defined(DCC) and (CompilerVersion >= 18.5))}
87 {$IFDEF RELEASE}
88 {$UNDEF DEBUG} // If we are using Delphi 2007+ where you can set
89 // DEBUG/RELEASE mode in project options and RELEASE
90 // is currently set we undef DEBUG mode
91 {$ENDIF}
92 {$IFEND}
94 {$IF Defined(IMAGING_DEBUG)}
95 {$ASSERTIONS ON}
96 {$DEBUGINFO ON}
97 {$RANGECHECKS ON}
98 {$IOCHECKS ON}
99 {$OVERFLOWCHECKS ON}
100 {$IFDEF DCC}
101 {$OPTIMIZATION OFF}
102 {$STACKFRAMES ON}
103 {$LOCALSYMBOLS ON}
104 {$DEFINE MEMCHECK}
105 {$ENDIF}
106 {$IFDEF FPC}
107 {$S+}
108 {$CHECKPOINTER ON}
109 {$ENDIF}
110 {$ELSEIF Defined(IMAGING_RELEASE)}
111 {$ASSERTIONS OFF}
112 {$DEBUGINFO OFF}
113 {$RANGECHECKS OFF}
114 {$IOCHECKS OFF}
115 {$OVERFLOWCHECKS OFF}
116 {$IFDEF DCC}
117 {$OPTIMIZATION ON}
118 {$STACKFRAMES OFF}
119 {$LOCALSYMBOLS OFF}
120 {$ENDIF}
121 {$IFDEF FPC}
122 {$S-}
123 {$ENDIF}
124 {$IFEND}
127 { Compiler capabilities }
129 // Define if compiler supports inlining of functions and procedures
130 // Note that FPC inline support crashed in older versions (1.9.8)
131 {$IF (Defined(DCC) and (CompilerVersion >= 17)) or (Defined(FPC) and Defined(CPU86))}
132 {$DEFINE HAS_INLINE}
133 {$IFEND}
135 // Define if compiler supports advanced records with methods
136 {$IF (Defined(DCC) and (CompilerVersion >= 18)) }
137 {$DEFINE HAS_ADVANCED_RECORDS}
138 {$IFEND}
140 // Define if compiler supports operator overloading
141 // (unfortunately Delphi and FPC operator overloaing is not compatible)
142 {$IF (Defined(DCC) and (CompilerVersion >= 18)) or Defined(FPC)}
143 {$DEFINE HAS_OPERATOR_OVERLOADING}
144 {$IFEND}
146 { Imaging options check}
148 {$IFNDEF HAS_INLINE}
149 {$UNDEF USE_INLINE}
150 {$ENDIF}
152 {$IFDEF FPC}
153 {$IFNDEF CPU86}
154 {$UNDEF USE_ASM}
155 {$ENDIF}
156 {$ENDIF}
158 {$IFDEF FPC}
159 {$DEFINE COMPONENT_SET_LCL}
160 {$UNDEF COMPONENT_SET_VCL}
161 {$ENDIF}
163 {$IFDEF DELPHI}
164 {$UNDEF COMPONENT_SET_LCL}
165 {$DEFINE COMPONENT_SET_VCL}
166 {$ENDIF}
168 { Platform options }
170 {$IFDEF WIN32}
171 {$DEFINE MSWINDOWS}
172 {$ENDIF}
174 {$IFDEF DPMI}
175 {$DEFINE MSDOS}
176 {$ENDIF}
178 {$IFDEF LINUX}
179 {$DEFINE UNIX}
180 {$ENDIF}
182 { More compiler options }
184 {$IFDEF FPC} // Free Pascal options - some options set above (like min enum size)
185 // are reset to defaults by setting {$MODE} so they are
186 // redeclared here
187 {$MODE DELPHI} // compatible with delphi
188 {$GOTO ON} // alow goto
189 {$PACKRECORDS 8} // same as ALING 8 for Delphi
190 {$PACKENUM 4} // Min enum size: 4 B
191 {$CALLING REGISTER} // default calling convention is register
192 {$IFDEF CPU86}
193 {$ASMMODE INTEL} // intel assembler mode
194 {$ENDIF}
195 {$ENDIF}
197 {$IFDEF HAS_INLINE}
198 {$INLINE ON} // turns inlining on for compilers that support it
199 {$ENDIF}
202 {$WARNINGS OFF}
203 {$HINTS OFF}
204 {$NOTES OFF}