I've used it in lastest version lazarus installation package.
See youFreepascal version check
Code: Select all
{$IFDEF FPC}
{$MODE DELPHI}
{$INTERFACES COM}
{$DEFINE VER140BELOW}
// We assume 2 levels is sufficient.
// The higher the third number in a version, the better... (we hope)
{$IFDEF fpc_version>=5}
{$MESSAGE 'FPC2_5UP'}
{$DEFINE FPC2_5UP}
{$ENDIF}
{$IFDEF fpc_version>=4}
{$MESSAGE 'FPC2_4UP'}
{$DEFINE FPC2_4UP}
{$ENDIF}
{$IFDEF fpc_version>=3}
{$MESSAGE 'FPC2_3UP'}
{$DEFINE FPC2_3UP}
{$ENDIF}
{$IFDEF fpc_version>=2}
{$MESSAGE 'FPC2_2UP'}
{$DEFINE FPC2_2UP}
{$ENDIF}
{$IFDEF fpc_version>=1}
{$MESSAGE 'FPC2_1UP'}
{$DEFINE FPC2_1UP}
{$ENDIF}
{$IFDEF VER2}
{$MESSAGE 'FPC2_UP'}
{$DEFINE FPC2_UP}
{$ENDIF}
{$ENDIF}