+;; With
+;; (let ((version-check
+;; (cond
+;; (version (format nil "= ~A" version))
+;; (atleast-version (format nil ">= ~A" atleast-version))
+;; (max-version (format nil "<= ~A" max-version))
+;; (t ""))))
+;; ...)
+;; when running
+;; (PKG-EXISTS-P "glib-2.0" :ATLEAST-VERSION "2.4.0" :ERROR T)
+;; the EXIT-CODE in RUN-PKG-CONFIG will be 1 on ms windows and 0 on linux
+
+;; Both on ms windows and linux
+;; "pkg-config glib-2.0 --print-errors -exists >=2.4.0" is O.K. but
+;; "pkg-config glib-2.0 --print-errors -exists >= 2.4.0" prints out
+;; an error message.
+;; However,
+;; "pkg-config glib-2.0 --print-errors -exists =2.12.11" prints out
+;; an error message but
+;; "pkg-config glib-2.0 --print-errors -exists = 2.12.11" is O.K.
+;; We can get around this problem by using
+;; (let ((version-check
+;; (cond
+;; (version (format nil "--exact-version=~A" version))
+;; (atleast-version (format nil "--atleast-version=~A" atleast-version))
+;; (max-version (format nil "--max-version=~A" max-version))
+;; (t ""))))
+;; ...)
+;; - cph 17-May-2007
+
+;; Could the problem with --exists on win32 be caused by improper quoting?
+;; Since --exact-version, --atleast-version and --max-version doesn't print
+;; any error message, we stick to --exists on non Win32 platforms.
+;; - esj 2007-06-14
+
+
+;; --fix: in win32 sbcl
+;; (pkg-exists-p "glib-2.0" :version "3.12.11" :error t)
+;; will hang indefinitely. - cph 17-May-2007
+
+(defun pkg-exists-p (package &key version atleast-version max-version error)