File: config.lisp

package info (click to toggle)
fricas 1.3.12-1
  • links: PTS
  • area: main
  • in suites:
  • size: 119,116 kB
  • sloc: lisp: 636,617; ansic: 35,377; sh: 4,871; makefile: 2,511; javascript: 1,381; awk: 1,363; python: 113
file content (42 lines) | stat: -rw-r--r-- 1,375 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
(defun get-version-number ()
    (let* ((ver (lisp-implementation-version))
           (pos (position-if #'digit-char-p ver)))
          ;;; First strip leading and trailing garbage
          (if pos (setf ver (subseq ver pos))
                  (return-from get-version-number 'bad-version-string))
          (setf pos (position #\Space ver))
          (if pos (setf ver (subseq ver 0 pos)))
          ver))

(with-open-file (out "config_cl.out"
                     :direction :output
                     :if-does-not-exist :create
                     :if-exists :supersede)
    (format out "fricas_fasl_type=~a~&"
        (pathname-type (compile-file-pathname "foo.lisp")))

    (format out "fricas_lisp_flavor=~a~&"
        #+:gcl "gcl"
        #+:ecl "ecl"
        #+:openmcl "openmcl"
        #+:sbcl "sbcl"
        #+:clisp "clisp"
        #+:poplog "poplog"
        #+:cmu    "cmucl"
        #+:lispworks "lispworks"
        #+:abcl "abcl"
        #-(or :gcl :ecl :openmcl :sbcl :clisp :poplog :cmu :lispworks :abcl) "unknown"
    )
    #+:clisp
    (if (not (find-package "FFI"))
        (format out "fricas_clisp_no_ffi"))
    (let ((ver (get-version-number)))
         (if (eq ver 'bad-version-string)
             (format t "Unable to determine version")
             (format out "fricas_lisp_version=~a~&" ver)))
)

#+:poplog
(pop11::sysexit)
#-:poplog
(quit)