Like having different working directories for different compilers. That means, it is necessary to set up some environment variables to have PATH, LDFLAGS, CPPFLAGS or PKG_CONFIG_PATH point to the wanted libraries and binaries.
Furthermore, I like to put some “packages” in its own prefix (which most people will disagree), like
package1/lib
package1/bin
package1/include
…
So to keep this flexible, it would be nice to have it just include all directories that match. — Excluding the source ones, that is.
I wrote this down in some function, this might not be the best way to do it however ;-)