+ (when (featurep 'xemacs)
+ (unless (fboundp 'defadvice)
+ (autoload 'defadvice "advice" nil nil 'macro))
+ (autoload 'Info-directory "info" nil t)
+ (autoload 'Info-menu "info" nil t)
+ (autoload 'annotations-at "annotations")
+ (autoload 'apropos "apropos" nil t)
+ (autoload 'apropos-command "apropos" nil t)
+ (autoload 'bbdb-complete-name "bbdb-com" nil t)
+ (autoload 'browse-url "browse-url" nil t)
+ (autoload 'c-mode "cc-mode" nil t)
+ (autoload 'customize-apropos "cus-edit" nil t)
+ (autoload 'customize-save-variable "cus-edit" nil t)
+ (autoload 'customize-set-variable "cus-edit" nil t)
+ (autoload 'customize-variable "cus-edit" nil t)
+ (autoload 'delete-annotation "annotations")
+ (autoload 'dolist "cl-macs" nil nil 'macro)
+ (autoload 'enriched-decode "enriched")
+ (autoload 'executable-find "executable")
+ (autoload 'font-lock-fontify-buffer "font-lock" nil t)
+ (autoload 'info "info" nil t)
+ (autoload 'mail-extract-address-components "mail-extr")
+ (autoload 'mail-fetch-field "mail-utils")
+ (autoload 'make-annotation "annotations")
+ (autoload 'make-display-table "disp-table")
+ (autoload 'pp "pp")
+ (autoload 'ps-despool "ps-print" nil t)
+ (autoload 'ps-spool-buffer "ps-print" nil t)
+ (autoload 'ps-spool-buffer-with-faces "ps-print" nil t)
+ (autoload 'read-passwd "passwd")
+ (autoload 'regexp-opt "regexp-opt")
+ (autoload 'reporter-submit-bug-report "reporter")
+ (if (and (emacs-version>= 21 5)
+ (not (featurep 'sxemacs)))
+ (autoload 'setenv "process" nil t)
+ (autoload 'setenv "env" nil t))
+ (autoload 'sgml-mode "psgml" nil t)
+ (autoload 'sha1 "sha1")
+ (autoload 'sha1-binary "sha1")
+ (autoload 'smtpmail-send-it "smtpmail")
+ (autoload 'sort-numeric-fields "sort" nil t)
+ (autoload 'sort-subr "sort")
+ (autoload 'trace-function-background "trace" nil t)
+ (autoload 'w3-do-setup "w3")
+ (autoload 'w3-prepare-buffer "w3-display")
+ (autoload 'w3-region "w3-display" nil t)
+ (defalias 'frame-char-height 'frame-height)
+ (defalias 'frame-char-width 'frame-width)
+ (defalias 'frame-parameter 'frame-property)
+ (defalias 'make-overlay 'ignore)
+ (defalias 'overlay-end 'ignore)
+ (defalias 'overlay-get 'ignore)
+ (defalias 'overlay-put 'ignore)
+ (defalias 'overlay-start 'ignore)
+ (defalias 'overlays-in 'ignore)
+ (defalias 'replace-dehighlight 'ignore)
+ (defalias 'replace-highlight 'ignore)
+ (defalias 'w3-coding-system-for-mime-charset 'ignore)))
+
+;; T-gnus stuff.
+(eval-and-compile
+ (when (featurep 'xemacs)
+ (autoload 'c-mode "cc-mode" nil t)
+ (autoload 'font-lock-mode "font-lock" nil t)
+ (autoload 'read-kbd-macro "edmacro" nil t)
+ (autoload 'turn-on-font-lock "font-lock" nil t))
+ (autoload 'nnheader-detect-coding-region "nnheader")
+ (autoload 'std11-extract-addresses-components "nnheader")
+ (autoload 'std11-fold-region "nnheader")
+ (autoload 'std11-narrow-to-field "nnheader")
+ (autoload 'std11-unfold-region "nnheader"))
+
+(defconst dgnushack-unexporting-files
+ (append '("dgnushack.el" "dgnuspath.el" "dgnuskwds.el" "lpath.el"
+ "legacy-gnus-agent.el")
+ (unless (or (condition-case code
+ (require 'w3-parse)
+ (error
+ (message "No w3: %s%s, retrying..."
+ (error-message-string code)
+ (if (setq code (locate-library "w3-parse"))
+ (concat " (" code ")")
+ ""))
+ nil))
+ ;; Maybe mis-configured Makefile is used (e.g.
+ ;; configured for FSFmacs but XEmacs is running).
+ (let ((lp (delete dgnushack-w3-directory
+ (copy-sequence load-path))))
+ (if (let ((load-path lp))
+ (condition-case nil
+ (require 'w3-parse)
+ (error nil)))
+ ;; If success, fix `load-path' for compiling.
+ (progn
+ (setq load-path lp)
+ (message " => fixed; W3DIR=%s"
+ (file-name-directory
+ (locate-library "w3-parse")))
+ t)
+ (message " => ignored")
+ nil)))
+ '("nnultimate.el" "webmail.el" "nnwfm.el"))
+ (condition-case code
+ (progn (require 'mh-e) nil)
+ (error
+ (message "No mh-e: %s%s (ignored)"
+ (error-message-string code)
+ (if (setq code (locate-library "mh-e"))
+ (concat " (" code ")")
+ ""))
+ '("gnus-mh.el")))
+ (condition-case code
+ (progn (require 'xml) nil)
+ (error
+ (message "No xml: %s%s (ignored)"
+ (error-message-string code)
+ (if (setq code (locate-library "xml"))
+ (concat " (" code ")")
+ ""))
+ '("nnrss.el")))
+ (condition-case code
+ (progn (require 'bbdb) nil)
+ (error
+ (message "No bbdb: %s%s (ignored)"
+ (error-message-string code)
+ (if (setq code (locate-library "bbdb"))
+ (concat " (" code ")")
+ ""))
+ '("gnus-bbdb.el")))
+ (unless (featurep 'xemacs)
+ '("gnus-xmas.el" "messagexmas.el" "nnheaderxm.el"))
+ (when (and (fboundp 'base64-decode-string)
+ (subrp (symbol-function 'base64-decode-string)))
+ '("base64.el"))
+ (when (and (fboundp 'md5) (subrp (symbol-function 'md5)))
+ '("md5.el"))
+ (when (featurep 'xemacs)
+ '("gnus-load.el")))
+ "Files which will not be installed.")
+
+(defconst dgnushack-exporting-files
+ (let ((files (directory-files srcdir nil "^[^=].*\\.el$" t)))
+ (dolist (file dgnushack-unexporting-files)
+ (setq files (delete file files)))
+ (sort files 'string-lessp))
+ "Files which will be compiled and installed.")
+
+(defun dgnushack-exporting-files ()
+ "Print name of files which will be installed."
+ (princ (mapconcat 'identity dgnushack-exporting-files " ")))
+
+(defconst dgnushack-dont-compile-files
+ '("gnus-load.el"
+ "mm-bodies.el" "mm-decode.el" "mm-encode.el" "mm-extern.el"
+ "mm-partial.el" "mm-uu.el" "mm-view.el" "mml-sec.el" "mml-smime.el"
+ "mml.el" "mml1991.el" "mml2015.el")
+ "Files which should not be byte-compiled.")
+
+(defun dgnushack-compile-verbosely ()
+ "Call dgnushack-compile with warnings ENABLED. If you are compiling
+patches to gnus, you should consider modifying make.bat to call
+dgnushack-compile-verbosely. All other users should continue to use
+dgnushack-compile."
+ (dgnushack-compile t))