Hi,
I am the author of the cl-cairo2 library. Cairo itself is a graphics library, and my library provides a Lisp interface.
Some of the features (eg drawing in X11, Windows or Quartz) are platform dependent. Currently, the approach of cl-cairo2 is to provide extra system definitions for these, eg an X11 user would load the systems cl-cairo2 and cl-cairo2-x11 manually. I am wondering if there is a better way to do platform-dependent loading.
The solution I was thinking of was to try loading the platform dependent shared C libraries using CFFI, and set some flag (or push something to *features*) if they succeed, but if they fail, capture the condition with handler-case and just proceed with a warning. Then I could load platform-dependent code conditionally on this --- but I don't know how to do that in ASDF.
Please tell me what is the "right way" to do these things (ie stuff that I put in features). Examples of libraries that load platform-dependent code conditionally with ASDF would also help.
Thanks,
Tamas