[sane-devel] Another cross-post for sane-gphoto2

Peter Fales psfales@lucent.com
Fri, 11 Jan 2002 20:27:16 -0600

On Fri, Jan 11, 2002 at 06:17:50PM +0100, Henning Meier-Geinitz wrote:
> Hi,
> Just some comments despite I just installed gphoto2 for the first time.

> > 	When I first ran ./configure it complained of not being able to find
> > /usr/local/lib/gphoto2 this was because the actual libraries were in a sub-directory
> > called 2.0beta4dev6. I linked these to the /usr/local/lib/gphoto2 directory to get
> > over that problem.
> On my system, the libs were installed at /usr/local/lib/gphoto2*. If
> they are in a subdirectory, run-time linking wouldn't work without
> setting LD_LIBRARY_PATH.

On my system, the libs were also in /usr/local/lib/gphoto2*.  The 
camera drivers are in /usr/local/lib/gphoto2/2.0beta4dev6, but those
are only loaded at run-time, so the fact that they are not in /usr/local/lib
should not be a problem.

> > 	Then it complained about libjpeg libraries missing, this was because some
> > of them were in /usr/lib so I linked these into /usr/local/lib.
> The SANE jpeg test doen't look in any special directory. It just tries
> to include the header and links against a function. If it doesn't find
> libjpeg in /usr/local/lib, maybe /usr/local/lib is not mentioned in
> /etc/ld.so.conf? 

I think that the gphoto2 stuff works the same way.  I suspect that the
reason it works for Henning and me is that we have /usr/local/lib/lib
in /etc/ld.so.conf, so that's one of the standard places it looks for 

> > 	Next was the includes for gphoto2...the '-I' directive was
> > '-I$with_gphoto2/include/gphoto2' but $with_gphoto2 was empty.  So I hardcoded -I to
> > be '-I/usr/local/include/gphoto2' to get over this.
> Maybe in the source code "gphoto2/gphoto2.h" and not only "gphoto2.h"
> must be included?

At line 2975 of configure (the version that Jim sent me), it tries to
set $with_gphoto2 to /usr/local unless the user supplies a value.  This
works for me whether I use --with-gphoto2,  --with-gphoto2=/usr/local or
--with-gphoto2=foo.  (In the latter case, the test compile fails, 
gphoto2 is disabled.)  Perhaps you could put some hooks into the configure
script to figure out why this is not working for you.

> > 	Then it complained of a missing config.h file.  I copied one over from the
> > gphoto2 source tree.
> Don't know about that...

I can't explain that either.  You shouldn't have to do that.  Can you send 
me the exact error output and  the config.log output (for this situation)?
> > 	It then complained that PACKAGE and VERSION had been redefined
> >	whereupon it failed the gphoto2.h test.
> Can you please post the interesting part of the log file?
> Peter Fales <peter@fales.com> is the mainatiner of this backend.
> Peter: Would it be reasonable to use gphoto2-config to determine the
> LDFLAGS and CFLAGS like it's done for gtk-config in the sane-frontends
> package?

It certainly sounds like the write way to do things, but unfortunately
it's way beyond my level of knowledge of autoconf, etc.  From a quick
look, it appears that all the magic is is gtk.m4, and all configure.in
needs to do is  AM_PATH_GTK(0.99.13, HAVE_GTK=yes, ).  I don't know
where gtk.m4 comes from - it's quite complicated and there is no 
equivalent gphoto2.m4.  I assume that this would somehave have to come
from the gphoto2 development team.

Pete Fales