DEADSOFTWARE

hopefully no more windows
[d2df-editor.git] / src / lib / vampimg / ImagingOptions.inc
1 {
2 User Options
3 Following defines and options can be changed by user.
4 }
6 { Source options }
8 {$DEFINE USE_INLINE} // Use function inlining for some functions
9 // works in Free Pascal and Delphi 9+.
10 {$DEFINE USE_ASM} // Ff defined, assembler versions of some
11 // functions will be used (only for x86).
13 // Debug options: If none of these two are defined
14 // your project settings are used.
15 { $DEFINE IMAGING_DEBUG} // If defined, debug info, range/IO/overflow
16 // checking, stack frames, assertions, and
17 // other debugging options will be turned on.
18 { $DEFINE IMAGING_RELEASE} // If defined, all debug info is off.
22 (* File format support linking options.
23 Define formats which you don't want to be registred automatically.
24 Default: all formats are registered = no symbols defined.
25 Example: If you want to disable JPEG support just uncomment //{$DEFINE DONT_LINK_JPEG} line
26 *)
28 //{$DEFINE DONT_LINK_JPEG} // link support for Jpeg images
29 //{$DEFINE DONT_LINK_PNG} // link support for PNG images
30 //{$DEFINE DONT_LINK_TARGA} // link support for Targa images
31 //{$DEFINE DONT_LINK_BITMAP} // link support for Windows Bitmap images
32 //{$DEFINE DONT_LINK_DDS} // link support for DDS images
33 //{$DEFINE DONT_LINK_GIF} // link support for GIF images
34 {$DEFINE DONT_LINK_MNG} // link support for MNG images
35 {$DEFINE DONT_LINK_JNG} // link support for JNG images
36 //{$DEFINE DONT_LINK_PNM} // link support for PortableMap images (PBM, PGM, PPM, PAM, PFM)
37 {$DEFINE DONT_LINK_RADHDR} // link support for Radiance HDR/RGBE file format
39 //{$DEFINE DONT_LINK_EXTRAS} // link support for file formats defined in
40 // Extras package. Exactly which formats will be
41 // registered depends on settings in
42 // ImagingExtras.pas unit.
44 { Component set used in ImagignComponents.pas unit. You usually don't need
45 to be concerned with this - proper component library is selected automatically
46 according to your compiler. }
48 { $DEFINE COMPONENT_SET_VCL} // use Delphi VCL
49 { $DEFINE COMPONENT_SET_LCL} // use Lazarus LCL (set automatically when compiling with FPC)
51 {
52 Auto Options
53 Following options and defines are set automatically and some
54 are required for Imaging to compile successfully. Do not change
55 anything here if you don't know what you are doing.
56 }
58 { Compiler options }
60 {$ALIGN ON} // Field alignment: 8 Bytes (in D6+)
61 {$BOOLEVAL OFF} // Boolean eval: off
62 {$EXTENDEDSYNTAX ON} // Extended syntax: on
63 {$LONGSTRINGS ON} // string = AnsiString: on
64 {$MINENUMSIZE 4} // Min enum size: 4 B
65 {$TYPEDADDRESS OFF} // Typed pointers: off
66 {$WRITEABLECONST OFF} // Writeable constants: off
68 {$IFNDEF FPC}
69 {$DEFINE DCC} // if not using FPC then DCC compiler is used (Delphi/BCB)
70 // others are not supported
71 {$ENDIF}
73 {$IFDEF DCC}
74 {$DEFINE DELPHI}
75 {$ENDIF}
77 {$IF (Defined(DCC) and (CompilerVersion >= 18.5))}
78 {$IFDEF RELEASE}
79 {$UNDEF DEBUG} // If we are using Delphi 2007+ where you can set
80 // DEBUG/RELEASE mode in project options and RELEASE
81 // is currently set we undef DEBUG mode
82 {$ENDIF}
83 {$IFEND}
85 {$IF Defined(IMAGING_DEBUG)}
86 {$ASSERTIONS ON}
87 {$DEBUGINFO ON}
88 {$RANGECHECKS ON}
89 {$IOCHECKS ON}
90 {$OVERFLOWCHECKS ON}
91 {$IFDEF DCC}
92 {$OPTIMIZATION OFF}
93 {$STACKFRAMES ON}
94 {$LOCALSYMBOLS ON}
95 {$DEFINE MEMCHECK}
96 {$ENDIF}
97 {$IFDEF FPC}
98 {$S+}
99 {$CHECKPOINTER ON}
100 {$ENDIF}
101 {$ELSEIF Defined(IMAGING_RELEASE)}
102 {$ASSERTIONS OFF}
103 {$DEBUGINFO OFF}
104 {$RANGECHECKS OFF}
105 {$IOCHECKS OFF}
106 {$OVERFLOWCHECKS OFF}
107 {$IFDEF DCC}
108 {$OPTIMIZATION ON}
109 {$STACKFRAMES OFF}
110 {$LOCALSYMBOLS OFF}
111 {$ENDIF}
112 {$IFDEF FPC}
113 {$S-}
114 {$ENDIF}
115 {$IFEND}
117 {$IF Defined (CPU86) and not Defined(CPUX86)}
118 {$DEFINE CPUX86} // Compatibility with Delphi
119 {$IFEND}
121 {$IF Defined (CPUX86_64) and not Defined(CPUX64)}
122 {$DEFINE CPUX64} // Compatibility with Delphi
123 {$IFEND}
125 {$IF Defined (DARWIN) and not Defined(MACOSX)}
126 {$DEFINE MACOS} // Compatibility with Delphi
127 {$IFEND}
129 {$IF Defined(DCC) and (CompilerVersion < 23)}
130 {$DEFINE CPUX86} // Compatibility with older Delphi
131 {$IFEND}
133 { Compiler capabilities }
135 // Define if compiler supports inlining of functions and procedures
136 {$IF (Defined(DCC) and (CompilerVersion >= 17)) or Defined(FPC)}
137 {$DEFINE HAS_INLINE}
138 {$IFEND}
140 // Define if compiler supports advanced records with methods
141 {$IF (Defined(DCC) and (CompilerVersion >= 18)) or
142 (Defined(FPC) and (FPC_FULLVERSION >= 20600))}
143 {$DEFINE HAS_ADVANCED_RECORDS}
144 {$IFEND}
146 // Define if compiler supports operator overloading
147 // (unfortunately Delphi and FPC operator overloading is not compatible).
148 // FPC supports Delphi compatible operator overloads since 2.6.0
149 {$IF (Defined(DCC) and (CompilerVersion >= 18)) or
150 (Defined(FPC) and (FPC_FULLVERSION >= 20600))}
151 {$DEFINE HAS_OPERATOR_OVERLOADING}
152 {$IFEND}
154 // Anonymous methods
155 {$IF Defined(DCC) and (CompilerVersion >= 20) }
156 {$DEFINE HAS_ANON_METHODS}
157 {$IFEND}
159 // Generic types (Delphi and FPC implementations incompatible).
160 // Update: FPC supports Delphi compatible generics since 2.6.0
161 {$IF (Defined(DCC) and (CompilerVersion >= 20)) or
162 (Defined(FPC) and (FPC_FULLVERSION >= 20600))}
163 {$DEFINE HAS_GENERICS}
164 {$IFEND}
166 { Imaging options check}
168 {$IFNDEF HAS_INLINE}
169 {$UNDEF USE_INLINE}
170 {$ENDIF}
172 {$IF not Defined(CPUX86)}
173 {$UNDEF USE_ASM}
174 {$IFEND}
176 {$IFDEF FPC}
177 {$DEFINE COMPONENT_SET_LCL}
178 {$UNDEF COMPONENT_SET_VCL}
179 {$ENDIF}
181 {$IFDEF DELPHI}
182 {$UNDEF COMPONENT_SET_LCL}
183 {$DEFINE COMPONENT_SET_VCL}
184 {$ENDIF}
186 { Platform options }
188 {$IF Defined(WIN32) or Defined(WIN64)}
189 {$DEFINE MSWINDOWS}
190 {$IFEND}
192 {$IFDEF LINUX}
193 {$DEFINE UNIX}
194 {$ENDIF}
196 { More compiler options }
198 {$IFDEF FPC} // Free Pascal options - some options set above (like min enum size)
199 // are reset to defaults by setting {$MODE} so they are
200 // redeclared here
201 {$MODE DELPHI} // compatible with delphi
202 {$GOTO ON} // alow goto
203 {$PACKRECORDS 8} // same as ALING 8 for Delphi
204 {$PACKENUM 4} // Min enum size: 4 B
205 {$IFDEF CPU86}
206 {$ASMMODE INTEL} // intel assembler mode
207 {$ENDIF}
208 {$ENDIF}
210 {$IFDEF HAS_INLINE}
211 {$INLINE ON} // turns inlining on for compilers that support it
212 {$ENDIF}
214 {$WARNINGS OFF}
215 {$HINTS OFF}
216 {$NOTES OFF}