2001-02-09 20:00:00 ShengHuo ZHU <zsh@cs.rochester.edu>
authorShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 10 Feb 2001 01:17:08 +0000 (01:17 +0000)
committerShengHuo ZHU <zsh@cs.rochester.edu>
Sat, 10 Feb 2001 01:17:08 +0000 (01:17 +0000)
* aclocal.m4 (AC_CHECK_URL): Add.

* configure.in: Use it.

ChangeLog
aclocal.m4
configure.in
lisp/ChangeLog
lisp/Makefile.in
lisp/dgnushack.el

index f81c1bb..13b9941 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2001-02-09 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * aclocal.m4 (AC_CHECK_URL): Add.
+
+       * configure.in: Use it.
+
 2001-01-15  Jesper Harder <harder@ifa.au.dk>
 
        * make.bat: Fix doc.
index 2a715ad..1c11603 100644 (file)
@@ -153,3 +153,27 @@ fi
    AC_SUBST(W3)
    AC_MSG_RESULT("${W3}")
 ])
+
+dnl
+dnl Perform sanity checking and try to locate the W3 package
+dnl
+AC_DEFUN(AC_CHECK_URL, [
+AC_MSG_CHECKING(for acceptable URL version)
+AC_CACHE_VAL(EMACS_cv_ACCEPTABLE_URL,[
+AC_EMACS_CHECK_LIB(url, url-retrieve, "noecho")
+if test "${HAVE_url}" = "yes"; then
+       EMACS_cv_ACCEPTABLE_URL=yes
+else
+       EMACS_cv_ACCEPTABLE_URL=no
+fi
+
+if test "${EMACS_cv_ACCEPTABLE_URL}" = "yes"; then
+       AC_EMACS_LISP(url_dir,(file-name-directory (locate-library \"url\")),"noecho")
+       EMACS_cv_ACCEPTABLE_URL=$EMACS_cv_SYS_url_dir
+fi
+])
+   AC_ARG_WITH(url,[  --with-url=DIR          Specify where to find the url package], [ EMACS_cv_ACCEPTABLE_URL=`( cd $withval && pwd || echo "$withval" ) 2> /dev/null` ])
+   URL=${EMACS_cv_ACCEPTABLE_URL}
+   AC_SUBST(URL)
+   AC_MSG_RESULT("${URL}")
+])
index af6fd87..3600414 100644 (file)
@@ -20,6 +20,7 @@ AC_CHECK_PROG(EMACS, emacs, emacs, xemacs)
 
 AC_PATH_LISPDIR
 AC_PATH_ETCDIR
+AC_CHECK_URL
 AC_CHECK_W3
 
 AC_OUTPUT(Makefile lisp/Makefile texi/Makefile etc/Makefile)
index e7dc396..af01727 100644 (file)
@@ -1,3 +1,9 @@
+2001-02-09 20:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
+
+       * dgnushack.el : Add URLDIR.
+       
+       * Makefile.in (EMACS_COMP): Ditto.
+
 2001-02-09 19:00:00  ShengHuo ZHU  <zsh@cs.rochester.edu>
 
        * gnus-cus.el (gnus-score-customize): Error on no score file.
index ea03370..ef4401a 100644 (file)
@@ -12,19 +12,21 @@ INSTALL_DATA = @INSTALL_DATA@
 SHELL = /bin/sh
 VPATH = @srcdir@
 W3DIR = @W3@
+URLDIR = @URL@
+EMACS_COMP = URLDIR=$(URLDIR) W3DIR=$(W3DIR) lispdir=$(lispdir) srcdir=$(srcdir) $(EMACS) $(FLAGS)
 
 all total:
        rm -f *.elc
-       W3DIR=$(W3DIR) lispdir=$(lispdir) srcdir=$(srcdir) $(EMACS) $(FLAGS) -f dgnushack-compile
+       $(EMACS_COMP) -f dgnushack-compile
 
 warn:
        rm -f *.elc
-       W3DIR=$(W3DIR) lispdir=$(lispdir) srcdir=$(srcdir) $(EMACS) $(FLAGS) --eval '(dgnushack-compile t)' 2>&1 | egrep -v "variable G|inhibit-point-motion-hooks|coding-system|temp-results|variable gnus|variable nn|scroll-in-place|deactivate-mark|filladapt-mode|byte-code-function-p|print-quoted|ps-right-header|ps-left-header|article-inhibit|print-escape|ssl-program-arguments|message-log-max"
+       $(EMACS_COMP) --eval '(dgnushack-compile t)' 2>&1 | egrep -v "variable G|inhibit-point-motion-hooks|coding-system|temp-results|variable gnus|variable nn|scroll-in-place|deactivate-mark|filladapt-mode|byte-code-function-p|print-quoted|ps-right-header|ps-left-header|article-inhibit|print-escape|ssl-program-arguments|message-log-max"
 
 # The "clever" rule is unsafe, since redefined macros are loaded from
 # .elc files, and not the .el file.
 clever some:
-       W3DIR=$(W3DIR) lispdir=$(lispdir) srcdir=$(srcdir) $(EMACS) $(FLAGS) -f dgnushack-compile
+       $(EMACS_COMP) -f dgnushack-compile
 
 install: clever
        rm -f dgnushack.elc
index 2d8941a..4d6d292 100644 (file)
 
 (defvar srcdir (or (getenv "srcdir") "."))
 
-(push (or (getenv "lispdir")
-         "/usr/share/emacs/site-lisp")
+(defun my-getenv (str)
+  (let ((val (getenv "lispdir")))
+    (if (equal val "no") nil val)))
+
+(if (my-getenv "lispdir")
+    (push (my-getenv "lispdir") load-path))
+
+(push (or (my-getenv "URLDIR") (expand-file-name "../../url/lisp/" srcdir))
       load-path)
 
-(push (or (getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir))
+(push (or (my-getenv "W3DIR") (expand-file-name "../../w3/lisp/" srcdir))
       load-path)
 
 (push "/usr/share/emacs/site-lisp" load-path)