(mime-editor/version): fixed.
[elisp/tm.git] / TM-CFG
1 ;;; -*-Emacs-Lisp-*-
2
3 ;; TM-CFG: installation setting about tm-oomori.
4
5 ;;; Code:
6
7 (defvar default-load-path load-path)
8 (setq load-path (append
9                  (mapcar (function
10                           (lambda (path)
11                             (expand-file-name path default-directory)
12                             ))
13                          '("." "../apel" "../tl" "../bitmap-mule"
14                            "../mu" "../flim"
15                            "../tm-mh-e" "../gnus-mime" "../tm-gnus"
16                            "../tm-mail" "../tm-vm")
17                          )
18                  load-path))
19
20 (require 'tl-misc)
21 (require 'install)
22
23
24 ;;; @ Please specify optional package directory if you use them.
25 ;;;
26
27 ;; It is only necessary to use `add-path' if these packages are not
28 ;; already on the standard load-path of Emacs.
29
30 ;; Function `get-latest-path' detect latest version of such package
31 ;; under load-path directories. If you want to use a version of a
32 ;; package instead of latest version, please specify by argument of
33 ;; function `add-path'.
34
35 ;; Function `add-path' finds path under load-path directories. If a
36 ;; package does not exist in load-path, please specify by absolutely
37 ;; (`~/' is available), for example
38 ;;      (add-path "~/lib/elisp/mailcrypt-3.4")
39 ;; or
40 ;;      (add-path "/opt/share/xmule/site-lisp/mailcrypt-3.4")
41
42 ;;; @@ Please specify VM path.
43 ;;;
44
45 ;; Use latest version installed in load-path.
46
47 (let ((path (get-latest-path "vm" 'all-paths)))
48   (if path
49       (add-path path)
50     ))
51
52 ;; Or please specify path.
53 ;; (add-path "vm-5.95beta" 'all-paths)
54
55
56 ;;; @@ Please specify Mailcrypt path.
57 ;;;
58
59 ;; Use latest version installed in load-path.
60
61 (let ((path (get-latest-path "mailcrypt" 'all-paths)))
62   (if path
63       (add-path path)
64     ))
65
66 ;; Or please specify path.
67 ;; (add-path "mailcrypt-3.4" 'all-paths)
68
69
70 ;;; @@ Please specify BBDB path.
71 ;;;
72
73 (let ((path (get-latest-path "bbdb" 'all-paths)))
74   (if path
75       (add-path path)
76     ))
77
78 ;; Or please specify path.
79 ;; (add-path "bbdb-1.50" 'all-paths)
80
81
82 ;;; @ shell
83 ;;;
84
85 ;; Please specify shell command path.
86 (setq SHELL
87       (find-if (function file-exists-p)
88                '("/bin/sh" "/usr/bin/sh")
89                ))
90
91 ;; Please specify shell command option.
92 (setq SHELLOPTION "-c")
93
94
95 ;;; @ Please specify prefix of install directory.
96 ;;;
97
98 ;; Please specify install path prefix.
99 ;; If it is omitted, shared directory (maybe /usr/local is used).
100 (defvar PREFIX install-prefix)
101 ;;(setq PREFIX "~/")
102
103 ;; Please specify install path prefix for binaries.
104 (defvar EXEC_PREFIX
105   (if (or running-emacs-18 running-xemacs)
106       (expand-file-name "../../.." exec-directory)
107     (expand-file-name "../../../.." exec-directory)
108     ))
109
110 ;; Please specify emu prefix [optional]
111 (setq EMU_PREFIX
112       (if (string-match "XEmacs" emacs-version)
113           "emu"
114         ""))
115
116 ;; Please specify emu prefix [optional]
117 (setq APEL_PREFIX
118       (if (string-match "XEmacs" emacs-version)
119           "apel"
120         ""))
121
122 ;; Please specify tl prefix [optional]
123 ;;(setq TL_PREFIX "tl")
124 (setq TL_PREFIX
125       (if (string-match "XEmacs" emacs-version)
126           "tl"
127         ""))
128
129 ;; Please specify prefix for ``bitmap-mule'' [optional]
130 (setq BITMAP_PREFIX "bitmap")
131
132 ;; Please specify MU prefix [optional]
133 (setq MU_PREFIX "mu")
134
135 ;; Please specify FLIM prefix [optional]
136 (setq FLIM_PREFIX "flim")
137
138 ;; Please specify tm prefix [optional]
139 (setq TM_PREFIX "tm")
140
141 ;; lisp files of tm are installed into following directory tree:
142 ;;
143 ;;      <LISPDIR> = <PREFIX>/DATA_PREFIX/<install-elisp-prefix>/
144 ;;      <LISPDIR>/mime-setup.{el|elc}
145 ;;      <LISPDIR>/<TL_PREFIX>/          --- tl lisp files
146 ;;      <LISPDIR>/<BITMAP_PREFIX>/      --- bitmap lisp files
147 ;;      <LISPDIR>/<MU_PREFIX>/          --- MU lisp files
148 ;;      <LISPDIR>/<MEL_PREFIX>/         --- MEL lisp files
149 ;;      <LISPDIR>/<TM_PREFIX>/          --- tm lisp files
150 ;;
151 ;; For example, if <PREFIX> = "/usr/local" and you use Emacs 19.34,
152 ;;
153 ;;      <LISPDIR> = /usr/local/share/emacs/site-lisp/
154 ;;      /usr/local/share/emacs/site-lisp/mime-setup.{el|elc}
155 ;;      /usr/local/share/emacs/site-lisp/       --- tl  lisp files
156 ;;      /usr/local/share/emacs/site-lisp/mu/    --- MU lisp files
157 ;;      /usr/local/share/emacs/site-lisp/mel/   --- MEL lisp files
158 ;;      /usr/local/share/emacs/site-lisp/tm/    --- tm  lisp files
159 ;;
160 ;; For example, if <PREFIX> = "~/" and you use XEmacs,
161 ;;
162 ;;      <LISPDIR> = ~/share/xemacs/site-lisp/
163 ;;      ~/lib/xemacs/site-lisp/mime-setup.{el|elc}
164 ;;      ~/lib/xemacs/site-lisp/tl/  --- tl  lisp files
165 ;;      ~/lib/xemacs/site-lisp/mu/  --- MU  lisp files
166 ;;      ~/lib/xemacs/site-lisp/mel/ --- MEL lisp files
167 ;;      ~/lib/xemacs/site-lisp/tm/  --- tm  lisp files
168
169
170 ;;; @ executables
171 ;;;
172
173 ;; Please specify binary path.
174 (defvar BIN_DIR (expand-file-name "bin" EXEC_PREFIX))
175
176 ;; Please specify binary path. (for external method scripts)
177 (setq METHOD_DIR (expand-file-name "share/tm" PREFIX))
178
179
180 \f
181
182 ;;; @ optional settings
183 ;;;
184
185 ;; It is generated by automatically. Please set variable `PREFIX'.
186 ;; If you don't like default directory tree, please set it.
187 (defvar LISPDIR (install-detect-elisp-directory PREFIX))
188 ;; (setq install-default-elisp-directory "~/lib/emacs/lisp")
189
190 (setq EMU_DIR
191       (expand-file-name
192        EMU_PREFIX
193        (install-detect-elisp-directory PREFIX nil 'version-specific)))
194
195 ;; Please specify mime-setup.{el|elc} install path.
196 (setq SETUP_FILE_DIR LISPDIR)
197
198 (setq APEL_DIR          (expand-file-name APEL_PREFIX   LISPDIR))
199 (setq TL_DIR            (expand-file-name TL_PREFIX     LISPDIR))
200 (setq BITMAP_DIR        (expand-file-name BITMAP_PREFIX LISPDIR))
201 (setq MU_DIR            (expand-file-name MU_PREFIX     LISPDIR))
202 (setq FLIM_DIR          (expand-file-name FLIM_PREFIX   LISPDIR))
203 (setq TM_KERNEL_DIR     (expand-file-name TM_PREFIX     LISPDIR))
204 (setq TM_MHE_DIR        TM_KERNEL_DIR)
205 (setq TM_GNUS_DIR       TM_KERNEL_DIR)
206 (setq Gnus_MIME_DIR     TM_KERNEL_DIR)
207 (setq TM_MAIL_DIR       TM_KERNEL_DIR)
208 (setq TM_VM_DIR         TM_KERNEL_DIR)
209
210 (cond ((member LISPDIR default-load-path)
211        (setq APEL_RELATIVE_DIR          APEL_PREFIX)
212        (setq TL_RELATIVE_DIR            TL_PREFIX)
213        (setq BITMAP_RELATIVE_DIR        BITMAP_PREFIX)
214        (setq MU_RELATIVE_DIR            MU_PREFIX)
215        (setq FLIM_RELATIVE_DIR          FLIM_PREFIX)
216        (setq TM_KERNEL_RELATIVE_DIR     TM_PREFIX)
217        )
218       ((string-match (concat "^" (regexp-quote (expand-file-name "~/")))
219                      LISPDIR)
220        (setq APEL_RELATIVE_DIR
221              (concat "~/" (file-relative-name APEL_DIR "~/"))
222              )
223        (setq TL_RELATIVE_DIR
224              (concat "~/" (file-relative-name TL_DIR "~/"))
225              )
226        (setq BITMAP_RELATIVE_DIR
227              (concat "~/" (file-relative-name BITMAP_DIR "~/"))
228              )
229        (setq MU_RELATIVE_DIR
230              (concat "~/" (file-relative-name MU_DIR "~/"))
231              )
232        (setq FLIM_RELATIVE_DIR
233              (concat "~/" (file-relative-name FLIM_DIR "~/"))
234              )
235        (setq TM_KERNEL_RELATIVE_DIR
236              (concat "~/" (file-relative-name TM_KERNEL_DIR "~/"))
237              )
238        )
239       (t
240        (setq APEL_RELATIVE_DIR          APEL_DIR)
241        (setq TL_RELATIVE_DIR            TL_DIR)
242        (setq BITMAP_RELATIVE_DIR        BITMAP_DIR)
243        (setq MU_RELATIVE_DIR            MU_DIR)
244        (setq FLIM_RELATIVE_DIR          FLIM_DIR)
245        (setq TM_KERNEL_RELATIVE_DIR     TM_KERNEL_DIR)
246        ))
247 (setq TM_MHE_RELATIVE_DIR       TM_KERNEL_RELATIVE_DIR)
248 (setq TM_GNUS_RELATIVE_DIR      TM_KERNEL_RELATIVE_DIR)
249
250 (setq TM_GNUS_INSTALL_FORMAT
251       "cd gnus; make install-19 EMACS=%s TMDIR19=%s")
252 (setq TM_GNUS_COMPILE ".gnus-compile")
253 (setq MAKE "make")
254
255
256 (setq BIN_SRC_DIR "src")
257 (setq BINS '("ol2" "decode-b"))
258 (setq METHOD_SRC_DIR "methods")
259 (setq METHODS
260       '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg"
261         "tm-plain" "tm-ps"
262         "tmdecode"))
263
264 ;;; TM-CFG ends here