* liece-vars.el (liece-channel-buffer-mode): Set default to t.
[elisp/liece.git] / acinclude.m4
1 AC_DEFUN(AM_PATH_LISPDIR,
2  [dnl #
3   dnl # Check Emacs
4   dnl #
5   AC_ARG_WITH(emacs,
6     [  --with-emacs=EMACS      compile with EMACS [EMACS=emacs, xemacs...]],
7     [case "${withval}" in
8        yes)     EMACS= ;;
9        no)      AC_MSG_ERROR([emacs is not available]) ;;
10        *)       EMACS=${withval} ;;
11      esac], EMACS=)
12   if test "x$EMACS" = "xt" -o "x$EMACS" = x; then
13     AC_PATH_PROGS(EMACS, emacs xemacs mule, no)
14   else
15     AC_MSG_CHECKING(for emacs)
16     AC_MSG_RESULT($EMACS)
17   fi
18   dnl # 
19   dnl # Check Emacs directories
20   dnl #
21   AC_ARG_WITH(emacsdir,
22     [  --with-emacsdir=EDIR    Emacs program/data files in EDIR [guessed]],
23     [case "${withval}" in
24        yes)     emacsdir=NONE ;;
25        no)      AC_MSG_ERROR(emacsdir is not available) ;;
26        *)       emacsdir=${withval} ;;
27      esac], emacsdir=NONE)
28   AC_MSG_CHECKING([where emacs files are in])
29   AC_MSG_RESULT($emacsdir)
30   AC_SUBST(emacsdir)
31   dnl # 
32   dnl # Check Emacs site-lisp directories
33   dnl #
34   ac_cv_lispdir=no
35   AC_ARG_WITH(lispdir,
36     [  --with-lispdir=DIR      emacs lisp files in DIR [EDIR/site-lisp]],
37     [case "${withval}" in
38        yes)     lispdir=NONE ;;
39        no)      AC_MSG_ERROR(lispdir is not available) ;;
40        *)       lispdir=${withval} ; ac_cv_lispdir=yes ;;
41      esac], lispdir=NONE)
42   AC_MSG_CHECKING([where .elc files should go])
43   AC_MSG_RESULT($lispdir)
44   AC_SUBST(lispdir)
45   AM_CONDITIONAL(USE_CUSTOM_LISPDIR, test x$ac_cv_lispdir = xyes)
46   dnl #
47   dnl # Check whether install as XEmacs package
48   dnl #
49   AC_ARG_ENABLE(package,
50     [  --enable-package        install as XEmacs package [default=no]],,
51     enable_package=no)
52   AC_MSG_CHECKING([whether install as XEmacs package])
53   if test "x$enable_package" = "xyes"; then
54     AC_MSG_RESULT(yes)
55     EMACS=xemacs
56     dnl # 
57     dnl # Check XEmacs package directories 
58     dnl #
59     ac_cv_packagedir=no
60     AC_ARG_WITH(packagedir,
61       [  --with-packagedir=DIR   XEmacs package files in DIR [EDIR/packages]],
62       [case "${withval}" in
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
72     fi
73     AC_MSG_RESULT($packagedir)
74     AC_SUBST(packagedir)
75     pkgdatadir=${packagedir}/etc/${PACKAGE}
76     infodir=${packagedir}/info
77     AM_CONDITIONAL(USE_CUSTOM_PACKAGEDIR, test x$ac_cv_packagedir = xyes)
78   else 
79     AC_MSG_RESULT(no)
80   fi
81   AC_SUBST(icondir)
82   AC_SUBST(catalogdir)
83   AC_SUBST(styledir)
84   
85   AM_CONDITIONAL(USE_PACKAGE, test x$enable_package = xyes)])