The autoconf/automake files now honour --with-site-start to allow
selection of the directory where automatically sourced elisp files are
stored.  The original default is retained.

This switch makes support of non-debian systems easier.  RHEL5, for
example, places these files in /usr/emacs/site-lisp/site-start.d/.

Signed-off-by: Ben Walton <[email protected]>
---
 Makefile.am  |    2 +-
 configure.ac |    6 ++++++
 2 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 8ae4192..2d8b2e9 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,5 +1,5 @@
 lispdir = $(datadir)/emacs/site-lisp
-sitestartdir = $(sysconfdir)/emacs/site-start.d
+sitestartdir = @SITESTART@
 
 lisp_DATA = magit.el magit.elc
 sitestart_DATA = 50magit.el
diff --git a/configure.ac b/configure.ac
index da592b9..3364b85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,6 +2,12 @@ AC_INIT(magit, 0.8)
 AC_CONFIG_SRCDIR([magit.el])
 AM_INIT_AUTOMAKE
 
+AC_ARG_WITH([site-start],
+       AS_HELP_STRING([--with-site-start], [Provide the emacs site-start 
directory.  The default is $(sysconfdir)/emacs/site-start.el.]),
+       [ SITESTART="$withval" ],
+       [ SITESTART='$(sysconfdir)/emacs/site-start.d' ])
+
+AC_SUBST([SITESTART])
 AC_CONFIG_FILES([Makefile 
                 magit-pkg.el])
 
-- 
1.7.0

Reply via email to