|
Revision 2636, 0.9 kB
(checked in by hans, 10 months ago)
|
add cl-pdf for pixel->pdf converter
|
| Line | |
|---|
| 1 |
;;; cl-pdf copyright 2002-2003 Marc Battyani see license.txt for the details |
|---|
| 2 |
;;; You can reach me at marc.battyani@fractalconcept.com or marc@battyani.net |
|---|
| 3 |
;;; The homepage of cl-pdf is here: http://www.fractalconcept.com/asp/html/cl-pdf.html |
|---|
| 4 |
|
|---|
| 5 |
(in-package #:pdf) |
|---|
| 6 |
|
|---|
| 7 |
(defvar *zlib-loaded* nil) |
|---|
| 8 |
|
|---|
| 9 |
(eval-when (:compile-toplevel :load-toplevel :execute) |
|---|
| 10 |
(defun find-zlib-path* (name) |
|---|
| 11 |
(uffi:find-foreign-library |
|---|
| 12 |
name |
|---|
| 13 |
*zlib-search-paths* |
|---|
| 14 |
:drive-letters '("C" "D" "E") |
|---|
| 15 |
:types '("so" "a" "dll" "dylib"))) |
|---|
| 16 |
|
|---|
| 17 |
(defun find-zlib-path () |
|---|
| 18 |
(or (find-zlib-path* "libz") |
|---|
| 19 |
(find-zlib-path* "zlib1")))) |
|---|
| 20 |
|
|---|
| 21 |
#+(or cmu sbcl) |
|---|
| 22 |
(eval-when (:compile-toplevel :load-toplevel :execute) |
|---|
| 23 |
(let ((zlib-path (find-zlib-path))) |
|---|
| 24 |
(when zlib-path |
|---|
| 25 |
(format t "~&;;; Loading ~s" zlib-path) |
|---|
| 26 |
(uffi:load-foreign-library zlib-path |
|---|
| 27 |
:module "zlib" |
|---|
| 28 |
:supporting-libraries '("c"))))) |
|---|
| 29 |
|
|---|