Because I am stubborn, when I am linking with a library installed in a nonstandard place, I usually try to get the configure script to do the right thing, even though it is not always easy. But, just in case I lose the battle, I keep in mind the existence of chrpath, a little utility for changing the rpath in an ELF binary. Because you use it on the final build artefact, there is no way for autoconf or libtool to screw it up.