Don't know if this is intelligent, but we could put this code in a lazver.inc file in the lcl dir:
{$MACRO ON}
{$Define lcl_version:=0}
{$Define lcl_minor:=9}
{$Define lcl_patch:=23}
Then applications which need to know can include this file and use the info like:
{$ifdef lcl_version} {$ifdef lcl_minor} {$ifdef lcl_patch}
{$if (lcl_version>=0) and (lcl_minor>=9) and (lcl_patch>=23)}
Caption:='This is a version >= 0.9.23' ;
{$endif}
{$endif} {$endif}{$endif}
{$MACRO OFF}
Maybe not so clever for backward compatibility, when the lazver.inc file isn't there.
Maybe in combination with: -dHAVE_LCL_VER_FILE:
{$IFDEF HAVE_LCL_VER_FILE}
{$I lazver.inc}
{$ENDIF}
But you certainly know a better solution ;-)