AC major changed.
[elisp/gnus.git-] / aclocal.m4
1 AC_DEFUN(AC_DEFINE_GNUS_PRODUCT_NAME,
2  [dnl Defining gnus product name.
3   GNUS_PRODUCT_NAME=$1])
4
5 AC_DEFUN(AC_CHECK_EMACS,
6  [dnl Check for Emacsen.
7   AC_ARG_WITH(emacs,
8    [  --with-emacs=EMACS      compile with EMACS [EMACS=emacs, mule...]],
9    [if test x$withval = xyes -o x$withval = xt -o x$withval = x; then
10       AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)
11     else
12       AC_CHECK_PROG(EMACS, $withval, $withval, emacs)
13     fi])
14   AC_ARG_WITH(xemacs,
15    [  --with-xemacs=XEMACS    compile with XEMACS [XEMACS=xemacs]],
16    [if test x$withval = xyes -o x$withval = x; then
17       AC_CHECK_PROG(XEMACS, xemacs, xemacs, xemacs)
18     else
19       AC_CHECK_PROG(XEMACS, $withval, $withval, xemacs)
20     fi
21     EMACS=$XEMACS],
22    [XEMACS=xemacs
23     test x$EMACS = xt -o x$EMACS = x &&\
24       AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)])
25   AC_SUBST(EMACS)
26   AC_SUBST(XEMACS)])
27
28 AC_DEFUN(AC_PATH_LISPDIR,
29  [dnl Check for LISPDIR.
30   AC_MSG_CHECKING([where lisp files should go])
31   AC_ARG_WITH(lispdir,
32    [  --with-lispdir=DIR      Where to install lisp files
33                           (for XEmacs package, use --with-packagedir instead)],
34    lispdir=$withval,
35    [emacsdir=$datadir/emacs
36     test x$prefix = xNONE && prefix=$ac_default_prefix
37     case `echo x$EMACS | sed -e 's/x//' -e 's/^.*\///'` in
38     emacs|emacs-*)
39       if test -d $prefix/share/emacs; then
40         emacsdir=$prefix/share/emacs
41       elif test -d $prefix/lib/emacs; then
42         emacsdir=$prefix/lib/emacs
43       fi;;
44     xemacs|xemacs-*)
45       if test -d $prefix/lib/xemacs; then
46         emacsdir=$prefix/lib/xemacs
47       elif test -d $prefix/share/xemacs; then
48         emacsdir=$prefix/share/xemacs
49       fi;;
50     mule|mule-*)
51       if test -d $prefix/share/mule; then
52         emacsdir=$prefix/share/mule
53       elif test -d $prefix/lib/mule; then
54         emacsdir=$prefix/lib/mule
55       elif test -d $prefix/share/emacs; then
56         emacsdir=$prefix/share/emacs
57       elif test -d $prefix/lib/emacs; then
58         emacsdir=$prefix/lib/emacs
59       fi;;
60     esac
61     lispdir=$emacsdir/site-lisp/$GNUS_PRODUCT_NAME])
62   AC_MSG_RESULT([$lispdir
63          (it will be ignored when \"make install-package[[-ja]]\" is done)])
64   AC_SUBST(lispdir)])
65
66 AC_DEFUN(AC_PATH_PACKAGEDIR,
67  [dnl Check for PACKAGEDIR.
68   AC_ARG_WITH(packagedir,
69    [  --with-packagedir=DIR   package DIR for XEmacs],
70    [if test x$withval != xyes -a x$withval != x; then
71       AC_MSG_CHECKING([where the package should go])
72       PACKAGEDIR=$withval
73       AC_MSG_RESULT($PACKAGEDIR)
74     fi],
75     PACKAGEDIR=)
76   AC_SUBST(PACKAGEDIR)])
77
78 AC_DEFUN(AC_ADD_LOAD_PATH,
79  [dnl Check for additional load path.
80   AC_ARG_WITH(addpath,
81    [  --with-addpath=PATH     search Emacs-Lisp libraries with PATH
82                           use colons to separate directory names],
83    [if test x$withval != xyes -a x$withval != x; then
84       AC_MSG_CHECKING([where to find the additional elisp libraries])
85       ADDITIONAL_LOAD_PATH=$withval
86       AC_MSG_RESULT($ADDITIONAL_LOAD_PATH)
87     fi],
88     ADDITIONAL_LOAD_PATH=)
89   AC_SUBST(ADDITIONAL_LOAD_PATH)])