If I have a vendor library (say libvendor.so) that I want my package to
link to, what is the "right way" to bundle that inside my package? My ideal
outcome would be that the package can be installed from tarball without
having to worry about installing anything to /usr/lib or tweaking some
systemwide variables. This isn't for public distribution so I'm not worried
about CRAN restrictions or licensing issues. I'm running R 3.0.2 on Linux.

I've put the library in the inst directory of my package, and provided
PKG_LIBS=-L../inst -lvendor. That works for compilation but then I need to
provide LD_LIBRARY_PATH for R to find the library at runtime.

This seems like it must be a common problem, but after hours of Googling I
haven't seen a straightforward answer.

Thanks in advance,
John

	[[alternative HTML version deleted]]

