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

Henning Meier-Geinitz henning at meier-geinitz.de
Sun Sep 9 13:10:23 BST 2001


Hi,

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.

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.

> +AC_DEFUN(SANE_CHECK_GPHOTO2,
> +[
> +  AC_CHECK_TOOL(GPHOTO2, gphoto2, false)
> +])
> +

> +if test "${ac_cv_prog_GPHOTO2}" = "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)

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.

Bye,
  Henning



More information about the sane-devel mailing list