tm 7.81.
[elisp/tm.git] / TM-CFG
1 ;;; -*-Emacs-Lisp-*-
2 ;;;
3 ;;; $Id: TM-CFG,v 7.10 1996/09/02 15:25:45 morioka Exp morioka $
4 ;;;
5
6 (defvar default-load-path load-path)
7 (setq load-path (append
8                  (mapcar (function
9                           (lambda (path)
10                             (expand-file-name path (getenv "PWD"))
11                             ))
12                          '("." "../tl" "../mu" "../mel" "mh-e")
13                          )
14                  load-path))
15
16 (require 'tl-misc)
17 (require 'install)
18
19
20 ;;; @ Please specify optional package directory if you use them.
21 ;;;
22
23 ;; Please specify VM path.
24 (add-path "vm-5.95beta" 'all-paths)
25
26 ;; Please specify Mailcrypt path.
27 (add-path "mailcrypt-3.4" 'all-paths)
28
29 ;; Please specify BBDB path.
30 (add-path "bbdb-1.50" 'all-paths)
31
32
33 ;;; @ shell
34 ;;;
35
36 ;; Please specify shell command path.
37 (setq SHELL "/bin/sh")
38
39 ;; Please specify shell command option.
40 (setq SHELLOPTION "-c")
41
42
43 ;;; @ Please specify prefix of install directory.
44 ;;;
45
46 ;; Please specify install path prefix.
47 (setq PREFIX
48       (if (or running-emacs-18 running-xemacs)
49           (expand-file-name "../../.." exec-directory)
50         (expand-file-name "../../../.." data-directory)
51         )) ; install to shared directory (maybe "/usr/local")
52 ;;(setq PREFIX "~/")    ; install to your home directory
53
54 ;; Please specify install path prefix for binaries.
55 (setq EXEC_PREFIX
56       (if (or running-emacs-18 running-xemacs)
57           (expand-file-name "../../.." exec-directory)
58         (expand-file-name "../../../.." exec-directory)
59         ))
60
61 ;; Please specify tm package prefix [optional]
62 (setq TM_PACKAGE_PREFIX "")
63
64 ;; Please specify tl prefix [optional]
65 ;;(setq TL_PREFIX "tl")
66 (setq TL_PREFIX
67       (if (string-match "XEmacs" emacs-version)
68           "tl"
69         ""))
70
71 ;; Please specify MU prefix [optional]
72 (setq MU_PREFIX "mu")
73
74 ;; Please specify MEL prefix [optional]
75 (setq MEL_PREFIX "mel")
76
77 ;; Please specify tm prefix [optional]
78 (setq TM_PREFIX "tm")
79
80 ;; lisp files of tm are installed into following directory tree:
81 ;;
82 ;;      LISPDIR = PREFIX/DATA_PREFIX/LISP_PREFIX/
83 ;;      LISPDIR/mime-setup.{el|elc}
84 ;;      LISPDIR/TM_PACKAGE_PREFIX/TL_PREFIX/  --- tl  lisp files
85 ;;      LISPDIR/TM_PACKAGE_PREFIX/MU_PREFIX/  --- MU lisp files
86 ;;      LISPDIR/TM_PACKAGE_PREFIX/MEL_PREFIX/ --- MEL lisp files
87 ;;      LISPDIR/TM_PACKAGE_PREFIX/TM_PREFIX/  --- tm  lisp files
88 ;;
89 ;; For example, if PREFIX = "/usr/local/" and you use Emacs 19.30,
90 ;;
91 ;;      LISPDIR = /usr/local/share/emacs/site-lisp/
92 ;;      /usr/local/share/emacs/site-lisp/mime-setup.{el|elc}
93 ;;      /usr/local/share/emacs/site-lisp/     --- tl  lisp files
94 ;;      /usr/local/share/emacs/site-lisp/mu/  --- MU lisp files
95 ;;      /usr/local/share/emacs/site-lisp/mel/ --- MEL lisp files
96 ;;      /usr/local/share/emacs/site-lisp/tm/  --- tm  lisp files
97 ;;
98 ;; For example, if PREFIX = "~/" and you use XEmacs,
99 ;;
100 ;;      LISPDIR = ~/share/xemacs/site-lisp/
101 ;;      ~/share/xemacs/site-lisp/mime-setup.{el|elc}
102 ;;      ~/share/xemacs/site-lisp/tl/  --- tl  lisp files
103 ;;      ~/share/xemacs/site-lisp/mu/  --- MU  lisp files
104 ;;      ~/share/xemacs/site-lisp/mel/ --- MEL lisp files
105 ;;      ~/share/xemacs/site-lisp/tm/  --- tm  lisp files
106
107
108 ;;; @ executables
109 ;;;
110
111 ;; Please specify binary path.
112 (defvar BIN_DIR (expand-file-name "bin" EXEC_PREFIX))
113
114 ;; Please specify binary path. (for external method scripts)
115 (setq METHOD_DIR (expand-file-name "share/tm" PREFIX))
116
117
118 \f
119
120 ;;; @ optional settings
121 ;;;
122
123 (setq LISP_PREFIX
124       (if (>= emacs-major-version 19)
125           "site-lisp"
126         "local.lisp"))
127
128 (defvar LISPDIR
129   (or
130    (catch 'tag
131      (let ((rest default-load-path)
132            dir)
133        (while (setq dir (car rest))
134          (if (string-match
135               (concat
136                "^" (expand-file-name (concat ".*/" LISP_PREFIX) PREFIX) "$")
137               dir)
138              (or (string-match (format "%d\\.%d"
139                                        emacs-major-version
140                                        emacs-minor-version) dir)
141                  (throw 'tag dir)
142                  ))
143          (setq rest (cdr rest))
144          )))
145    (expand-file-name (concat
146                       (if running-emacs-19_29-or-later
147                           "share/"
148                         "lib/")
149                       (cond ((boundp 'NEMACS) "nemacs/")
150                             ((boundp 'MULE)   "mule/")
151                             (running-xemacs
152                              (if (featurep 'mule)
153                                  "xmule/"
154                                "xemacs/"))
155                             (t "emacs/"))
156                       LISP_PREFIX) PREFIX)
157    ))
158
159 ;; Please specify mime-setup.{el|elc} install path.
160 (setq SETUP_FILE_DIR LISPDIR)
161
162 (setq TM_LISPDIR (expand-file-name TM_PACKAGE_PREFIX LISPDIR))
163
164 (setq TL_DIR (expand-file-name TL_PREFIX TM_LISPDIR))
165 (setq MU_DIR (expand-file-name MU_PREFIX TM_LISPDIR))
166 (setq MEL_DIR (expand-file-name MEL_PREFIX TM_LISPDIR))
167 (setq TM_KERNEL_DIR (expand-file-name TM_PREFIX TM_LISPDIR))
168 (setq TM_MHE_DIR TM_KERNEL_DIR)
169 (setq TM_GNUS_DIR TM_KERNEL_DIR)
170
171 (cond ((member LISPDIR default-load-path)
172        (if (string-equal TM_PACKAGE_PREFIX "")
173            (setq TL_RELATIVE_DIR TL_PREFIX
174                  MU_RELATIVE_DIR MU_PREFIX
175                  MEL_RELATIVE_DIR MEL_PREFIX
176                  TM_KERNEL_RELATIVE_DIR TM_PREFIX
177                  )
178          (setq TL_RELATIVE_DIR
179                (concat (file-name-as-directory TM_PACKAGE_PREFIX) TL_PREFIX))
180          (setq MU_RELATIVE_DIR
181                (concat (file-name-as-directory TM_PACKAGE_PREFIX) MU_PREFIX))
182          (setq MEL_RELATIVE_DIR
183                (concat (file-name-as-directory TM_PACKAGE_PREFIX) MEL_PREFIX))
184          (setq TM_KERNEL_RELATIVE_DIR
185                (concat (file-name-as-directory TM_PACKAGE_PREFIX) TM_PREFIX))
186          ))
187       ((string-match (concat "^" (regexp-quote (expand-file-name "~/")))
188                      LISPDIR)
189        (setq TL_RELATIVE_DIR (concat "~/" (file-relative-name TL_DIR "~/")))
190        (setq MU_RELATIVE_DIR (concat "~/" (file-relative-name MU_DIR "~/")))
191        (setq MEL_RELATIVE_DIR (concat "~/" (file-relative-name MEL_DIR "~/")))
192        (setq TM_KERNEL_RELATIVE_DIR
193              (concat "~/" (file-relative-name TM_KERNEL_DIR "~/")))
194        )
195       (t
196        (setq TL_RELATIVE_DIR TL_DIR)
197        (setq MU_RELATIVE_DIR MU_DIR)
198        (setq MEL_RELATIVE_DIR MEL_DIR)
199        (setq TM_KERNEL_RELATIVE_DIR TM_KERNEL_DIR)
200        ))
201 (setq TM_MHE_RELATIVE_DIR TM_KERNEL_RELATIVE_DIR)
202 (setq TM_GNUS_RELATIVE_DIR TM_KERNEL_RELATIVE_DIR)
203
204 (setq TM_GNUS_INSTALL_FORMAT
205       "cd gnus; PWD=`pwd` make install-19 EMACS=%s TMDIR19=%s")
206 (setq TM_GNUS_COMPILE ".gnus-compile")
207 (setq MAKE "make")
208
209 (setq el-file-mode (+ (* 64 6)(* 8 4) 4))
210
211
212 (setq BIN_SRC_DIR "src")
213 (setq BINS '("ol2" "decode-b"))
214 (setq METHOD_SRC_DIR "methods")
215 (setq METHODS
216       '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg" "tm-plain"
217         "tmdecode"))