fixed ystream newline handling, thanks to Ivan Shvedunov
[closure-common.git] / closure-common.asd
blob8d87215e04e520b435d0dbf31787c13e7b90da6e
1 (defpackage :closure-common-system
2   (:use :asdf :cl)
3   (:export #:*utf8-runes-readtable*))
5 (in-package :closure-common-system)
7 (defvar *utf8-runes-readtable*)
9 (defclass closure-source-file (cl-source-file) ())
11 #+sbcl
12 (defmethod perform :around ((o compile-op) (s closure-source-file))
13   ;; shut up already.  Correctness first.
14   (handler-bind ((sb-ext:compiler-note #'muffle-warning))
15     (let (#+sbcl (*compile-print* nil))
16       (call-next-method))))
18 (progn
19   (format t "~&;;; Checking for wide character support...")
20   (force-output)
21   (flet ((test (code)
22            (and (< code char-code-limit) (code-char code))))
23     (cond
24       ((not (test 50000))
25        (format t " no, reverting to octet strings.~%")
26        #+rune-is-character
27        (error "conflicting unicode configuration.  Please recompile.")
28        (pushnew :rune-is-integer *features*))
29       ((code-char 70000)
30        (when (test #xD800)
31          (format t " WARNING: Lisp implementation doesn't use UTF-16, ~
32                      but accepts surrogate code points.~%"))
33        (format t " yes, using code points.~%")
34        #+(or rune-is-integer rune-is-utf-16)
35        (error "conflicting unicode configuration.  Please recompile.")
36        (pushnew :rune-is-character *features*))
37       (t
38        (format t " yes, using UTF-16.~%")
39        #+(or rune-is-integer (and rune-is-character (not rune-is-utf-16)))
40        (error "conflicting unicode configuration.  Please recompile.")
41        (pushnew :rune-is-utf-16 *features*)
42        (pushnew :rune-is-character *features*)))))
44 #-rune-is-character
45 (format t "~&;;; Building Closure with (UNSIGNED-BYTE 16) RUNES~%")
47 #+rune-is-character
48 (format t "~&;;; Building Closure with CHARACTER RUNES~%") 
50 (defsystem :closure-common
51     :default-component-class closure-source-file
52     :serial t
53     :components
54     ((:file "package")
55      (:file "definline")
56      (:file runes
57             :pathname
58              #-rune-is-character "runes"
59              #+rune-is-character "characters")
60      #+rune-is-integer (:file "utf8")
61      (:file "syntax")
62      #-x&y-streams-are-stream (:file "encodings")
63      #-x&y-streams-are-stream (:file "encodings-data")
64      #-x&y-streams-are-stream (:file "xstream")
65      #-x&y-streams-are-stream (:file "ystream")
66      #+x&y-streams-are-stream (:file #+scl "stream-scl")
67      (:file "hax"))
68     :depends-on (#-scl :trivial-gray-streams
69                        #+rune-is-character :babel))