> However, if I do: ldd myprogram, where myprogram is linked against the
> libraries in the custom directory, it says that the libraries are not
> found. The same behavior occurs, when I actually try to run myprogram.
>
> Which step am I missing?
I'm not too familiar with this, but couldn't you just use the LD_RUN_PATH
environment variable? From the man page for ld(1):
If -rpath is not used when linking an ELF executable, the
contents of the environment variable LD_RUN_PATH will be used
if it is defined.
(-rpath being the flag that lets you add a directory in which to search
for shared objects).
Shawn