ImagingOptions.inc 6.4 KB

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