1999-04-18 Alexandre Oliva <oliva@dcc.unicamp.br>
+ * m4/lispdir.m4: Match only `/(share|lib)/x?emacs/site-lisp/*$'.
+
* m4/lispdir.m4: Do not override lispdir if it's already defined.
Run some emacs-lisp to find out the site-lisp directory, but
relocate it into prefix.
## ------------------------
## Emacs LISP file handling
## From Ulrich Drepper
-## Heavily simplified by Alexandre Oliva
+## Almost entirely rewritten by Alexandre Oliva
## ------------------------
-# serial 2
+# serial 3
AC_DEFUN(AM_PATH_LISPDIR,
[# If set to t, that means we are running in a shell under Emacs.
if test $EMACS != "no"; then
if test x${lispdir+set} != xset; then
AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [dnl
- am_cv_lispdir=`$EMACS -q -batch -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/emacs\/site-lisp$/{p;q;}'`
+ am_cv_lispdir=`$EMACS -q -batch -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'`
if test -z "$am_cv_lispdir"; then
am_cv_lispdir='${datadir}/emacs/site-lisp'
- else
- am_cv_lispdir=`echo "$am_cv_lispdir" | sed -e 's,^.*/lib/,${libdir}/,' -e 's,^.*/share/,${datadir}/,'`
fi
])
lispdir="$am_cv_lispdir"