Re: [patch] 0.72 sane-dll.so changes...

David Mosberger-Tang (David.Mosberger@acm.org)
Tue, 12 May 1998 08:27:53 -0700

>>>>> On Tue, 12 May 1998 09:38:42 -0400, Michael Sweet <mike@easysw.com> said:

Michael> David Mosberger-Tang wrote:
>> ... Well, dlopen() doesn't care, but we need to make sure we're
>> dlopen()ing the _right_ version if there are multiple versions.
>> The ...

Michael> Then I'd use the GIMP way, which is to have a
Michael> "gimp-major.minor" subdirectory for the library files.

Note that the shared library versioning is not necessarily related to
the SANE versioning. It has been so far (we're still in beta so we
have some more slack, no? ;-) but it does not necessarily have to stay
that way. (I'm not saying the directory scheme wouldn't work, but I
think people would find it confusing if the version number on the
shared library directory were different from the major version of
SANE.)

Michael> The only thing that the .la files are doing for you (that I
Michael> can see, anyways) is to identify the actual DSO file, whose
Michael> name will vary depending on the version and platform.
Michael> Building the shared library without the standard extension
Michael> (be it .so, .sl, etc.) should not pose a problem - the
Michael> linker sees the DSO flag (-shared, -B, etc.) and does what
Michael> it is told...

Ah, but that's the problem. The shared libraries are built by
libtool. The SANE build process has no knowledge of the internal
workings of libtool (and it shouldn't).

However, I think a better solution would be is to change dll.c to
always use a canonical file name such as LIBNAME.so.$(MAJOR). The
install process could then parse the .la files and create a symlink
from the canonical filename to the system-specific filename if
necessary.

--david

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com