I'm by no means an automake developer, but what you're looking for is
already done by Libtool.
File: libtool.info, Node: Link mode
`-rpath LIBDIR'
If OUTPUT-FILE is a library, it will eventually be installed in
LIBDIR. If OUTPUT-FILE is a program, add LIBDIR to the run-time
path
Dear automake developers,
I'd like to point your attention at something missing in the current
autoconf/automake utilities:
In some cases it is necessary to control which "RPATH"s are compiled
into shared libraries or executables, i.e. the search path information
used by the dynamic linker to find