chiark
/
gitweb
/
~mdw
/
clg
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed to use of settable FOREIGN-LOCATION
[clg]
/
tools
/
config.lisp
diff --git
a/tools/config.lisp
b/tools/config.lisp
index 1623a575163fe63b05d37fdf3ef459991ad1cb0f..ffe8cfaf9d5b6e75623397781ae2d3f2834c7c8a 100644
(file)
--- a/
tools/config.lisp
+++ b/
tools/config.lisp
@@
-1,4
+1,11
@@
-(defparameter *pkg-config* "pkg-config")
+(defpackage #:pkg-config
+ (:use #:common-lisp #+cmu #:ext #+sbcl #:sb-ext)
+ (:export #:pkg-cflags #:pkg-libs #:pkg-exists-p #:pkg-version
+ #:pkg-variable))
+
+(in-package #:pkg-config)
+
+(defparameter *pkg-config* "/usr/bin/pkg-config")
(defun split-string (string &key (start 0) (end (length string)))
(let ((position (position #\sp string :start start :end end)))
(defun split-string (string &key (start 0) (end (length string)))
(let ((position (position #\sp string :start start :end end)))
@@
-56,6
+63,9
@@
(defun run-pkg-config (package error &rest options)
(defun pkg-cflags (package)
(split-string (first (run-pkg-config package t "--cflags"))))
(defun pkg-cflags (package)
(split-string (first (run-pkg-config package t "--cflags"))))
+(defun pkg-libs (package)
+ (split-string (first (run-pkg-config package t "--libs"))))
+
(defun pkg-exists-p (package &key version atleast-version max-version
( error t))
(defun pkg-exists-p (package &key version atleast-version max-version
( error t))