to make things a bit nicer, you could *additionally* search for
"s4pd/s4pd.scm", and only bail out if neither of the two can be found.
you could also check how other language bindings do this, e.g. [tclpd]
or [pdlua]
(both of which somehow try to get the path of the library file, and then
use that to load their auxiliary scripts)
Yeah, I think this is the best option and it's what I was suggesting Ian to do. The [s4pd] can be easily loaded without declare if it resides in a folder also called "s4pd" in "externals", cause Pd just searches inside folders with the same name as the object.
Hence, if the object also looks for these needed files on the same folder, it's as simple as can be.
Moreover, other files that you open with [s4pd] (specific scripts) can follow the same usual way of searching for them in the same folder as the patch, and in the user added paths (also being able to specify subfolders and whatnot via "folde/" prefixes and stuff)