aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac2
-rw-r--r--emacs.am4
2 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 698dd85784..e516fa57b7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -176,6 +176,8 @@ AC_CONFIG_FILES([test-env], [chmod +x test-env])
dnl Emacs interface.
AM_PATH_LISPDIR
+AM_CONDITIONAL([HAVE_EMACS], [test "x$EMACS" != "xno"])
+
emacsuidir="${guilemoduledir}/guix/emacs"
AC_SUBST([emacsuidir])
AC_CONFIG_FILES([emacs/guix-init.el
diff --git a/emacs.am b/emacs.am
index 86ae3a2c9f..6ef9d1c326 100644
--- a/emacs.am
+++ b/emacs.am
@@ -34,6 +34,8 @@ dist_lisp_DATA = \
nodist_lisp_DATA = \
emacs/guix-init.el
+if HAVE_EMACS
+
$(AUTOLOADS): $(ELFILES)
$(EMACS) --batch --eval \
"(let ((backup-inhibited t) \
@@ -41,3 +43,5 @@ $(AUTOLOADS): $(ELFILES)
(expand-file-name \"$(AUTOLOADS)\" \"$(srcdir)\"))) \
(update-directory-autoloads \
(expand-file-name \"emacs\" \"$(srcdir)\")))"
+
+endif HAVE_EMACS