chiark / gitweb /
Removed comment out code
[clg] / glib / glib.asd
CommitLineData
f11b84f6 1;;; -*- Mode: lisp -*-
2
3(asdf:oos 'asdf:load-op :clg-tools)
4
5(defpackage "GLIB-SYSTEM"
9adccb27 6 (:use "COMMON-LISP" "ASDF" "PKG-CONFIG"))
f11b84f6 7
73572c12 8#+cmu(ext:unlock-all-packages)
9#+sbcl
10(progn
11 (sb-ext:unlock-package "COMMON-LISP")
12 (sb-ext:unlock-package "SB-PCL"))
f11b84f6 13
14;;; Better put this in ~/.cmucl-init.lisp or some other file read at startup
15;; (setf
16;; (logical-pathname-translations "clg")
17;; '(("**;*.*.*" "/home/espen/src/clg/**/")))
18
f11b84f6 19(in-package "GLIB-SYSTEM")
20
21(pkg-exists-p "glib-2.0" :atleast-version "2.4.0")
22
5cc9b9e3 23(when (pkg-exists-p "glib-2.0" :atleast-version "2.6.0" :error nil)
56a1f31a 24 (push :glib2.6 *features*))
f11b84f6 25
5cc9b9e3 26(when (pkg-exists-p "glib-2.0" :atleast-version "2.8.0" :error nil)
89b927ec 27 (push :glib2.8 *features*))
28
65466e9c 29#+sbcl
46e84256 30(progn
5cc9b9e3 31 (when (sbcl>= 0 9 8)
46e84256 32 (push :sbcl>=0.9.8 *features*))
5cc9b9e3 33 (when (sbcl>= 0 9 10)
46e84256 34 (push :sbcl>=0.9.10 *features*)))
65466e9c 35
f204f1f5 36#+(and sbcl (not alien-callbacks))
37(eval-when (:compile-toplevel :load-toplevel :execute)
38 (unless (find-symbol "DEFINE-ALIEN-FUNCTION" "SB-ALIEN")
39 (error "You need to upgrade SBCL to a version with native C callback support or see the README file about how to add third party callbacks to your current SBCL version.")))
40
41#+(and sbcl alien-callbacks)
42(eval-when (:compile-toplevel :load-toplevel :execute)
43 (when (find-symbol "DEFINE-ALIEN-FUNCTION" "SB-ALIEN")
44 (error "Third party C callback code detected in a SBCL image with native callback support. As clg now uses native callbacks when available, you need to use a \"clean\" core file.")))
45
46
f11b84f6 47(defsystem glib
48 :depends-on (clg-tools)
49 :components ((:file "defpackage")
2518e203 50 #+(and cmu (not non-broken-pcl) (not cmu19b))(:file "pcl")
56a1f31a 51 ;; For preloading to work in glib 2.6, the library needs to
52 ;; be configured and build with '--disable-visibility'
53 (:unix-dso "preload"
54 :components ((:c-source-file "logging"
55 :cflags #.(pkg-cflags "glib-2.0"))))
a3259739 56 (:library "libglib-2.0"
56a1f31a 57 :libdir #.(pkg-variable "glib-2.0" "libdir")
58 :depends-on ("preload"))
a3259739 59 (:library "libgobject-2.0"
60 :libdir #.(pkg-variable "glib-2.0" "libdir")
61 :depends-on ("libglib-2.0"))
73572c12 62 (:unix-dso "alien"
63 :components ((:c-source-file "callback"
64 :cflags #.(pkg-cflags "glib-2.0"))
65 (:c-source-file "gobject"
66 :cflags #.(pkg-cflags "glib-2.0")))
67 :depends-on ("libgobject-2.0"))
f11b84f6 68 (:file "utils" :depends-on ("defpackage"))
a3259739 69 (:file "ffi" :depends-on ("utils"))
70 (:file "glib" :depends-on ("ffi" "libglib-2.0"))
2518e203 71 (:file "proxy" :depends-on (#+(and cmu (not non-broken-pcl) (not cmu19b))"pcl" "glib"))
73572c12 72 (:file "gtype" :depends-on ("proxy" "alien" "libgobject-2.0"))
f11b84f6 73 (:file "gboxed" :depends-on ("gtype"))
74 (:file "genums" :depends-on ("gtype"))
75 (:file "gparam" :depends-on ("genums"))
f11b84f6 76 (:file "gobject" :depends-on ("gparam"))
a3259739 77 (:file "ginterface" :depends-on ("gobject"))
f11b84f6 78 (:file "gcallback" :depends-on ("gtype" "gparam" "gobject" "alien"))
56a1f31a 79 (:file "gerror" :depends-on ("gcallback"))
80 (:file "export" :depends-on ("utils" "glib" "proxy" "gboxed" "gtype" "gparam" "gcallback" "genums" "gobject" "gerror"))))