Werner LEMBERG <[email protected]> writes:

>> I have no beef with deprecating it.
>
> What about the following route?  For guile, I would add support for
> `guile-config`, using the following algorithm (with itemĀ 1 already
> implemented).
>
>  1. Search for a guile `.pc` file, checking whether version 1.8.x,
>     2.2.x, or 2.0.x is present (in this order).
>
>     If a specific guile version is needed, set the `GUILE_FLAVOR`
>     environment variable, for example
>
>       ./configure GUILE_FLAVOR="guile-2.2"
>
>     (possible values for `GUILE_FLAVOR` are `guile-1.8`, `guile-2.0`,
>     `guile-2.2`, and `guile-3.0`).  If you want to use guile-3.0, you
>     currently *must* use `GUILE_FLAVOR`.
>
>  2. If nothing is found, try to execute `guile-config` (which must be
>     in the path) to get the necessary compilation and linking flags.

The real problem case is not where nothing is found.  The real problem
case is where the wrong version is found, GUILE_CONFIG is ignored, and
the user is not notified.  So assuming GUILE_CONFIG is set, that should
be tried in preference to a .pc file, giving a warning (an error would
be a nuisance when trying to have a common configuration for both 2.20
and 2.21, a consideration that will not really be relevant any more for
2.22 and 2.23).

>  3. Abort if this fails, too.

If I understand correctly, pkg-config is used for a number of
packages/libraries.  So a selection mechanism/scheme that is not
specific to Guile for adding pkg-config directories and selecting
specific versions of specific packages seems like a reasonable idea as
that would also enable selecting/pinning specific versions of, say,
Freetype.

I'll try cooking something generic enough up that is also a reasonable
candidate for being listed in ./configure --help as well as the
installation instructions.

-- 
David Kastrup

Reply via email to