Hi, On Sun, Nov 17, 2002 at 01:14:32PM -0500, Brendan Burns wrote: > I'm the one who reported the problem of loading on MacOS X. I think it > is/was becuase I have the dlcompat libraries installed (to support other > software) so if dl.h is present then the loading doesn't seem to work > correctly unless .dylib is in the name of the library. I'm not sure > what sane tries to do when dl.h isn't there...
dll.c includes dl.h if it's found and if libdld is found and contains the function shl_load(). This is used for HP/UX originally. Where does the ".dylib" come from? Is this a MacOS thing? I mean, it sound funny that installing a "dlcompat" package renders the library loading system incompatible to most other Unixes :-) Our configure script already knows about the dylib suffix (from libtool.m4?) but I guess some code needs to be added to dll.c to be able to load both .so and .dylib. Maybe something like this: #if defined(HAVE_DLOPEN) # define PREFIX "libsane-" # ifdef __hpux # define POSTFIX ".sl.%u" # elif defined(IS_DARWIN) && defined(HAVE_DL_H) # define POSTFIX ".%u.dylib" # else # define POSTFIX ".so.%u" # endif Now someone has to find out how to spell defined(IS_DARWIN) and if this works for both the .so and .dylib cases. Bye, Henning