* semi-def.el: Restore the requirement for `custom'.
[elisp/semi.git] / SEMI-CFG
1 ;;; -*-Emacs-Lisp-*-
2
3 ;; SEMI-CFG: installation setting about WEMI.
4
5 ;;; Code:
6
7 (defvar default-load-path load-path)
8
9 (add-to-list 'load-path
10              (expand-file-name "../../site-lisp/apel" data-directory))
11 (add-to-list 'load-path
12              (expand-file-name "." data-directory))
13
14 (if (boundp 'LISPDIR)
15     (progn
16       (add-to-list 'default-load-path LISPDIR)
17       (add-to-list 'load-path LISPDIR)
18       (add-to-list 'load-path (expand-file-name "apel" LISPDIR))
19       ))
20
21 (condition-case nil
22     (require 'install)
23   (error (error "Please install APEL 8.7 or later.")))
24
25 (add-path "bitmap-mule")
26 (add-path "flim")
27
28 (add-to-list 'load-path (expand-file-name "."))
29
30 (or (module-installed-p 'calist)
31     (error "Please install APEL 8.7 or later."))
32 (or (module-installed-p 'mime)
33     (error "Please install FLIM 1.6.0 or later."))
34 (if (module-installed-p 'tm-view)
35     (message "Please remove tm from load-path."))
36
37
38 ;;; @ Please specify optional package directory if you use them.
39 ;;;
40
41 ;; It is only necessary to use `add-path' if these packages are not
42 ;; already on the standard load-path of Emacs.
43
44 ;; Function `get-latest-path' detect latest version of such package
45 ;; under load-path directories. If you want to use a version of a
46 ;; package instead of latest version, please specify by argument of
47 ;; function `add-path'.
48
49 ;; Function `add-path' finds path under load-path directories. If a
50 ;; package does not exist in load-path, please specify by absolutely
51 ;; (`~/' is available), for example
52 ;;      (add-path "~/lib/elisp/mailcrypt-3.4")
53 ;; or
54 ;;      (add-path "/opt/share/xmule/site-lisp/mailcrypt-3.4")
55
56
57 ;;; @@ Please specify Mailcrypt path.
58 ;;;
59
60 ;; Use latest version installed in load-path.
61
62 (let ((path (get-latest-path "mailcrypt" 'all-paths)))
63   (if path
64       (add-path path)
65     ))
66
67 ;; Or please specify path.
68 ;; (add-path "mailcrypt-3.4" 'all-paths)
69
70
71 ;;; @@ Please specify BBDB path.
72 ;;;
73
74 (let ((path (get-latest-path "bbdb" 'all-paths)))
75   (when path
76     (add-path path)
77     (add-path (expand-file-name "lisp" path)) ; run-in-place installation
78     ))
79
80 ;; Or please specify path.
81 ;; (add-path "bbdb-1.50" 'all-paths)
82
83
84 ;;;
85 ;;; @@ Please specify Emacs/W3 path.
86 ;;;
87
88 (let ((path (get-latest-path "w3" 'all-paths)))
89   (when path
90     (add-path path)
91     (add-path (expand-file-name "lisp" path)) ; run-in-place installation
92     ))
93
94 ;; Or please specify path.
95 ;; (add-path "w3-4.0pre.20" 'all-paths)
96
97
98 ;;;
99 ;;; @@ Please specify CUSTOM path.
100 ;;;
101
102 (add-latest-path "custom")
103
104
105 ;;; @ Please specify prefix of install directory.
106 ;;;
107
108 ;; Please specify install path prefix.
109 ;; If it is omitted, shared directory (maybe /usr/local is used).
110 (defvar PREFIX install-prefix)
111 ;;(setq PREFIX "~/")
112
113 ;; Please specify install path prefix for binaries.
114 (defvar EXEC_PREFIX
115   (if (or running-emacs-18 running-xemacs)
116       (expand-file-name "../../.." exec-directory)
117     (expand-file-name "../../../.." exec-directory)
118     ))
119
120 ;; Please specify emu prefix [optional]
121 (setq EMU_PREFIX
122       (if (string-match "XEmacs" emacs-version)
123           "emu"
124         ""))
125
126 ;; Please specify SEMI prefix [optional]
127 (setq SEMI_PREFIX "semi")
128
129
130 ;;; @ executables
131 ;;;
132
133 ;; Please specify binary path.
134 (defvar BIN_DIR (expand-file-name "bin" EXEC_PREFIX))
135
136 ;; Please specify binary path. (for external method scripts)
137 (setq METHOD_DIR (expand-file-name "share/semi" PREFIX))
138
139
140 \f
141
142 ;;; @ optional settings
143 ;;;
144
145 ;; It is generated by automatically. Please set variable `PREFIX'.
146 ;; If you don't like default directory tree, please set it.
147 (defvar LISPDIR (install-detect-elisp-directory PREFIX))
148 ;; (setq install-default-elisp-directory "~/lib/emacs/lisp")
149
150 (setq SEMI_KERNEL_DIR   (expand-file-name SEMI_PREFIX   LISPDIR))
151 (setq SETUP_FILE_DIR    SEMI_KERNEL_DIR)
152
153 (setq METHOD_SRC_DIR "methods")
154 (setq METHODS
155       '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg"
156         "tm-plain" "tm-ps"
157         "tmdecode"))
158
159 (defvar PACKAGEDIR
160   (if (boundp 'early-packages)
161       (let ((dirs (append (if early-package-load-path
162                               early-packages)
163                           (if late-package-load-path
164                               late-packages)
165                           (if last-package-load-path
166                               last-packages)))
167             dir)
168         (while (not (file-exists-p
169                      (setq dir (car dirs))))
170           (setq dirs (cdr dirs)))
171         dir)))
172
173 ;;; SEMI-CFG ends here