Yep, putting in a variable, already containing the true path, works eexactly as I expected it too !
Well, actually... if the aim is to have a environment variable substituted (at compile time) inside fpc.cfg (from my own config file):
-d "basepath=\$fpc_root_directory\$/\$fpcversion"
Note the envar enclosed between dollar signs
If the aim is to replace when/while creating the cfg file then $name_of_envar (just like $HOME) should be enough., e.g.
-d "basepath=/somewhere/$name_of_envar/somehow"
combined:
-d "basepath=/\$somewhere\$/$some_envar/somehow/\$fpcversion"
- $somewhere$ will be replaced at compile time with envar somewhere (if it exist, else empty)
- some_envar is replaced at creation time when making the config file
- $fpcversion will be replaced by the compiler's version number at compile time