source: trunk/abcl/src/org/armedbear/lisp/scripting/lisp/config.lisp

Last change on this file was 12927, checked in by astalla, 14 years ago

Fixed JSR-223 breakage: a file was still referring to ext:make-thread instead of threads:make-thread

File size: 2.2 KB
Line 
1;;; config.lisp
2;;;
3;;; Copyright (C) 2008 Alessio Stalla
4;;;
5;;; This program is free software; you can redistribute it and/or
6;;; modify it under the terms of the GNU General Public License
7;;; as published by the Free Software Foundation; either version 2
8;;; of the License, or (at your option) any later version.
9;;;
10;;; This program is distributed in the hope that it will be useful,
11;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
12;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13;;; GNU General Public License for more details.
14;;;
15;;; You should have received a copy of the GNU General Public License
16;;; along with this program; if not, write to the Free Software
17;;; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18;;;
19;;; As a special exception, the copyright holders of this library give you
20;;; permission to link this library with independent modules to produce an
21;;; executable, regardless of the license terms of these independent
22;;; modules, and to copy and distribute the resulting executable under
23;;; terms of your choice, provided that you also meet, for each linked
24;;; independent module, the terms and conditions of the license of that
25;;; module.  An independent module is a module which is not derived from
26;;; or based on this library.  If you modify this library, you may extend
27;;; this exception to your version of the library, but you are not
28;;; obligated to do so.  If you do not wish to do so, delete this
29;;; exception statement from your version.
30
31
32(in-package :abcl-script)
33
34(defparameter *launch-swank-at-startup* nil)
35
36(defparameter *swank-dir* nil)
37
38(defparameter *swank-port* 4005)
39
40(defparameter *use-throwing-debugger* t)
41
42(defun configure-abcl (abcl-script-engine)
43  (when *use-throwing-debugger*
44    (setf *debugger-hook* #'sys::%debugger-hook-function))
45  (when *launch-swank-at-startup*
46    (unless *swank-dir*
47      (error "Swank directory not specified, please set *swank-dir*"))
48    (pushnew *swank-dir* asdf:*central-registry* :test #'equal)
49    (asdf:oos 'asdf:load-op :swank)
50    (threads:make-thread (lambda () (funcall (find-symbol
51            (symbol-name '#:create-server)
52            :swank)
53           :port *swank-port*))
54         :name "ABCL script - Swank thread")))
Note: See TracBrowser for help on using the repository browser.