ImagingOptions.inc 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192
  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.
  15. Define formats which you don't want to be registred automatically.
  16. Default: all formats are registered, no symbols defined.}
  17. //{$DEFINE DONT_LINK_JPEG} // link support for Jpeg images
  18. //{$DEFINE DONT_LINK_PNG} // link support for PNG images
  19. //{$DEFINE DONT_LINK_TARGA} // link support for Targa images
  20. //{$DEFINE DONT_LINK_BITMAP} // link support for Windows Bitmap images
  21. //{$DEFINE DONT_LINK_DDS} // link support for DDS images
  22. //{$DEFINE DONT_LINK_GIF} // link support for GIF images
  23. //{$DEFINE DONT_LINK_MNG} // link support for MNG images
  24. //{$DEFINE DONT_LINK_JNG} // link support for JNG images
  25. //{$DEFINE DONT_LINK_PNM} // link support for PortableMap images (PBM, PGM, PPM, PAM, PFM)
  26. //{$DEFINE DONT_LINK_EXTRAS} // link support for file formats defined in
  27. // Extras package. Exactly which formats will be
  28. // registered depends on settings in
  29. // ImagingExtras.pas unit.
  30. { Component set used in ImagignComponents.pas unit. You usually don't need
  31. to be concerned with this - proper component library is selected automatically
  32. according to your compiler. }
  33. {$DEFINE COMPONENT_SET_VCL} // use Delphi VCL
  34. { $DEFINE COMPONENT_SET_LCL} // use Lazarus LCL (set automatically when 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 ON} // Field alignment: 8 Bytes (in D6+)
  43. {$BOOLEVAL OFF} // Boolean eval: off
  44. {$EXTENDEDSYNTAX ON} // Extended syntax: on
  45. {$LONGSTRINGS ON} // string = AnsiString: on
  46. {$MINENUMSIZE 4} // Min enum size: 4 B
  47. {$TYPEDADDRESS OFF} // Typed pointers: off
  48. {$WRITEABLECONST OFF} // Writeable constants: off
  49. {$IFNDEF FPC}
  50. {$DEFINE DCC} // if not using FPC then DCC compiler is used (Delphi/Kylix)
  51. // others are not supported
  52. {$ENDIF}
  53. {$IFDEF DCC}
  54. {$IFDEF LINUX}
  55. {$DEFINE KYLIX} // using Kylix
  56. {$ENDIF}
  57. {$ENDIF}
  58. {$IFDEF DCC}
  59. {$IFNDEF KYLIX}
  60. {$DEFINE DELPHI} // using Delphi
  61. {$ENDIF}
  62. {$ENDIF}
  63. {$IF (Defined(DCC) and (CompilerVersion >= 18.5))}
  64. {$IFDEF RELEASE}
  65. {$UNDEF DEBUG} // If we are using Delphi 2007+ where you can set
  66. // DEBUG/RELEASE mode in project options and RELEASE
  67. // is currently set we undef DEBUG mode
  68. {$ENDIF}
  69. {$IFEND}
  70. {$IFDEF DEBUG}
  71. {$ASSERTIONS ON}
  72. {$DEBUGINFO ON}
  73. {$RANGECHECKS ON}
  74. {$IOCHECKS ON}
  75. {$OVERFLOWCHECKS ON}
  76. {$IFDEF DCC}
  77. {$OPTIMIZATION OFF}
  78. {$STACKFRAMES ON}
  79. {$LOCALSYMBOLS ON}
  80. {$DEFINE MEMCHECK}
  81. {$ENDIF}
  82. {$IFDEF FPC}
  83. {$S+}
  84. {$CHECKPOINTER ON}
  85. {$ENDIF}
  86. {$ELSE}
  87. {$ASSERTIONS OFF}
  88. {$DEBUGINFO OFF}
  89. {$RANGECHECKS OFF}
  90. {$IOCHECKS OFF}
  91. {$OVERFLOWCHECKS OFF}
  92. {$IFDEF DCC}
  93. {$OPTIMIZATION ON}
  94. {$STACKFRAMES OFF}
  95. {$LOCALSYMBOLS OFF}
  96. {$ENDIF}
  97. {$IFDEF FPC}
  98. {$S-}
  99. {$ENDIF}
  100. {$ENDIF}
  101. { Compiler capabilities }
  102. // Define if compiler supports inlining of functions and procedures
  103. // Note that FPC inline support crashed in older versions (1.9.8)
  104. {$IF (Defined(DCC) and (CompilerVersion >= 17)) or (Defined(FPC) and Defined(CPU86))}
  105. {$DEFINE HAS_INLINE}
  106. {$IFEND}
  107. // Define if compiler supports advanced records with methods
  108. {$IF (Defined(DCC) and (CompilerVersion >= 18)) }
  109. {$DEFINE HAS_ADVANCED_RECORDS}
  110. {$IFEND}
  111. // Define if compiler supports operator overloading
  112. // (unfortunately Delphi and FPC operator overloaing is not compatible)
  113. {$IF (Defined(DCC) and (CompilerVersion >= 18)) or Defined(FPC)}
  114. {$DEFINE HAS_OPERATOR_OVERLOADING}
  115. {$IFEND}
  116. { Imaging options check}
  117. {$IFNDEF HAS_INLINE}
  118. {$UNDEF USE_INLINE}
  119. {$ENDIF}
  120. {$IFDEF FPC}
  121. {$IFNDEF CPU86}
  122. {$UNDEF USE_ASM}
  123. {$ENDIF}
  124. {$ENDIF}
  125. {$IFDEF FPC}
  126. {$DEFINE COMPONENT_SET_LCL}
  127. {$UNDEF COMPONENT_SET_VCL}
  128. {$ENDIF}
  129. {$IFDEF DELPHI}
  130. {$UNDEF COMPONENT_SET_LCL}
  131. {$DEFINE COMPONENT_SET_VCL}
  132. {$ENDIF}
  133. { Platform options }
  134. {$IFDEF WIN32}
  135. {$DEFINE MSWINDOWS}
  136. {$ENDIF}
  137. {$IFDEF DPMI}
  138. {$DEFINE MSDOS}
  139. {$ENDIF}
  140. {$IFDEF LINUX}
  141. {$DEFINE UNIX}
  142. {$ENDIF}
  143. { More compiler options }
  144. {$IFDEF FPC} // Free Pascal options - some options set above (like min enum size)
  145. // are reset to defaults by setting {$MODE} so they are
  146. // redeclared here
  147. {$MODE DELPHI} // compatible with delphi
  148. {$GOTO ON} // alow goto
  149. {$PACKRECORDS 8} // same as ALING 8 for Delphi
  150. {$PACKENUM 4} // Min enum size: 4 B
  151. {$CALLING REGISTER} // default calling convention is register
  152. {$IFDEF CPU86}
  153. {$ASMMODE INTEL} // intel assembler mode
  154. {$ENDIF}
  155. {$ENDIF}
  156. {$IFDEF HAS_INLINE}
  157. {$INLINE ON} // turns inlining on for compilers that support it
  158. {$ENDIF}