+
+; Note we are not dealing with OpenMCL's ability to close the library
+; As of v0.13 .dylibs can't be closed but bundles can. See the docs for the latest.
+#+openmcl
+(defmacro load-foreign-library (filename &key module supporting-libraries force-load)
+ (declare (ignore module supporting-libraries force-load))
+ `(let ((path (if (pathnamep ,filename) (namestring ,filename) ,filename)))
+ (when (stringp path)
+ (if (position path *loaded-libraries* :test #'string-equal)
+ t
+ (when (ccl:open-shared-library path)
+ (pushnew path *loaded-libraries*)
+ t)))))
+
+