When you compile a unit, the compiler will by default always look for unit files.
To be able to differentiate between units that have been compiled as static or dynamic libraries, there are 2 switches:
Definition of one symbol will automatically undefine the other.
These two switches can be used in conjunction with the configuration file fpc.cfg. The existence of one of these symbols can be used to decide which unit search path to set. For example, on linux:
With such a configuration file, the compiler will look for its units in different directories, depending on whether -XD or -XS is used.