[sane-devel] Re: Possible Kodak DC-240 backend?

Peter Fales psfales at lucent.com
Sun Sep 9 20:01:16 BST 2001


On Sun, Sep 09, 2001 at 02:10:23PM +0200, Henning Meier-Geinitz wrote:
> On Sat, Sep 08, 2001 at 11:45:03AM -0500, Peter Fales wrote:
> > I've attached my proposed changes for acinclude.m4 and configure.in
> 
> Do you really need this check? Shouldn't it be enough to check at
> run-time in the gphoto2.c? If I remember correctly, as6e does it
> similarly.

I'ld prefer to check at build time, so I don't have to deal with
portability issues on systems that can't (or don't) support gphoto2.  Since
the long term goal is to use the gphoto2 library instead of the command,
I'll need to disable the backend when the gphoto2 library isn't
available then, so I may as well do it now.

> The check doesn't work if gphoto2 isn't found. In this case
> ${ac_cv_prog_GPHOTO2} is empty and not "false". Testing for $GPHOTO2
> will work, however.

Hey, you're right.  I thought I tested that, but I must have been
confused.

> Be careful with using GPHOTO2 for two different things (the name for
> the gphoto2 binary and the name of the backend). Better use two
> different variables to avoid confusion. E.g. GPHOTO2_BIN and GPHOTO2.

Good suggestion.  Here's another stab at acinclude.m4 and config.in

Pete
-------------- next part --------------
97c97,98
< # Checks for jpeg library >= v6B (61), needed for DC210 and DC240 backends.
---
> # Checks for jpeg library >= v6B (61), needed for DC210,  DC240, and 
> # GPHOTO2 backends.
188a190,197
> 
> #
> # Checks for gphoto2 - needed by the gphoto2 backend.
> AC_DEFUN(SANE_CHECK_GPHOTO2,
> [
>   AC_CHECK_TOOL(GPHOTO2_BIN, gphoto2, false)
> ])
> 
-------------- next part --------------
172a173,174
> SANE_CHECK_GPHOTO2
> 
221a224,235
> 
> 
> if test "${GPHOTO2_BIN}" = "false" \
>       -o "${sane_cv_use_libjpeg}" != "yes"; then
>   echo "disabling GPHOTO2 backend (failed to find gphoto2 or JPEG lib)"
>   GPHOTO2=
> else
>   echo "enabling GPHOTO2 backend"
>   GPHOTO2=gphoto2
> fi
> AC_SUBST(GPHOTO2)
> 


More information about the sane-devel mailing list