Re: [dev] sane-config questions

From: Henning Meier-Geinitz (hmg-ml@gmx.de)
Date: Sun Apr 08 2001 - 07:44:49 PDT

  • Next message: mh: "Re: [dev] New and updated backends (pnm patch)"

    Hi,

    On Sun, Apr 08, 2001 at 03:16:04PM +0200, Oliver Rauch wrote:
    > > 1. The name of the installed file is sane-config, however
    > > sane-config --help talks about "sane-backends-config". Probably
    > > because of the change of the package name. Should we just hardcode
    > > the name to sane-config?
    >
    > Yes, I suggest we keep the name "sane-config".
     
    Ok, I will change this.

    > > 3. TODO talks about "--exec-prefix=" and "--prefix=". Is this for
    > > sane-config? The help message says that sane-config has these
    > > options and they seem to work? What is this entry talking about?
    >
    > gtk and gimp have this option to overwrite the stored paths
    > when the administrator moved the packages. I think we should
    > make sane-config to work conform to gtk- and gimp-config.

    I see. So --prefix prints the current prefix and --prefix=... sets it
    to a new value? I'm asking because I try to write a test for configure
    to test for SANE already installed on the system at a different prefix.
    Something like:

    AC_PATH_PROG(SANE_CONFIG_PATH, sane-config, no)
    AC_CHECK_HEADER(sane/sane.h, SANE_H_EXISTS="yes")

    [...]

    if test "$SANE_CONFIG_PATH" != "no" ; then
      SANE_INSTALLED_VERSION=$SANE_CONFIG_PATH --version
      SANE_INSTALLED_PREFIX=$SANE_CONFIG_PATH --prefix
      if test "$SANE_INSTALLED_PREFIX" != "$prefix" ; then
        echo "*** WARNING: SANE is already installed (version $SANE_INSTALLED_VERSION). The old"
        echo "*** installation is at $SANE_INSTALLED_PREFIX while it will now be installed"
        echo "*** at $prefix. It is recommended to uninstall"
        echo "*** the old SANE version before installing the new one to avoid problems."
      fi
      else
        if test "$SANE_H_EXISTS" = "yes" ; then
          echo "*** Warning: An old version of SANE was detected."
        fi
      fi

    I don't know yet how to detect the prefix of older versions of SANE
    that don't come with sane-config...

    Bye,
      Henning

    --
    Source code, list archive, and docs: http://www.mostang.com/sane/
    To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com
    



    This archive was generated by hypermail 2b29 : Sun Apr 08 2001 - 07:28:42 PDT