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

Peter Fales psfales@lucent.com
Sun, 9 Sep 2001 14:01:16 -0500

Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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

> 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


Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="acinclude.m4.patch"

< # 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.
> #
> # Checks for gphoto2 - needed by the gphoto2 backend.
> [
>   AC_CHECK_TOOL(GPHOTO2_BIN, gphoto2, false)
> ])

Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="configure.in.patch"

> 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