On Wed, May 5, 2021 at 2:52 PM Marc Nieper-Wißkirchen <xxxxxx@nieper-wisskirchen.de> wrote

You can only do `(import (foo bar))' if you have your library installed where your Scheme implementation can find it. So you need to have knowledge about your Scheme outside of the cond-expand.

I think all Schemes will look in the current directory as well, which is what I depend on.   But you are right that knowing where to put the library file has to be external to Scheme.
Of course, with cond-expand built into define-library, for most Schemes, you just need 'cp' or 'mv' to install or adapt your code to a particular Scheme.

Many R[67]RS systems have copied Vicare and Chibi respectively, yes: they check the library search path for foo/bar.sld.  But Chicken looks for foo.bar.sld instead, Guile for foo/bar.scm, etc.  These rules are normally not configurable for any one Scheme. Furthermore, as I pointed out, the interpretation of relative paths in `include` is also not always the same as Chibi's.