diff --git a/Makefile.am b/Makefile.am index 5eed578..7df29d0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -23,9 +23,10 @@ jabber-time.el jabber-truncate.el jabber-util.el \ jabber-vcard-avatars.el jabber-vcard.el jabber-version.el \ jabber-watch.el jabber-widget.el jabber-wmii.el jabber-xmessage.el \ jabber-muc-nick-coloring.el \ -jabber-xml.el jabber.el srv.el jabber-tmux.el jabber-ourversion.el +jabber-xml.el jabber.el jabber-tmux.el jabber-ourversion.el -compat_lisp_sources = jabber-fallback-lib/hexrgb.el jabber-fallback-lib/fsm.el +compat_lisp_sources = jabber-fallback-lib/hexrgb.el jabber-fallback-lib/fsm.el \ + jabber-fallback-lib/srv.el dist_lisp_LISP=$(my_lisp_sources) $(compat_lisp_sources) jabber-autoloads.el MAINTAINERCLEANFILES=jabber-autoloads.el diff --git a/jabber-conn.el b/jabber-conn.el index 6a4c2d5..ab88a89 100644 --- a/jabber-conn.el +++ b/jabber-conn.el @@ -36,7 +36,16 @@ (ignore-errors (require 'starttls)) -(require 'srv) +(eval-and-compile + (or (ignore-errors (require 'srv)) + (ignore-errors + (let ((load-path (cons (expand-file-name + "jabber-fallback-lib" + (file-name-directory (locate-library "jabber"))) + load-path))) + (require 'srv))) + (error + "srv not found in `load-path' or jabber-fallback-lib/ directory."))) (defgroup jabber-conn nil "Jabber Connection Settings" :group 'jabber) diff --git a/srv.el b/jabber-fallback-lib/srv.el similarity index 100% rename from srv.el rename to jabber-fallback-lib/srv.el diff --git a/jabber-pkg.el.in b/jabber-pkg.el.in index bcd7f48..43067fa 100644 --- a/jabber-pkg.el.in +++ b/jabber-pkg.el.in @@ -1,5 +1,5 @@ ;; For ELPA: http://tromey.com/elpa/ (define-package "jabber" "@PACKAGE_VERSION@" "A Jabber client for Emacs." - '((fsm "0.2"))) + '((fsm "0.2") (srv "0.2"))) ;; arch-tag: fa652136-12f7-11dd-b4c4-000a95c2fcd0