;;; NICOLA-DDSKK-CFG --- installation setting  -*-emacs-lisp-*-

;;; Code:

(or (fboundp 'add-to-list)
    (defun add-to-list (list-var element)
      (or (member element (symbol-value list-var))
	  (set list-var (cons element (symbol-value list-var))))))

(defvar emacs-major-version
  (progn (string-match "^[0-9]+" emacs-version)
	 (string-to-int (substring emacs-version
				   (match-beginning 0) (match-end 0)))))

(or (fboundp 'member)
    (defun member (elt list)
      (while (and list (not (equal elt (car list))))
	(setq list (cdr list)))
      list))

;;

(defvar default-load-path load-path)

(add-to-list 'load-path
	     (expand-file-name "../../site-lisp/skk" data-directory))

(add-to-list 'load-path
	     (expand-file-name "../site-lisp/skk" data-directory))

(add-to-list 'load-path (expand-file-name "."))

(if (boundp 'LISPDIR)
    (progn
      (add-to-list 'default-load-path LISPDIR)
      (add-to-list 'load-path LISPDIR)
      (add-to-list 'load-path (expand-file-name "skk" LISPDIR))))

(if (boundp 'VERSION_SPECIFIC_LISPDIR)
    (add-to-list 'load-path VERSION_SPECIFIC_LISPDIR))

(require 'install (expand-file-name "install.el" ".."))

(defvar emacs-self-contained nil)

;; Default value of install-prefix is not valid on some systems, especially
;; on non-UNIX like systems.
(setq install-prefix
  (cond	((eq system-type 'windows-nt)
	 ;; Meadow, NTEmacs
	 (setq emacs-self-contained t)
	 (expand-file-name ".." exec-directory))
	((eq system-type 'darwin)
	 ;; Carbon Emacs or Cocoa Emacs (or system-default Emacs)
	 (let ((dir (expand-file-name ".." data-directory)))
	   (if (string-match "/Emacs\\.app/Contents/Resources/?$" dir)
	       (progn
		 (setq emacs-self-contained t)
		 dir)
	     (expand-file-name "../../.." dir))))
	((featurep 'xemacs)
	 (expand-file-name "../../.." exec-directory))
	(t
	 (expand-file-name "../../../.." data-directory))))

;;; @ Please specify prefix of install directory.
;;;

;; Please specify install path prefix.
;; If it is omitted, shared directory (maybe /usr/local is used).
(defvar PREFIX install-prefix)
;;(setq PREFIX "~/")

;; Please specify prefix for ``NICOLA-DDSKK'' [optional]
(setq NICOLA-DDSKK_PREFIX "nicola-ddskk")



;;; @ optional settings
;;;

;; It is generated by automatically. Please set variable `PREFIX'.
;; If you don't like default directory tree, please set it.
(defvar LISPDIR
	(cond (emacs-self-contained
	       (expand-file-name "site-lisp" PREFIX))
	      (t
	       (install-detect-elisp-directory PREFIX))))
;; (setq install-default-elisp-directory "~/lib/emacs/lisp")

(defvar VERSION_SPECIFIC_LISPDIR
	(cond (emacs-self-contained
	       (expand-file-name "site-lisp" PREFIX))
	      (t
	       (install-detect-elisp-directory PREFIX nil 'version-specific))))


;; (setq FLIM_DIR (expand-file-name FLIM_PREFIX VERSION_SPECIFIC_LISPDIR))
(setq NICOLA-DDSKK_DIR (expand-file-name NICOLA-DDSKK_PREFIX
					 VERSION_SPECIFIC_LISPDIR))

(defvar PACKAGEDIR (install-get-default-package-directory))

;;; NICOLA-DDSKK-CFG ends here
