diff --git a/setup-cffi/source/setup.lisp b/setup-cffi/source/setup.lisp index feb819b4599fc4f59c5f5d3f22753c1edf29cd5e..589e1e68f2517cbe0e051e047b0227a4b6e5a8c4 100644 --- a/setup-cffi/source/setup.lisp +++ b/setup-cffi/source/setup.lisp @@ -1,4 +1,4 @@ -(in-package :cffi) +(when (find-package :cffi) (in-package :cffi)) (defun %exe-path% () #+sbcl (make-pathname :name nil :type nil :defaults sb-ext:*core-pathname*) @@ -6,12 +6,13 @@ #+allegro (translate-logical-pathname "sys:") #+lispworks (make-pathname :name nil :type nil :defaults (first system:*line-arguments-list*))) -(pushnew (merge-pathnames (format nil "dlls/~a/" (if (member :32-bit-host *features*) "32" "64")) - (%exe-path%)) - cffi:*foreign-library-directories*) +(when (find-package :cffi) + (pushnew (merge-pathnames (format nil "dlls/~a/" (if (member :32-bit-host *features*) "32" "64")) + (%exe-path%)) + (symbol-value (read-from-string "cffi:*foreign-library-directories*"))) -(define-foreign-library libeay32 - (:windows "libeay32.dll")) + (define-foreign-library libeay32 + (:windows "libeay32.dll")) -(use-foreign-library libeay32) + (use-foreign-library libeay32))