On Thu, 29 Jan 2004, Bill Moseley wrote: > We are always struggling with linking with (run-time) libraries > installed in non-standard locations. > > Is it true now that with autoconf the way to do this is: > > ./configure \ > CPPFLAGS=-I/path/to/headers \ > LDFLAGS='-R/path/to/lib -L/path-to/lib' > > and that avoids the need for LD_RUN_PATH? I get confused because I > install some packages using old versions of autoconf and need to use > LD_RUN_PATH before building/linking. The -R/path/to/lib does the same thing as LD_RUN_PATH. These options are passed directly to the compiler and linker. For old Autoconf, doing CPPFLAGS=-I/path/to/headers \ LDFLAGS='-R/path/to/lib -L/path-to/lib' \ ./configure accomplishes the same thing except that modern Autoconf will remember these options for reconfigures while old Autoconf will not. > How portable is the above? Does autoconf also deal with platforms where > LD_RUN_PATH is not supported? I believe IRIX doesn't support > LD_RUN_PATH. Autoconf is not doing anything other than to validate that the provided options successfully build working software. The user-provided *FLAGS options are compiler/platform/site specific. > And to clear up something else, is it correct that using > > --with-foo=/path/to/foo > > is not recommended -- rather the recommended way is simply --with-foo > and use CPPFLAGS and LDFLAGS. Using --with-foo=/path/to/foo is not Autoconf standard. It is a popular scheme added by many packages since it seems more user-friendly. However, the portability of this depends on how sophisticated the implementation is. It may work on just a few operating systems or with a few compilers. Bob ====================================== Bob Friesenhahn bfriesen@xxxxxxxxxxxxxxxxxxx http://www.simplesystems.org/users/bfriesen