automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem with AM_PATH_LISPDIR


From: Tim Van Holder
Subject: Problem with AM_PATH_LISPDIR
Date: Thu, 14 Feb 2002 18:33:27 +0100

Apparently, some non-lisp emacsen (such as MicroEmacs)
can seriously break the lispdir check (an old MicroEmacs
on SunOS even started up interactively, requiring C-x C-c
in order to kill the test).
This patch helps a little, by

 - redirecting /dev/null to the emacs' stdin; this doesn't
   stop the hang necessarily, but did make it possible to
   kill the test using C-c in the case of the MicroEmacs
   mentioned
 - emitting a comment about this to configure (so someone who
   runs into this problem can quickly find a solution)
 - adding a note about this to the macro's documentation

2002-02-14  Tim Van Holder  <address@hidden>

        * 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 (AM_PATH_LISPDIR): Document this
        problem.

Index: automake.texi
===================================================================
RCS file: /cvs/automake/automake/automake.texi,v
retrieving revision 1.264
diff -u -r1.264 automake.texi
--- automake.texi       2002/02/02 07:18:47     1.264
+++ automake.texi       2002/02/14 17:22:46
@@ -1400,6 +1400,17 @@
 @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
Index: m4/lispdir.m4
===================================================================
RCS file: /cvs/automake/automake/m4/lispdir.m4,v
retrieving revision 1.16
diff -u -r1.16 lispdir.m4
--- lispdir.m4  2002/01/28 10:47:52     1.16
+++ lispdir.m4  2002/02/14 17:22:48
@@ -39,7 +39,12 @@
  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;}'
\




reply via email to

[Prev in Thread] Current Thread [Next in Thread]