tm 7.86.
[elisp/tm.git] / TM-CFG
diff --git a/TM-CFG b/TM-CFG
index 658eb56..4609e3d 100644 (file)
--- a/TM-CFG
+++ b/TM-CFG
@@ -1,6 +1,6 @@
 ;;; -*-Emacs-Lisp-*-
 ;;;
-;;; $Id: TM-CFG,v 7.1 1996/05/27 15:09:09 morioka Exp morioka $
+;;; $Id: TM-CFG,v 7.23 1996/09/08 17:46:57 morioka Exp morioka $
 ;;;
 
 (defvar default-load-path load-path)
@@ -9,31 +9,82 @@
                          (lambda (path)
                            (expand-file-name path (getenv "PWD"))
                            ))
-                        '("." "../tl" "../mel" "mh-e")
+                        '("." "../tl" "../mu" "../mel"
+                          "../tm-mh-e" "../gnus-mime" "../tm-gnus"
+                          "../tm-mail" "../tm-vm")
                         )
                 load-path))
 
 (require 'tl-misc)
+(require 'install)
 
 
 ;;; @ Please specify optional package directory if you use them.
 ;;;
 
-;; Please specify VM path.
-(add-path "vm-5.95beta" 'all-paths)
+;; It is only necessary to use `add-path' if these packages are not
+;; already on the standard load-path of Emacs.
 
-;; Please specify Mailcrypt path.
-(add-path "mailcrypt-3.4" 'all-paths)
+;; Function `get-latest-path' detect latest version of such package
+;; under load-path directories. If you want to use a version of a
+;; package instead of latest version, please specify by argument of
+;; function `add-path'.
 
-;; Please specify BBDB path.
-(add-path "bbdb-1.50" 'all-paths)
+;; Function `add-path' finds path under load-path directories. If a
+;; package does not exist in load-path, please specify by absolutely
+;; (`~/' is available), for example
+;;     (add-path "~/lib/elisp/mailcrypt-3.4")
+;; or
+;;     (add-path "/opt/share/xmule/site-lisp/mailcrypt-3.4")
+
+;;; @@ Please specify VM path.
+;;;
+
+;; Use latest version installed in load-path.
+
+(let ((path (get-latest-path "vm" 'all-paths)))
+  (if path
+      (add-path path)
+    ))
+
+;; Or please specify path.
+;; (add-path "vm-5.95beta" 'all-paths)
+
+
+;;; @@ Please specify Mailcrypt path.
+;;;
+
+;; Use latest version installed in load-path.
+
+(let ((path (get-latest-path "mailcrypt" 'all-paths)))
+  (if path
+      (add-path path)
+    ))
+
+;; Or please specify path.
+;; (add-path "mailcrypt-3.4" 'all-paths)
+
+
+;;; @@ Please specify BBDB path.
+;;;
+
+(let ((path (get-latest-path "bbdb" 'all-paths)))
+  (if path
+      (add-path path)
+    ))
+
+;; Or please specify path.
+;; (add-path "bbdb-1.50" 'all-paths)
 
 
 ;;; @ shell
 ;;;
 
 ;; Please specify shell command path.
-(setq SHELL "/bin/sh")
+(setq SHELL
+      (find-if (function file-exists-p)
+              '("/bin/sh" "/usr/bin/sh")
+              ))
 
 ;; Please specify shell command option.
 (setq SHELLOPTION "-c")
 ;;;
 
 ;; Please specify install path prefix.
-(setq PREFIX
-      (if (or running-emacs-18 running-xemacs)
-         (expand-file-name "../../.." exec-directory)
-       (expand-file-name "../../../.." data-directory)
-       )) ; install to shared directory (maybe "/usr/local")
-;;(setq PREFIX "~/")   ; install to your home directory
+;; If it is omitted, shared directory (maybe /usr/local is used).
+(defvar PREFIX install-prefix)
+;;(setq PREFIX "~/")
 
 ;; Please specify install path prefix for binaries.
-(setq EXEC_PREFIX
-      (if (or running-emacs-18 running-xemacs)
-         (expand-file-name "../../.." exec-directory)
-       (expand-file-name "../../../.." exec-directory)
-       ))
-;;(setq EXEC_PREFIX "~/")      ; install to your home directory
+(defvar EXEC_PREFIX
+  (if (or running-emacs-18 running-xemacs)
+      (expand-file-name "../../.." exec-directory)
+    (expand-file-name "../../../.." exec-directory)
+    ))
 
 ;; Please specify tm package prefix [optional]
 (setq TM_PACKAGE_PREFIX "")
          "tl"
        ""))
 
+;; Please specify MU prefix [optional]
+(setq MU_PREFIX "mu")
+
 ;; Please specify MEL prefix [optional]
 (setq MEL_PREFIX "mel")
 
 
 ;; lisp files of tm are installed into following directory tree:
 ;;
-;;     LISPDIR = PREFIX/DATA_PREFIX/LISP_PREFIX/
-;;     LISPDIR/mime-setup.{el|elc}
-;;     LISPDIR/TM_PACKAGE_PREFIX/TL_PREFIX/  --- tl  lisp files
-;;     LISPDIR/TM_PACKAGE_PREFIX/MEL_PREFIX/ --- MEL lisp files
-;;     LISPDIR/TM_PACKAGE_PREFIX/TM_PREFIX/  --- tm  lisp files
+;;     <LISPDIR> = <PREFIX>/DATA_PREFIX/<install-elisp-prefix>/
+;;     <LISPDIR>/mime-setup.{el|elc}
+;;     <LISPDIR>/<TM_PACKAGE_PREFIX>/<TL_PREFIX>/  --- tl  lisp files
+;;     <LISPDIR>/<TM_PACKAGE_PREFIX>/<MU_PREFIX>/  --- MU lisp files
+;;     <LISPDIR>/<TM_PACKAGE_PREFIX>/<MEL_PREFIX>/ --- MEL lisp files
+;;     <LISPDIR>/<TM_PACKAGE_PREFIX>/<TM_PREFIX>/  --- tm  lisp files
 ;;
-;; For example, if PREFIX = "/usr/local/" and you use Emacs 19.30,
+;; For example, if <PREFIX> = "/usr/local" and you use Emacs 19.34,
 ;;
-;;     LISPDIR = /usr/local/share/emacs/site-lisp/
+;;     <LISPDIR> = /usr/local/share/emacs/site-lisp/
 ;;     /usr/local/share/emacs/site-lisp/mime-setup.{el|elc}
 ;;     /usr/local/share/emacs/site-lisp/     --- tl  lisp files
+;;     /usr/local/share/emacs/site-lisp/mu/  --- MU lisp files
 ;;     /usr/local/share/emacs/site-lisp/mel/ --- MEL lisp files
 ;;     /usr/local/share/emacs/site-lisp/tm/  --- tm  lisp files
 ;;
-;; For example, if PREFIX = "~/" and you use XEmacs,
+;; For example, if <PREFIX> = "~/" and you use XEmacs,
 ;;
-;;     LISPDIR = ~/share/xemacs/site-lisp/
-;;     ~/share/xemacs/site-lisp/mime-setup.{el|elc}
-;;     ~/share/xemacs/site-lisp/tl/  --- tl  lisp files
-;;     ~/share/xemacs/site-lisp/mel/ --- MEL lisp files
-;;     ~/share/xemacs/site-lisp/tm/  --- tm  lisp files
+;;     <LISPDIR> = ~/share/xemacs/site-lisp/
+;;     ~/lib/xemacs/site-lisp/mime-setup.{el|elc}
+;;     ~/lib/xemacs/site-lisp/tl/  --- tl  lisp files
+;;     ~/lib/xemacs/site-lisp/mu/  --- MU  lisp files
+;;     ~/lib/xemacs/site-lisp/mel/ --- MEL lisp files
+;;     ~/lib/xemacs/site-lisp/tm/  --- tm  lisp files
 
 
 ;;; @ executables
 ;;; @ optional settings
 ;;;
 
-(setq LISP_PREFIX
-      (if (>= emacs-major-version 19)
-         "site-lisp"
-       "local.lisp"))
-
-(defvar LISPDIR
-  (or
-   (catch 'tag
-     (let ((rest default-load-path)
-          dir)
-       (while (setq dir (car rest))
-        (if (string-match
-             (expand-file-name (concat ".*/" LISP_PREFIX) PREFIX) dir)
-            (throw 'tag (substring dir 0 (match-end 0)))
-          )
-        (setq rest (cdr rest))
-        )))
-   (expand-file-name (concat
-                     (if running-emacs-19
-                         "share/"
-                       "lib/")
-                     (cond ((boundp 'NEMACS) "nemacs/")
-                           ((boundp 'MULE)   "mule/")
-                           (running-xemacs
-                            (if (featurep 'mule)
-                                "xmule/"
-                              "xemacs/"))
-                           (t "emacs/"))
-                     LISP_PREFIX) PREFIX)
-   ))
+;; It is generated by automatically. Please set variable `PREFIX'.
+;; If you don't like default directory tree, please set it.
+(defvar LISPDIR (install-detect-elisp-directory PREFIX))
+;; (setq install-default-elisp-directory "~/lib/emacs/lisp")
 
 ;; Please specify mime-setup.{el|elc} install path.
 (setq SETUP_FILE_DIR LISPDIR)
 (setq TM_LISPDIR (expand-file-name TM_PACKAGE_PREFIX LISPDIR))
 
 (setq TL_DIR (expand-file-name TL_PREFIX TM_LISPDIR))
+(setq MU_DIR (expand-file-name MU_PREFIX TM_LISPDIR))
 (setq MEL_DIR (expand-file-name MEL_PREFIX TM_LISPDIR))
 (setq TM_KERNEL_DIR (expand-file-name TM_PREFIX TM_LISPDIR))
 (setq TM_MHE_DIR TM_KERNEL_DIR)
 (setq TM_GNUS_DIR TM_KERNEL_DIR)
+(setq Gnus_MIME_DIR TM_KERNEL_DIR)
+(setq TM_MAIL_DIR TM_KERNEL_DIR)
+(setq TM_VM_DIR TM_KERNEL_DIR)
+
+(cond ((member LISPDIR default-load-path)
+       (if (string-equal TM_PACKAGE_PREFIX "")
+          (setq TL_RELATIVE_DIR TL_PREFIX
+                MU_RELATIVE_DIR MU_PREFIX
+                MEL_RELATIVE_DIR MEL_PREFIX
+                TM_KERNEL_RELATIVE_DIR TM_PREFIX
+                )
+        (setq TL_RELATIVE_DIR
+              (concat (file-name-as-directory TM_PACKAGE_PREFIX) TL_PREFIX))
+        (setq MU_RELATIVE_DIR
+              (concat (file-name-as-directory TM_PACKAGE_PREFIX) MU_PREFIX))
+        (setq MEL_RELATIVE_DIR
+              (concat (file-name-as-directory TM_PACKAGE_PREFIX) MEL_PREFIX))
+        (setq TM_KERNEL_RELATIVE_DIR
+              (concat (file-name-as-directory TM_PACKAGE_PREFIX) TM_PREFIX))
+        ))
+      ((string-match (concat "^" (regexp-quote (expand-file-name "~/")))
+                    LISPDIR)
+       (setq TL_RELATIVE_DIR (concat "~/" (file-relative-name TL_DIR "~/")))
+       (setq MU_RELATIVE_DIR (concat "~/" (file-relative-name MU_DIR "~/")))
+       (setq MEL_RELATIVE_DIR (concat "~/" (file-relative-name MEL_DIR "~/")))
+       (setq TM_KERNEL_RELATIVE_DIR
+            (concat "~/" (file-relative-name TM_KERNEL_DIR "~/")))
+       )
+      (t
+       (setq TL_RELATIVE_DIR TL_DIR)
+       (setq MU_RELATIVE_DIR MU_DIR)
+       (setq MEL_RELATIVE_DIR MEL_DIR)
+       (setq TM_KERNEL_RELATIVE_DIR TM_KERNEL_DIR)
+       ))
+(setq TM_MHE_RELATIVE_DIR TM_KERNEL_RELATIVE_DIR)
+(setq TM_GNUS_RELATIVE_DIR TM_KERNEL_RELATIVE_DIR)
 
 (setq TM_GNUS_INSTALL_FORMAT
       "cd gnus; PWD=`pwd` make install-19 EMACS=%s TMDIR19=%s")
 (setq TM_GNUS_COMPILE ".gnus-compile")
 (setq MAKE "make")
 
-(setq el-file-mode (+ (* 64 6)(* 8 4) 4))
-
 
 (setq BIN_SRC_DIR "src")
 (setq BINS '("ol2" "decode-b"))
 (setq METHOD_SRC_DIR "methods")
 (setq METHODS
-      '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg" "tm-plain"
+      '("tm-au" "tm-file" "tm-html" "tm-image" "tm-mpeg"
+       "tm-plain" "tm-ps"
        "tmdecode"))
+
+;;; TM-CFG ends here