ImagingOptions.inc 6.1 KB

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