[sane-devel] sane-config and pkgconfig
paddy-hack at member.fsf.org
Wed Aug 28 12:43:43 BST 2019
> I'm trying to figure out what the deal is with sane-config.
> The Debian package that I have installs sane-config manpage but does not
> install an actual sane-config.
> However, there is a pkgconf file which we have in backends/tools.
> This is related to my efforts to get xsane building properly.
The XSane configure.in still relies (exclusively) on sane-config, via an
AM_PATH_SANE macro in m4/sane.m4, to figure out stuff. While
sane-config is still present in sane-backends, not all distributions
bother installing it because that same sane-backends also provides a
sane-backends.pc file for use with pkg-config.
> One of the problems that it has on my Debian based system is that
> natively, the source tree is trying to find sane-config to ascertain
> the installed version of libsane, libs and cflags etc. However it
> cannot find it, thus we have some patches.
> It should be able to use the .pc file. However, I don't know what the
> portable solution is.
I'd suggest modifying m4/sane.m4 to use pkg-config or simply inline the
PKG_CONFIG macro call directly in configure.ac, replacing AM_PATH_SANE.
Q: How good is your autofoo? Are you familiar with autoconf and
friends? If not, I'll be around to help out, even make the changes
needed, if needed, after looking at the fine print ;-)
> Should we be able to rely on the existence of pkgconfig in the xsane
> build to locate and link with libsane?
I'd say yes as sane-backends provides the necessary *.pc file.
> I see code in the frontend repo to interact with sane-config, so I'm at
> a bit of a loss as to what the right direction is to take for a portable
The sane-frontends also need to be cluebatted on current practice. It
hasn't seen a release since 2005-09-18 :scream:
> I think most people use pkgconfig files these days.
> [Sorry if some of this has been well discussed in the past.
> I'm likely going to have quite a few questions while getting up-to-speed
> on xsane.]
Rest assured, it hasn't.
Hope this helps,
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
Support Free Software https://my.fsf.org/donate
Join the Free Software Foundation https://my.fsf.org/join
More information about the sane-devel