ImagingOptions.inc 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. { $Id$ }
  2. {
  3. User Options
  4. Following defines and options can be changed by user.
  5. }
  6. { Source options. }
  7. {$DEFINE USE_INLINE} // use function inlining for some functions
  8. // works in Free Pascal and Delphi 9+
  9. {$DEFINE USE_ASM} // if defined, assembler versions of some
  10. // functions will be used (only for x86)
  11. { $DEFINE DEBUG} // if defined, debug info, range/IO/overflow
  12. // checking, stack frames, assertions, and
  13. // other debugging options will be turned on
  14. { File format support linking options. Undefine formats which you don't want
  15. to be registred automatically. }
  16. {$DEFINE LINK_JPEG} // link support for Jpeg images
  17. {$DEFINE LINK_PNG} // link support for PNG images
  18. {$DEFINE LINK_TARGA} // link support for Targa images
  19. {$DEFINE LINK_BITMAP} // link support for Windows Bitmap images
  20. {$DEFINE LINK_DDS} // link support for DDS images
  21. {$DEFINE LINK_GIF} // link support for GIF images
  22. {$DEFINE LINK_MNG} // link support for MNG images
  23. {$DEFINE LINK_JNG} // link support for JNG images
  24. {$DEFINE LINK_PNM} // link support for PortableMap images (PBM, PGM, PPM, PAM, PFM)
  25. {$DEFINE LINK_EXTRAS} // link support for file formats defined in
  26. // Extras package. Exactly which formats will be
  27. // registered depends on settings in
  28. // ImagingExtras.pas unit.
  29. { Component set used in ImagignComponents.pas unit. You usually don't need
  30. to be concerned with this - proper component library is selected automatically
  31. according to your compiler (only exception is using CLX in Delphi 6/7). }
  32. {$DEFINE COMPONENT_SET_VCL} // use Borland's VCL
  33. { $DEFINE COMPONENT_SET_CLX} // use Borland's CLX (set automatically when using Kylix,
  34. // must be se manually when compiling with Delphi 6/7)
  35. { $DEFINE COMPONENT_SET_LCL} // use Lazarus' LCL (set automatically when
  36. // compiling with FPC)
  37. {
  38. Auto Options
  39. Following options and defines are set automatically and some
  40. are required for Imaging to compile successfully. Do not change
  41. anything here if you don't know what you are doing.
  42. }
  43. { Compiler options }
  44. {$ALIGN ON} // Field alignment: 8 Bytes (in D6+)
  45. {$BOOLEVAL OFF} // Boolean eval: off
  46. {$EXTENDEDSYNTAX ON} // Extended syntax: on
  47. {$LONGSTRINGS ON} // string = AnsiString: on
  48. {$MINENUMSIZE 4} // Min enum size: 4 B
  49. {$TYPEDADDRESS OFF} // Typed pointers: off
  50. {$WRITEABLECONST OFF} // Writeable constants: off
  51. {$IFNDEF FPC}
  52. {$DEFINE DCC} // if not using FPC then DCC compiler is used (Delphi/Kylix)
  53. // others are not supported
  54. {$ENDIF}
  55. {$IFDEF DCC}
  56. {$IFDEF LINUX}
  57. {$DEFINE KYLIX} // using Kylix
  58. {$ENDIF}
  59. {$ENDIF}
  60. {$IFDEF DCC}
  61. {$IFNDEF KYLIX}
  62. {$DEFINE DELPHI} // using Delphi
  63. {$ENDIF}
  64. {$ENDIF}
  65. {$IF (Defined(DCC) and (CompilerVersion >= 18.5))}
  66. {$IFDEF RELEASE}
  67. {$UNDEF DEBUG} // If we are using Delphi 2007+ where you can set
  68. // DEBUG/RELEASE mode in project options and RELEASE
  69. // is currently set we undef DEBUG mode
  70. {$ENDIF}
  71. {$IFEND}
  72. {$IFDEF DEBUG}
  73. {$ASSERTIONS ON}
  74. {$DEBUGINFO ON}
  75. {$LOCALSYMBOLS ON}
  76. {$RANGECHECKS ON}
  77. {$IOCHECKS ON}
  78. {$OVERFLOWCHECKS ON}
  79. {$IFDEF DCC}
  80. {$OPTIMIZATION OFF}
  81. {$STACKFRAMES ON}
  82. { $DEFINE MEMCHECK}
  83. {$ENDIF}
  84. {$IFDEF FPC}
  85. {$S+}
  86. {$CHECKPOINTER ON}
  87. {$ENDIF}
  88. {$ELSE}
  89. {$ASSERTIONS OFF}
  90. {$DEBUGINFO OFF}
  91. {$LOCALSYMBOLS OFF}
  92. {$RANGECHECKS OFF}
  93. {$IOCHECKS OFF}
  94. {$OVERFLOWCHECKS OFF}
  95. {$IFDEF DCC}
  96. {$OPTIMIZATION ON}
  97. {$STACKFRAMES OFF}
  98. {$ENDIF}
  99. {$IFDEF FPC}
  100. {$S-}
  101. {$ENDIF}
  102. {$ENDIF}
  103. { Compiler capabilities }
  104. // Define if compiler supports inlining of functions and procedures
  105. // Note that FPC inline support crashed in older versions (1.9.8)
  106. {$IF (Defined(DCC) and (CompilerVersion >= 17)) or (Defined(FPC) and Defined(CPU86))}
  107. {$DEFINE HAS_INLINE}
  108. {$IFEND}
  109. // Define if compiler supports advanced records with methods
  110. {$IF (Defined(DCC) and (CompilerVersion >= 18)) }
  111. {$DEFINE HAS_ADVANCED_RECORDS}
  112. {$IFEND}
  113. // Define if compiler supports operator overloading
  114. // (unfortunately Delphi and FPC operator overloaing is not compatible)
  115. {$IF (Defined(DCC) and (CompilerVersion >= 18)) or Defined(FPC)}
  116. {$DEFINE HAS_OPERATOR_OVERLOADING}
  117. {$IFEND}
  118. { Imaging options check}
  119. {$IFNDEF HAS_INLINE}
  120. {$UNDEF USE_INLINE}
  121. {$ENDIF}
  122. {$IFDEF FPC}
  123. {$IFNDEF CPU86}
  124. {$UNDEF USE_ASM}
  125. {$ENDIF}
  126. {$ENDIF}
  127. {$IFDEF FPC}
  128. {$DEFINE COMPONENT_SET_LCL}
  129. {$UNDEF COMPONENT_SET_VCL}
  130. {$UNDEF COMPONENT_SET_CLX}
  131. {$ENDIF}
  132. {$IFDEF KYLIX}
  133. {$DEFINE COMPONENT_SET_CLX}
  134. {$UNDEF COMPONENT_SET_VCL}
  135. {$UNDEF COMPONENT_SET_LCL}
  136. {$ENDIF}
  137. {$IFDEF DELPHI}
  138. {$UNDEF COMPONENT_SET_LCL}
  139. {$IF CompilerVersion >= 17}
  140. {$UNDEF COMPONENT_SET_CLX} // Delphi 9+ has no CLX
  141. {$IFEND}
  142. {$IFNDEF COMPONENT_SET_VCL}
  143. {$IFNDEF COMPONENT_SET_CLX}
  144. {$DEFINE COMPONENT_SET_VCL} // use VCL as default if not set
  145. {$ENDIF}
  146. {$ENDIF}
  147. {$ENDIF}
  148. {$IFDEF COMPONENT_SET_VCL}
  149. {$UNDEF COMPONENT_SET_CLX}
  150. {$UNDEF COMPONENT_SET_LCL}
  151. {$ENDIF}
  152. {$IFDEF COMPONENT_SET_CLX}
  153. {$UNDEF COMPONENT_SET_VCL}
  154. {$UNDEF COMPONENT_SET_LCL}
  155. {$ENDIF}
  156. {$IFDEF COMPONENT_SET_LCL}
  157. {$UNDEF COMPONENT_SET_VCL}
  158. {$UNDEF COMPONENT_SET_CLX}
  159. {$ENDIF}
  160. { Platform options }
  161. {$IFDEF WIN32}
  162. {$DEFINE MSWINDOWS}
  163. {$ENDIF}
  164. {$IFDEF DPMI}
  165. {$DEFINE MSDOS}
  166. {$ENDIF}
  167. {$IFDEF LINUX}
  168. {$DEFINE UNIX}
  169. {$ENDIF}
  170. { More compiler options }
  171. {$IFDEF FPC} // Free Pascal options - some options set above (like min enum size)
  172. // are reset to defaults by setting {$MODE} so they are
  173. // redeclared here
  174. {$MODE DELPHI} // compatible with delphi
  175. {$GOTO ON} // alow goto
  176. {$PACKRECORDS 8} // same as ALING 8 for Delphi
  177. {$PACKENUM 4} // Min enum size: 4 B
  178. {$CALLING REGISTER} // default calling convention is register
  179. {$IFDEF CPU86}
  180. {$IFNDEF DYN_LIBRARY}
  181. {$SMARTLINK ON} // smartlinking on, but not for dll/so -
  182. // nothing gets exported from library when it is on
  183. // in FPC 1.9.8
  184. {$ENDIF}
  185. {$ASMMODE INTEL} // intel assembler mode
  186. {$ENDIF}
  187. {$ENDIF}
  188. {$IFDEF HAS_INLINE}
  189. {$INLINE ON} // turns inlining on for compilers that support it
  190. {$ENDIF}
  191. { Extension dependencies check }
  192. {$IFDEF LINK_MNG} // MNG uses internaly both PNG and JNG
  193. {$DEFINE LINK_JNG}
  194. {$DEFINE LINK_PNG}
  195. {$ENDIF}
  196. {$IFDEF LINK_JNG} // JNG uses internaly both PNG and JPEG
  197. {$DEFINE LINK_PNG}
  198. {$DEFINE LINK_JPEG}
  199. {$ENDIF}