At my company we have the sandbox. This uses different free libraries that we compile within a specific directory (to not have problems with the system installation of a customer.) This means you need to include an RPATH in the binary (.ELF) files.
Most of the libraries that we use have a modern configure script that uses libtool. libtool knows how to automatically add the RPATH information to the libraries and binaries generated in a project.