;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: compress.lisp,v 1.1 2002/09/30 10:02:36 kevin Exp $
+;;;; $Id: compress.lisp,v 1.2 2002/12/03 06:58:39 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(in-package :cl-user)
-(unless (uffi:load-foreign-library
- (uffi:find-foreign-library
- "libz"
- '("/usr/local/lib/" "/usr/lib/" "/zlib/")
- :types '("so" "a" "dylib"))
- :module "zlib"
- :supporting-libraries '("c"))
- (warn "Unable to load zlib"))
-
+(eval-when (:load-toplevel :execute)
+ (unless (uffi:load-foreign-library
+ #-(or macosx darwin)
+ (uffi:find-foreign-library
+ "libz"
+ '("/usr/local/lib/" "/usr/lib/" "/zlib/")
+ :types '("so" "a"))
+ #+(or macosx darwin)
+ (uffi:find-foreign-library "z"
+ `(,(pathname-directory *load-pathname*)))
+ :module "zlib"
+ :supporting-libraries '("c"))
+ (warn "Unable to load zlib")))
+
(uffi:def-function ("compress" c-compress)
((dest (* :unsigned-char))
(destlen (* :long))