+2002-02-20 Tim Van Holder <tim.van.holder@pandora.be>
+
+ * m4/lispdir.m4: Redirect /dev/null to stdin when running $EMACS
+ to try and prevent a non-lisp emacs from starting in interactive
+ mode.
+ * automake.texi: Document this change.
+
2002-02-19 Alexandre Duret-Lutz <duret_g@epita.fr>
* automake.texi (Macros): Split into ...
@item AM_PATH_LISPDIR
Searches for the program @code{emacs}, and, if found, sets the output
variable @code{lispdir} to the full path to Emacs' site-lisp directory.
+
+Note that this test assumes the @code{emacs} found to be a version that
+supports Emacs Lisp (such as @sc{gnu} Emacs or XEmacs). Other emacsen
+can cause this test to hang (some, like old versions of MicroEmacs,
+start up in interactive mode, requiring @samp{C-x C-c} to exit, which
+is hardly obvious for a non-emacs user). In most cases, however, you
+should be able to use @samp{C-c} to kill the test. In order to avoid
+problems, you can set @code{EMACS} to ``no'' in the environment, or
+use the @samp{--with-lispdir} option to @command{configure} to
+explictly set the correct path (if you're sure you have an @code{emacs}
+that supports Emacs Lisp.
@cvindex AM_PATH_LISPDIR
@item AM_PROG_AS
if test $EMACS != "no"; then
if test x${lispdir+set} != xset; then
AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir],
- [AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' >conftest.out])
+ [# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
+ # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
+ # which is non-obvious for non-emacs users.
+ # Redirecting /dev/null should help a bit; pity we can't detect "broken"
+ # emacsen earlier and avoid running this altogether.
+ AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
am_cv_lispdir=`sed -n \
-e 's,/$,,' \
-e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' \