Always search in GAUDI_PLUGIN_PATH before LD_LIBRARY_PATH
Searching in GAUDI_PLUGIN_PATH was introduced in !1452 (merged) for MacOS, and there is an issue about supporting it more generally: #267 (closed). This allows not to have to add every folder with algorithms to LD_LIBRARY_PATH, that is used when linking, at runtime to load shared dynamic libraries or by other programs, for example.
This PR:
- Adds changes in various places to also look in
GAUDI_PLUGIN_PATHand fall back toLD_LIBRARY_PATH - Add a test where only
GAUDI_PLUGIN_PATHin the environment is set
I have also tested that it works when using the Boost filesystem, but haven't tested this on MacOS yet (nothing should change there). In principle there shouldn't be any changes for environments where all the libraries are in LD_LIBRARY_PATH and GAUDI_PLUGIN_PATH is empty, since it will look there.