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

David Mosberger-Tang (David.Mosberger@acm.org)
Mon, 11 May 1998 21:19:59 -0700

>>>>> On Mon, 11 May 1998 17:00:46 -0400, Michael Sweet <mike@easysw.com> said:

Michael> The following patch is a hack I'm using in sane-dll.so/a
Michael> (backend/dll.c) so that you don't have to parse the .la
Michael> file. Basically, is just looks in /usr/local/lib (or
Michael> whatever SANE_LIB_DIR is set to) for all of the backend
Michael> library files. It assumes that the installed DSOs end with
Michael> ".so" (not correct for HP-UX, which uses .sl or
Michael> .[version]), so it shouldn't be used for that platform.

Michael> I'm not sure how things are changing for the next release,
Michael> but "for the record", I recommend using a DSO directory
Michael> separate from /usr/local/lib for the back-end DSOs.
Michael> dlopen() doesn't care *what* extension is on the end of the
Michael> filename, so we can use the backend name (mustek, hp, etc)
Michael> as the filename and not muck with this stuff.

Well, dlopen() doesn't care, but we need to make sure we're
dlopen()ing the _right_ version if there are multiple versions. The
idea of using the .la file is so this version can be done right (and
in a portable fashion). But alas, the current implementation doesn't
get versioning quite right either because only one .la file is
installed at any given time. Maybe what should be done is to install
a .la file with .la.$(V_MAJOR) instead where V_MAJOR is the major
revision number of the shared library. Tested patches for something
like this would be welcome.

BTW: the next release has the SANE shared libs installed in
subdirectory called "sane", so this part of the problem will be gone.

--david

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