
{$IFNDEF FPC}
  {$IF CompilerVersion < 22}
    {$DEFINE DCC}
  {$IFEND}
{$ENDIF}


{$UNDEF HAS_ADVANCED_TSIZE}
{$UNDEF HAS_ADVANCED_TRECT}
{$UNDEF HAS_ADVANCED_TPOINT}

// --------------- Free Pascal -------------------

{$IFDEF FPC}

  {$UNDEF HAS_TSTRINGS_WRITEBOM}
  {$UNDEF HAS_SYSTEM_UITYPES}
  {$UNDEF HAS_STREAM_WRITEDATA}
  {$UNDEF HAS_READ_WITH_OFFSET}
  {$UNDEF HAS_SAVE_WITH_ENCODING}
  {$UNDEF HAS_INIFILE_WITH_ENCODING}
  {$UNDEF HAS_PANEL_WITH_PARENTBACKGROUND}
  {$UNDEF HAS_WINCONTROL_WITH_PARENTDOUBLEBUFFERED}
  {$UNDEF HAS_RTTI}
  {$UNDEF HAS_UINTTOSTR}
  {$UNDEF HAS_RTL_GENERICS}
  {$UNDEF FPC304_OR_ABOVE}
  {$UNDEF FPC320_OR_ABOVE}
  {$UNDEF FPC322_OR_ABOVE}
  {$UNDEF FPC331_OR_ABOVE}

  {$DEFINE HAS_FORMATSETTINGS}

  {$IFDEF MSWINDOWS}
    {$DEFINE USE_GDIPLUS_CONTROLS}
  {$ENDIF}

  {$DEFINE HAS_ADVANCED_TSIZE}
  {$DEFINE HAS_ADVANCED_TRECT}
  {$DEFINE HAS_ADVANCED_TPOINT}

  // FPC 3.0.4 and UP
  {$IF DEFINED(FPC_FULLVERSION) and (FPC_FULLVERSION >= 30004)}
    {$DEFINE FPC304_OR_ABOVE}
    {$DEFINE HAS_PANEL_WITH_PARENTBACKGROUND}
    {$DEFINE HAS_WINCONTROL_WITH_PARENTDOUBLEBUFFERED}
    //{$DEFINE HAS_SPARTA_GENERICS}
  {$IFEND}

  // FPC 3.2.0 and UP
  {$IF DEFINED(FPC_FULLVERSION) and (FPC_FULLVERSION >= 30200)}
    {$DEFINE FPC320_OR_ABOVE}
    {$DEFINE HAS_SYSTEM_UITYPES}
    {$DEFINE HAS_TSTRINGS_WRITEBOM}
    {$DEFINE HAS_SAVE_WITH_ENCODING}
    {$DEFINE HAS_INIFILE_WITH_ENCODING}
    {$DEFINE HAS_RTTI}   
    {$DEFINE HAS_RTL_GENERICS}
    {$DEFINE HAS_UINTTOSTR}
  {$IFEND}

  // FPC 3.2.2 and UP
  {$IF DEFINED(FPC_FULLVERSION) and (FPC_FULLVERSION >= 30202)}
    {$DEFINE FPC322_OR_ABOVE}
  {$IFEND}

  // FPC 3.3.1 and UP
  {$IF DEFINED(FPC_FULLVERSION) and (FPC_FULLVERSION >= 30301)}
    {$DEFINE FPC331_OR_ABOVE}
    {$DEFINE HAS_STREAM_WRITEDATA}
    {$DEFINE HAS_READ_WITH_OFFSET}
  {$IFEND}

{$ENDIF} // FPC


// --------------------- Delphi ----------------------

{$IFDEF DCC}

  {$IFDEF VER200}
    {$DEFINE DELPHI2009}
  {$ENDIF}

  {$IFDEF VER210}
    {$DEFINE DELPHI2010}
  {$ENDIF}

  {$IFDEF VER220}
    {$DEFINE DELPHIXE}
  {$ENDIF}

  {$IFDEF VER230}
    {$DEFINE DELPHIXE2}
  {$ENDIF}

  {$IFDEF VER240}
    {$DEFINE DELPHIXE3}
  {$ENDIF}





  {$IF CompilerVersion <= 20}
    {$DEFINE DELPHI2009_OR_BELOW}
  {$IFEND}

  {$IF CompilerVersion >= 20}
    {$DEFINE DELPHI2009_OR_ABOVE}
    {$DEFINE DELPHI_UNICODE}
  {$IFEND}


  {$IF CompilerVersion <= 21}
    {$DEFINE DELPHI2010_OR_BELOW}
  {$IFEND}

  {$IF CompilerVersion >= 21}
    {$DEFINE DELPHI2010_OR_ABOVE}
  {$IFEND}


  {$IF CompilerVersion <= 22}
    {$DEFINE DELPHIXE_OR_BELOW}
  {$IFEND}

  {$IF CompilerVersion >= 22}
    {$DEFINE DELPHIXE_OR_ABOVE}
    {$DEFINE HAS_FORMATSETTINGS}
    {$DEFINE HAS_TSTRINGS_WRITEBOM}
  {$IFEND}


  {$IF CompilerVersion <= 23}
    {$DEFINE DELPHIXE2_OR_BELOW}
  {$IFEND}

  {$IF CompilerVersion >= 23}
    {$DEFINE DELPHIXE2_OR_ABOVE}
    {$DEFINE HAS_SYSTEM_UITYPES}
    {$DEFINE HAS_UNIT_SCOPE}
    {$DEFINE HAS_VCL_STYLES}
    {$DEFINE HAS_ANSI_ENCODING}
  {$IFEND}


  {$IF CompilerVersion >= 24}
    {$DEFINE DELPHIXE3_OR_ABOVE}
    {$DEFINE HAS_STYLE_ELEMENTS}
  {$IFEND}


  {$IFDEF DELPHIXE2_OR_ABOVE}
    {$DEFINE HAS_ADVANCED_TSIZE}
    {$DEFINE HAS_ADVANCED_TRECT}
    {$DEFINE HAS_ADVANCED_TPOINT}
  {$ENDIF}



  {$UNDEF USE_GDIPLUS_CONTROLS}
  {$IFDEF DELPHIXE2_OR_ABOVE}
    {$DEFINE USE_GDIPLUS_CONTROLS}
  {$ENDIF}


{$ENDIF} // DCC
