+(defun default-foreign-library-type ()
+ "Returns string naming default library type for platform"
+ #+(or win32 mswindows) "dll"
+ #+freebsd "a"
+ #+linux "so")
+
+(defun find-foreign-library (name &key directories type)
+ "Looks for a foreign library. directories can be a single
+string or a list of strings of candidate directories. Use default
+library type if type is not specified."
+ (unless type
+ (setq type (default-foreign-library-type)))
+ (unless (listp directories)
+ (setq directories (list directories)))
+ (dolist (dir directories)
+ (let ((path (make-pathname :name :type type :directory directory)))
+ (when (probe-file path)
+ (return path))))
+ nil)
+
+
+(defun load-foreign-library (filename &key module supporting-libraries
+ force-load)