1 AC_DEFUN(AM_PATH_LISPDIR,
6 [ --with-emacs=EMACS compile with EMACS [EMACS=emacs, xemacs...]],
9 no) AC_MSG_ERROR([emacs is not available]) ;;
10 *) EMACS=${withval} ;;
12 if test "x$EMACS" = "xt" -o "x$EMACS" = x; then
13 AC_PATH_PROGS(EMACS, emacs xemacs mule, no)
15 AC_MSG_CHECKING(for emacs)
19 dnl # Check Emacs directories
22 [ --with-emacsdir=EDIR Emacs program/data files in EDIR [guessed]],
25 no) AC_MSG_ERROR(emacsdir is not available) ;;
26 *) emacsdir=${withval} ;;
28 AC_MSG_CHECKING([where emacs files are in])
29 AC_MSG_RESULT($emacsdir)
32 dnl # Check Emacs site-lisp directories
36 [ --with-lispdir=DIR emacs lisp files in DIR [EDIR/site-lisp]],
39 no) AC_MSG_ERROR(lispdir is not available) ;;
40 *) lispdir=${withval} ; ac_cv_lispdir=yes ;;
42 AC_MSG_CHECKING([where .elc files should go])
43 AC_MSG_RESULT($lispdir)
45 AM_CONDITIONAL(USE_CUSTOM_LISPDIR, test x$ac_cv_lispdir = xyes)
47 dnl # Check whether install as XEmacs package
49 AC_ARG_ENABLE(package,
50 [ --enable-package install as XEmacs package [default=no]],,
52 AC_MSG_CHECKING([whether install as XEmacs package])
53 if test "x$enable_package" = "xyes"; then
57 dnl # Check XEmacs package directories
60 AC_ARG_WITH(packagedir,
61 [ --with-packagedir=DIR XEmacs package files in DIR [EDIR/packages]],
63 yes) packagedir=NONE ;;
64 no) AC_MSG_ERROR(packagedir is not available) ;;
65 *) packagedir=${withval} ; ac_cv_packagedir=yes ;;
66 esac], packagedir=NONE)
67 AC_MSG_CHECKING([where package files should go])
68 if test "x$packagedir" = "xNONE"; then
69 eval `$EMACS -batch -q -no-site-file -l ./lisp/liece-make.el \
70 -f config-liece-package-directory`
71 packagedir=$PACKAGEDIR
73 AC_MSG_RESULT($packagedir)
75 AM_CONDITIONAL(USE_CUSTOM_PACKAGEDIR, test x$ac_cv_packagedir = xyes)
79 AM_CONDITIONAL(USE_PACKAGE, test x$enable_package = xyes)])