On Wed, Dec 23, 2009 at 1:11 AM, Luke J Crook luke@balooga.com wrote:
lispbuilder-sdl and lispbuilder-sdl-ttf conditionally load different CFFI forms depending on the availability of a particular library.
[...]
Is there a mechanism in CFFI to enable this if define-foreign-library cannot be used?
If you really want it to signal an error, you could add a clause such as (t (:or)). E.g.:
(define-foreign-library sdl-glue (:windows "lispbuilder-sdl-glue.dll") (t (:or)))
In this case, I suppose you could also do something like:
(defparameter *glue-loaded-p* #+windows t #-windows nil)
Or, perhaps even better:
(defparameter *glue-loaded-p* (foreign-library-loaded-p 'sdl-glue))