On Mon, 2007-08-06 at 10:53 +1000, Russell Shaw wrote: [snip]
> However, the shared object that dlopen requires is in a new .libs > directory: > > modules/System/.libs/system.o > modules/System/.libs/system.so > modules/System/.libs/system.so.0 > modules/System/.libs/system.so.0.0.0 > > > Dlopen fails because it is looking for modules/System/system.so > When installed, i'll have the install location at: > > /usr/lib/$(pkglibdir)/System/system.so > > > Should i just have dlopen look for modules/System/.libs/system.so > and modules/System/system.so and use the first one that succeeds, or > is there a cleaner way for avoiding this? You can use libltdl's ltdlopen instead. libltdl is included with libtool. > Also, what's the best way to determine from within the program whether > it is currently installed or not? I generally provide environment variables that can be set to search paths or fully-qualified executables, as appropriate. If such environment variables aren't set, I default to using programs/libraries in their installed locations. -- Braden McDaniel e-mail: <[EMAIL PROTECTED]> <http://endoframe.com> Jabber: <[EMAIL PROTECTED]>