I'm using autoconf (and automake) to build a couple of static libraries and some executables -- one executable that actually gets installed, and some for testing. Some of these executables depend on "external" libraries (e.g. boost, xerces). I've created configure-time args to specify the location of these libraries. I'm getting stumped on how to set rpath. Basically, if someone specifies --with-foo=foo_path I do this: FOO_INCLUDE="-I$foo_path/include" FOO_LIB="-L$foo_path/lib -lfoo" AC_SUBST(FOO_INCLUDE) AC_SUSST(FOO_LIB) and then I add $FOO_INCLUDE to AM_CPPFLAGS and $FOO_LIB to AM_LDADD in the Makefile.am's where they're used. I don't know whether foo is gonna be static or shared on any particular platform. If it's shared, I (think I) want to set rpath at build time. So far I've read: - http://xahlee.org/UnixResource_dir/_/ldpath.html - a discussion of -rpath and -rpath-link at: http://sourceware.org/binutils/docs-2.17/ld/Options.html#Options - http://www.eyrie.org/~eagle/notes/rpath.html - and most hopefully the thread starting at: http://lists.gnu.org/archive/html/autoconf/2002-05/msg00124.html but I looked in the autoconf 2.61 docs and didn't see a mention of AC_LIB_LINKFLAGS. I'm using automake 1.10 with Ralf W's fix for generating .deps. Am I supposed to be using libtool to link potentially shared libraries even if I'm not building any? I could use some education here. If it's useful, the primary platforms I'm interested in are SunOS 5.9 (and potentially other versions) and linux 2.4 and 2.6. HP/UX is coming soon. I plan to use gcc on all these platforms, but if there's a solution that doesn't depend on this I'd love to hear about it. Thanks much for your help. -DB _______________________________________________ Autoconf mailing list Autoconf@xxxxxxx http://lists.gnu.org/mailman/listinfo/autoconf