Re Laz version detection:
Fiddling around with Trunk/Trunk I found a workaround that works for the initialization section of my unit, where I needed it. It might be useful for others coding with current trunk.
Here's the state of play with fpc 3.11/laz 1.7 (svn rev 53588m)
The highest scope this can go is
after the unit's Interface Uses clause
interface
uses lclversion, <other stuff> ;
{$IF LCL_FULLVERSION >= 1070000}
{$DEFINE LAZ17}
{$ENDIF}
From that point on,
{$IFDEF LAZ17}<some laz 1.7+ code>{$ENDIF}
works throughout the unit's implementation, initialization (and finalization AFAIK) but obviously
not in the Interface Uses clause
It
does work in the implementation Uses clause.
The 'greying out' feature of the editor is misleading when using {$IFDEF LAZ17} in this way, but the compiler sees it correctly.
I have no idea if this is a regression, bug or intended behaviour as I haven't needed to test for Laz version before now.