ImagingOptions.inc 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212
  1. { $Id: ImagingOptions.inc,v 1.23 2006/10/26 13:29:28 galfar Exp $ }
  2. { Imaging options }
  3. {$DEFINE USE_INLINE} // use function inlining for some functions
  4. // works in Free Pascal and Delphi 9+
  5. {$DEFINE USE_ASM} // if defined, assembler versions of some
  6. // functions will be used (only for x86)
  7. { $DEFINE DEBUG} // if defined, debug info and range/IO/overflow
  8. // checking and stack frames will be turned on
  9. {$DEFINE RAISE_EXCEPTIONS} // if defined, errors in Imaging will raise
  10. // EImaginError exceptions on some errors
  11. // define component set used in ImagignComponents.pas unit
  12. {$DEFINE COMPONENT_SET_VCL} // use Borland's VCL
  13. { $DEFINE COMPONENT_SET_CLX} // use Borland's CLX (set automatically when using Kylix, must be se manually when using Delphi 6/7)
  14. { $DEFINE COMPONENT_SET_LCL} // use Lazarus' LCL (set automatically when using FPC)
  15. { Compiler options }
  16. {$ALIGN 8} // Field alignment: 8 B
  17. {$ASSERTIONS ON} // Assertions: on
  18. {$BOOLEVAL OFF} // Boolean eval: off
  19. {$EXTENDEDSYNTAX ON} // Extended syntax: on
  20. {$LONGSTRINGS ON} // string = AnsiString: on
  21. {$MINENUMSIZE 4} // Min enum size: 4 B
  22. {$TYPEDADDRESS OFF} // Typed pointers: off
  23. {$WRITEABLECONST OFF} // Writeable constants: off
  24. {$IFNDEF FPC}
  25. {$DEFINE DCC} // if not using FPC then DCC compiler is used (Delphi/Kylix)
  26. // others are not supported
  27. {$ENDIF}
  28. {$IFNDEF FPC}
  29. {$IFDEF LINUX}
  30. {$DEFINE KYLIX} // using Kylix
  31. {$ENDIF}
  32. {$ENDIF}
  33. {$IFDEF DCC}
  34. {$IFNDEF KYLIX}
  35. {$DEFINE DELPHI} // using Delphi
  36. {$ENDIF}
  37. {$ENDIF}
  38. {$IFDEF DEBUG}
  39. {$DEBUGINFO ON}
  40. {$LOCALSYMBOLS ON}
  41. {$RANGECHECKS ON}
  42. {$IOCHECKS ON}
  43. {$OVERFLOWCHECKS ON}
  44. {$IFDEF DCC}
  45. {$OPTIMIZATION OFF}
  46. {$STACKFRAMES ON}
  47. { $DEFINE MEMCHECK}
  48. {$ENDIF}
  49. {$IFDEF FPC}
  50. {$S+}
  51. {$ENDIF}
  52. {$ELSE}
  53. {$DEBUGINFO OFF}
  54. {$LOCALSYMBOLS OFF}
  55. {$RANGECHECKS OFF}
  56. {$IOCHECKS OFF}
  57. {$OVERFLOWCHECKS OFF}
  58. {$IFDEF DCC}
  59. {$OPTIMIZATION ON}
  60. {$STACKFRAMES OFF}
  61. {$ENDIF}
  62. {$IFDEF FPC}
  63. {$S-}
  64. {$ENDIF}
  65. {$ENDIF}
  66. { Compiler capabilities }
  67. // Define if compiler supports inlining of functions and procedures
  68. // FPC inline support is now disable because it crashes
  69. {$IF (Defined(DCC) and (CompilerVersion >= 17)) }// or Defined(FPC)}
  70. {$DEFINE HAS_INLINE}
  71. {$IFEND}
  72. // Define if compiler supports advanced records with methods
  73. {$IF (Defined(DCC) and (CompilerVersion >= 18)) }
  74. {$DEFINE HAS_ADVANCED_RECORDS}
  75. {$IFEND}
  76. // Define if compiler supports operator overloading (unfortunately Delphi and FPC operator overloaing is not compatible)
  77. {$IF (Defined(DCC) and (CompilerVersion >= 18)) or Defined(FPC)}
  78. {$DEFINE HAS_OPERATOR_OVERLOADING}
  79. {$IFEND}
  80. { Imaging options check}
  81. {$IFNDEF HAS_INLINE}
  82. {$UNDEF USE_INLINE}
  83. {$ENDIF}
  84. {$IFDEF FPC}
  85. {$IFNDEF CPU86}
  86. {$UNDEF USE_ASM}
  87. {$ENDIF}
  88. {$ENDIF}
  89. {$IFDEF FPC}
  90. {$DEFINE COMPONENT_SET_LCL}
  91. {$UNDEF COMPONENT_SET_VCL}
  92. {$UNDEF COMPONENT_SET_CLX}
  93. {$ENDIF}
  94. {$IFDEF KYLIX}
  95. {$DEFINE COMPONENT_SET_CLX}
  96. {$UNDEF COMPONENT_SET_VCL}
  97. {$UNDEF COMPONENT_SET_LCL}
  98. {$ENDIF}
  99. {$IFDEF DELPHI}
  100. {$UNDEF COMPONENT_SET_LCL}
  101. {$IF CompilerVersion >= 17}
  102. {$UNDEF COMPONENT_SET_CLX} // Delphi 9+ has no CLX
  103. {$IFEND}
  104. {$IFNDEF COMPONENT_SET_VCL}
  105. {$IFNDEF COMPONENT_SET_CLX}
  106. {$DEFINE COMPONENT_SET_VCL} // use VCL as default if not set
  107. {$ENDIF}
  108. {$ENDIF}
  109. {$ENDIF}
  110. {$IFDEF COMPONENT_SET_VCL}
  111. {$UNDEF COMPONENT_SET_CLX}
  112. {$UNDEF COMPONENT_SET_LCL}
  113. {$ENDIF}
  114. {$IFDEF COMPONENT_SET_CLX}
  115. {$UNDEF COMPONENT_SET_VCL}
  116. {$UNDEF COMPONENT_SET_LCL}
  117. {$ENDIF}
  118. {$IFDEF COMPONENT_SET_LCL}
  119. {$UNDEF COMPONENT_SET_VCL}
  120. {$UNDEF COMPONENT_SET_CLX}
  121. {$ENDIF}
  122. { Platform options }
  123. {$IFDEF WIN32}
  124. {$DEFINE MSWINDOWS}
  125. {$ENDIF}
  126. {$IFDEF DPMI}
  127. {$DEFINE MSDOS}
  128. {$ENDIF}
  129. {$IFDEF LINUX}
  130. {$DEFINE UNIX}
  131. {$ENDIF}
  132. { More compiler options }
  133. {$IFDEF FPC} // Free Pascal options
  134. {$MODE DELPHI} // compatible with delphi
  135. {$GOTO ON} // alow goto
  136. {$PACKRECORDS 8} // same as ALING 8 for Delphi
  137. {$CALLING REGISTER} // default calling convention is register
  138. {$IFDEF CPU86}
  139. {$IFNDEF DYN_LIBRARY}
  140. {$SMARTLINK ON} // smartlinking on, but not for dll/so -
  141. // nothing gets exported from library when it is on
  142. // in FPC 1.9.8
  143. {$ENDIF}
  144. {$ASMMODE INTEL} // intel assembler mode
  145. {$ENDIF}
  146. {$ENDIF}
  147. {$IFDEF HAS_INLINE}
  148. {$INLINE ON} // turns inlining on for compilers that support it
  149. {$ENDIF}
  150. { Extensions linking options }
  151. {$DEFINE LINK_JPEG} // link support for Jpeg images
  152. {$DEFINE LINK_PNG} // link support for PNG images
  153. {$DEFINE LINK_TARGA} // link support for Targa images
  154. {$DEFINE LINK_BITMAP} // link support for Windows Bitmap images
  155. {$DEFINE LINK_DDS} // link support for DDS images
  156. {$DEFINE LINK_MNG} // link support for MNG images
  157. {$DEFINE LINK_JNG} // link support for JNG images
  158. {$DEFINE LINK_OPENGL} // link support for OpenGL
  159. {$DEFINE LINK_SDL} // link support for SDL
  160. {$DEFINE LINK_D3D9} // link support for D3D9
  161. //{$DEFINE LINK_DRAWING} // link drawing function
  162. //{$DEFINE LINK_EFFECTS} // link effect functions
  163. { Extension dependencies check }
  164. {$IFDEF LINK_MNG} // MNG uses internaly both PNG and JNG
  165. {$DEFINE LINK_JNG}
  166. {$DEFINE LINK_PNG}
  167. {$ENDIF}
  168. {$IFDEF LINK_JNG} // JNG uses internaly both PNG and JPEG
  169. {$DEFINE LINK_PNG}
  170. {$DEFINE LINK_JPEG}
  171. {$ENDIF}